euv_core/game/engine3d/world/enum.rs
1/// Supported physically based 3D camera controller modes for `World3D`.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
3pub enum CameraMode3D {
4 /// Dynamic third-person chase camera trailing behind the player vehicle.
5 #[default]
6 Chase,
7 /// Low hood/cockpit driving perspective mounted over the front axle.
8 Hood,
9 /// Continuous 360-degree orbital turntable camera around the active subject.
10 Orbit,
11 /// High-altitude aerial overview camera for open-world navigation.
12 Aerial,
13 /// Unrestricted 6-DOF free-fly camera controlled directly by user input.
14 FreeFly,
15 /// Smooth cinematic dolly camera gliding along a sinusoidal showcase arc.
16 CinematicDolly,
17}
18
19/// Real-time incremental scene mutation received from Blender Live-Link without resetting camera or rebuilding unrelated meshes.
20#[derive(Clone, Debug, PartialEq)]
21pub enum BlenderLiveDelta3D {
22 /// Updates a named scene-graph node's local TRS transform (optionally converting from Blender Z-up).
23 NodeTransform {
24 /// Target scene-graph node name.
25 node_name: String,
26 /// Local translation `[x, y, z]`.
27 translation: [f32; 3],
28 /// Local rotation quaternion `[x, y, z, w]`.
29 rotation: [f32; 4],
30 /// Local non-uniform scale `[sx, sy, sz]`.
31 scale: [f32; 3],
32 /// Whether inputs are in Blender Z-up space requiring basis conversion to Engine Y-up.
33 blender_z_up: bool,
34 },
35 /// Updates Principled BSDF parameters on a named material in place.
36 MaterialParams {
37 /// Target material name inside `World3D::principled_materials`.
38 material_name: String,
39 /// Optional linear base color RGBA override.
40 base_color_factor: Option<[f32; 4]>,
41 /// Optional metallic scalar override.
42 metallic_factor: Option<f32>,
43 /// Optional roughness scalar override.
44 roughness_factor: Option<f32>,
45 /// Optional clearcoat intensity override.
46 clearcoat_factor: Option<f32>,
47 /// Optional clearcoat roughness override.
48 clearcoat_roughness_factor: Option<f32>,
49 /// Optional microfiber sheen RGB tint override.
50 sheen_color_factor: Option<[f32; 3]>,
51 /// Optional microfiber sheen roughness override.
52 sheen_roughness_factor: Option<f32>,
53 /// Optional linear emissive RGB override.
54 emissive_factor: Option<[f32; 3]>,
55 /// Optional HDR emissive luminance strength override.
56 emissive_strength: Option<f32>,
57 /// Optional optical transmission factor override.
58 transmission_factor: Option<f32>,
59 /// Optional dielectric index of refraction override.
60 ior: Option<f32>,
61 },
62 /// Updates shape-key morph weights for a named scene-graph node in place.
63 MorphWeights {
64 /// Target scene-graph node name.
65 node_name: String,
66 /// Replacement per-shape-key weights.
67 weights: Vec<f32>,
68 },
69 /// Updates parameters on an existing point, spot, or area light by index.
70 LightUpdate {
71 /// Target light index.
72 light_index: usize,
73 /// Optional linear RGB emission color.
74 color: Option<[f32; 3]>,
75 /// Optional luminous intensity.
76 intensity: Option<f32>,
77 /// Optional world position.
78 position: Option<[f32; 3]>,
79 /// Optional world emitting direction.
80 direction: Option<[f32; 3]>,
81 },
82 /// Updates the primary viewport camera pose and vertical field of view.
83 CameraUpdate {
84 /// World-space camera position.
85 position: [f32; 3],
86 /// Horizontal yaw in radians.
87 yaw: f32,
88 /// Vertical pitch in radians.
89 pitch: f32,
90 /// Vertical field of view in degrees.
91 fov_deg: f32,
92 },
93 /// Toggles viewport visibility for a named Blender Collection.
94 CollectionVisibility {
95 /// Target collection name inside `SceneGraph3D::collections`.
96 collection_name: String,
97 /// Desired viewport visibility state.
98 visible: bool,
99 },
100 /// Updates IBL environment Y-rotation and global radiance intensity.
101 EnvironmentUpdate {
102 /// World environment rotation around Y axis in radians.
103 rotation_y_rad: f32,
104 /// Global IBL intensity multiplier.
105 intensity: f32,
106 },
107}