// Rust4D Shape Gallery // // Demonstrates the engine's full primitive catalog: tesseract, the four // regular polytopes implemented by the primitive library (5-cell, 16-cell, // 24-cell, 600-cell), and the curved 4D shapes (hypersphere, spherinder, // cubinder, duocylinder). The hypersphere is dynamic to verify collider // creation; the rest are static visual exhibits. Scene( name: "Shape Gallery", entities: [ EntityTemplate( name: Some("floor"), tags: ["static"], transform: Transform4D( position: Vec4(x: 0.0, y: -2.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.0, ), shape: ShapeTemplate( type: "Hyperplane", y: -2.0, size: 22.0, subdivisions: 22, cell_size: 8.0, thickness: 0.001, ), material: Material(base_color: (0.36, 0.36, 0.40, 1.0)), ), EntityTemplate( name: Some("tesseract"), tags: ["static", "gallery"], transform: Transform4D( position: Vec4(x: -16.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.0, ), shape: ShapeTemplate(type: "Tesseract", size: 2.2), material: Material(base_color: (1.0, 0.82, 0.32, 1.0)), ), EntityTemplate( name: Some("hypersphere"), tags: ["dynamic", "gallery"], transform: Transform4D( position: Vec4(x: -12.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.0, ), shape: ShapeTemplate(type: "Hypersphere", radius: 1.25, subdivisions: 2), material: Material(base_color: (0.35, 0.70, 1.0, 1.0)), ), EntityTemplate( name: Some("pentachoron"), tags: ["static", "gallery"], transform: Transform4D( position: Vec4(x: -8.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.2, ), shape: ShapeTemplate(type: "Pentachoron", circumradius: 1.3), material: Material(base_color: (1.0, 0.38, 0.34, 1.0)), ), EntityTemplate( name: Some("hexadecachoron"), tags: ["static", "gallery"], transform: Transform4D( position: Vec4(x: -4.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.2, ), shape: ShapeTemplate(type: "Hexadecachoron", circumradius: 1.35), material: Material(base_color: (0.55, 1.0, 0.48, 1.0)), ), EntityTemplate( name: Some("icositetrachoron"), tags: ["static", "gallery"], transform: Transform4D( position: Vec4(x: 0.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.1, ), shape: ShapeTemplate(type: "Icositetrachoron", circumradius: 1.5), material: Material(base_color: (0.72, 0.45, 1.0, 1.0)), ), EntityTemplate( name: Some("hexacosichoron"), tags: ["static", "gallery"], transform: Transform4D( position: Vec4(x: 4.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.25, ), shape: ShapeTemplate(type: "Hexacosichoron", circumradius: 1.2), material: Material(base_color: (1.0, 0.55, 0.88, 1.0)), ), EntityTemplate( name: Some("spherinder"), tags: ["static", "gallery"], transform: Transform4D( position: Vec4(x: 8.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.0, ), shape: ShapeTemplate(type: "Spherinder", radius: 1.05, half_height: 1.25, subdivisions: 2), material: Material(base_color: (0.28, 0.95, 0.88, 1.0)), ), EntityTemplate( name: Some("cubinder"), tags: ["static", "gallery"], transform: Transform4D( position: Vec4(x: 12.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.0, ), shape: ShapeTemplate(type: "Cubinder", radius: 1.05, half_size: 0.9, segments: 32), material: Material(base_color: (0.95, 0.72, 0.24, 1.0)), ), EntityTemplate( name: Some("duocylinder"), tags: ["static", "gallery"], transform: Transform4D( position: Vec4(x: 16.0, y: 0.0, z: 0.0, w: 0.0), rotation: (s: 1.0, b_xy: 0.0, b_xz: 0.0, b_xw: 0.0, b_yz: 0.0, b_yw: 0.0, b_zw: 0.0, p: 0.0), scale: 1.0, ), shape: ShapeTemplate(type: "Duocylinder", radius_xy: 1.0, radius_zw: 1.0, segments: 32), material: Material(base_color: (0.40, 0.65, 1.0, 1.0)), ), ], gravity: Some(-20.0), player_spawn: Some((0.0, 1.5, 18.0, 0.0)), )