diff --git a/modeling-cmds/openapi/api.json b/modeling-cmds/openapi/api.json index 7674ba62..1e01a878 100644 --- a/modeling-cmds/openapi/api.json +++ b/modeling-cmds/openapi/api.json @@ -698,8 +698,7 @@ "type": "object", "properties": { "eye_offset": { - "type": "number", - "format": "float" + "$ref": "#/components/schemas/Point3d" }, "fov_y": { "type": "number", @@ -708,32 +707,19 @@ "is_ortho": { "type": "boolean" }, - "ortho_scale_enabled": { - "type": "boolean" - }, - "ortho_scale_factor": { - "type": "number", - "format": "float" - }, "pivot_position": { "$ref": "#/components/schemas/Point3d" }, "pivot_rotation": { "$ref": "#/components/schemas/Point4d" - }, - "world_coord_system": { - "$ref": "#/components/schemas/WorldCoordinateSystem" } }, "required": [ "eye_offset", "fov_y", "is_ortho", - "ortho_scale_enabled", - "ortho_scale_factor", "pivot_position", - "pivot_rotation", - "world_coord_system" + "pivot_rotation" ] }, "ClientMetrics": { @@ -7848,13 +7834,6 @@ ] } ] - }, - "WorldCoordinateSystem": { - "type": "string", - "enum": [ - "right_handed_up_z", - "right_handed_up_y" - ] } }, "responses": { diff --git a/modeling-cmds/src/shared.rs b/modeling-cmds/src/shared.rs index 6fb66619..06831f54 100644 --- a/modeling-cmds/src/shared.rs +++ b/modeling-cmds/src/shared.rs @@ -1139,18 +1139,6 @@ pub struct CameraSettings { pub ortho: bool, } -#[allow(missing_docs)] -#[repr(u8)] -#[derive(Default, Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize, JsonSchema)] -#[serde(rename_all = "snake_case")] -#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))] -#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))] -pub enum WorldCoordinateSystem { - #[default] - RightHandedUpZ, - RightHandedUpY, -} - #[allow(missing_docs)] #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize, JsonSchema)] @@ -1159,12 +1147,9 @@ pub enum WorldCoordinateSystem { pub struct CameraViewState { pub pivot_rotation: Quaternion, pub pivot_position: Point3d, - pub eye_offset: f32, + pub eye_offset: Point3d, pub fov_y: f32, - pub ortho_scale_factor: f32, pub is_ortho: bool, - pub ortho_scale_enabled: bool, - pub world_coord_system: WorldCoordinateSystem, } impl Default for CameraViewState { @@ -1172,12 +1157,13 @@ impl Default for CameraViewState { CameraViewState { pivot_rotation: Default::default(), pivot_position: Default::default(), - eye_offset: 10.0, + eye_offset: Point3d { + x: 0.0, + y: 0.0, + z: 10.0, + }, fov_y: 45.0, - ortho_scale_factor: 1.6, is_ortho: false, - ortho_scale_enabled: true, - world_coord_system: Default::default(), } } }