Skip to content

Commit

Permalink
Change name to avoid issue
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamaan476 committed Jan 16, 2025
1 parent e12c6b3 commit 94ae9d6
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions modeling-cmds/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ mod tests {
#[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
#[serde(rename_all="PascalCase")]
#[serde(rename = "TransformBy")]
pub struct TransformBy<T> {
/// The scale, or rotation, or translation.
pub property: T,
Expand All @@ -983,25 +983,6 @@ pub struct TransformBy<T> {
pub is_local: bool,
}

/// How a property of an object should be transformed.
/// This is a 4D version of the `TransformByPoint3d` (Used when wanting to specify a rotation with
/// an angle and axis instead of roll pitch yaw).
#[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct TransformByPoint4d {
/// The scale, or rotation, or translation.
pub property: Point4d,
/// If true, overwrite the previous value with this.
/// If false, the previous value will be modified.
/// E.g. when translating, `set=true` will set a new location,
/// and `set=false` will translate the current location by the given X/Y/Z.
pub set: bool,
/// If true, the transform is applied in local space.
/// If false, the transform is applied in global space.
pub is_local: bool,
}

/// Container that holds a translate, rotate and scale.
#[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
Expand All @@ -1015,7 +996,7 @@ pub struct ComponentTransform {
/// Rotate component of the transform.
/// The rotation is specified as an axis and an angle (xyz are the components of the axis, w is
/// the angle in degrees).
pub rotate_angle_axis: Option<TransformByPoint4d>,
pub rotate_angle_axis: Option<TransformBy<Point4d>>,
/// Scale component of the transform.
pub scale: Option<TransformBy<Point3d<f32>>>,
}

0 comments on commit 94ae9d6

Please sign in to comment.