Skip to content

Commit cbeacf2

Browse files
committed
WIP: Endpoints for OIT
1 parent e9c3258 commit cbeacf2

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

modeling-cmds/openapi/api.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6000,6 +6000,26 @@
60006000
"required": [
60016001
"type"
60026002
]
6003+
},
6004+
{
6005+
"description": "TODO: Explain what this means.",
6006+
"type": "object",
6007+
"properties": {
6008+
"enabled": {
6009+
"nullable": true,
6010+
"description": "Enables or disables OIT. If not given, toggles it.",
6011+
"type": "boolean"
6012+
},
6013+
"type": {
6014+
"type": "string",
6015+
"enum": [
6016+
"set_order_independent_transparency"
6017+
]
6018+
}
6019+
},
6020+
"required": [
6021+
"type"
6022+
]
60036023
}
60046024
]
60056025
},

modeling-cmds/src/def_enum.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,13 +1800,24 @@ define_modeling_cmd_enum! {
18001800
/// Which units the `value` field uses.
18011801
pub units: units::UnitLength,
18021802
}
1803+
18031804
/// Set the grid lines to auto scale. The grid will get larger the further you zoom out,
18041805
/// and smaller the more you zoom in.
18051806
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
18061807
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
18071808
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
18081809
pub struct SetGridAutoScale {
18091810
}
1811+
1812+
/// TODO: Explain what this means.
1813+
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
1814+
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1815+
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1816+
pub struct SetOrderIndependentTransparency {
1817+
/// Enables or disables OIT.
1818+
/// If not given, toggles it.
1819+
enabled: Option<bool>,
1820+
}
18101821
}
18111822
}
18121823

modeling-cmds/src/ok_response.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,5 +971,13 @@ define_ok_modeling_cmd_response_enum! {
971971
/// The response from the 'SetGridScale'.
972972
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
973973
pub struct SetGridAutoScale {}
974+
975+
/// The response from the 'SetOrderIndependentTransparency'.
976+
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
977+
pub struct SetOrderIndependentTransparency {
978+
/// Is it now enabled, or disabled?
979+
pub enabled: bool,
980+
}
981+
974982
}
975983
}

modeling-cmds/src/session.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ pub struct EngineParams {
3131
pub replay: Option<String>,
3232
/// API Call ID for distributed tracing
3333
pub api_call_id: Option<String>,
34+
/// TODO: Give summary of what this actually means
35+
pub order_independent_transparency: bool,
3436
}
3537

3638
impl Default for EngineParams {
@@ -46,6 +48,7 @@ impl Default for EngineParams {
4648
show_grid: false,
4749
replay: None,
4850
api_call_id: None,
51+
order_independent_transparency: false,
4952
}
5053
}
5154
}

0 commit comments

Comments
 (0)