Skip to content

Commit 3bd3566

Browse files
committed
Update CameraViewState
1 parent 3c5494b commit 3bd3566

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

modeling-cmds/src/shared.rs

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,18 +1139,6 @@ pub struct CameraSettings {
11391139
pub ortho: bool,
11401140
}
11411141

1142-
#[allow(missing_docs)]
1143-
#[repr(u8)]
1144-
#[derive(Default, Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize, JsonSchema)]
1145-
#[serde(rename_all = "snake_case")]
1146-
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1147-
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1148-
pub enum WorldCoordinateSystem {
1149-
#[default]
1150-
RightHandedUpZ,
1151-
RightHandedUpY,
1152-
}
1153-
11541142
#[allow(missing_docs)]
11551143
#[repr(C)]
11561144
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
@@ -1159,25 +1147,23 @@ pub enum WorldCoordinateSystem {
11591147
pub struct CameraViewState {
11601148
pub pivot_rotation: Quaternion,
11611149
pub pivot_position: Point3d,
1162-
pub eye_offset: f32,
1150+
pub eye_offset: Point3d,
11631151
pub fov_y: f32,
1164-
pub ortho_scale_factor: f32,
11651152
pub is_ortho: bool,
1166-
pub ortho_scale_enabled: bool,
1167-
pub world_coord_system: WorldCoordinateSystem,
11681153
}
11691154

11701155
impl Default for CameraViewState {
11711156
fn default() -> Self {
11721157
CameraViewState {
11731158
pivot_rotation: Default::default(),
11741159
pivot_position: Default::default(),
1175-
eye_offset: 10.0,
1160+
eye_offset: Point3d {
1161+
x: 0.0,
1162+
y: 0.0,
1163+
z: 10.0,
1164+
},
11761165
fov_y: 45.0,
1177-
ortho_scale_factor: 1.6,
11781166
is_ortho: false,
1179-
ortho_scale_enabled: true,
1180-
world_coord_system: Default::default(),
11811167
}
11821168
}
11831169
}

0 commit comments

Comments
 (0)