diff options
Diffstat (limited to 'modules/fbx/data')
-rw-r--r-- | modules/fbx/data/pivot_transform.cpp | 24 | ||||
-rw-r--r-- | modules/fbx/data/pivot_transform.h | 12 |
2 files changed, 18 insertions, 18 deletions
diff --git a/modules/fbx/data/pivot_transform.cpp b/modules/fbx/data/pivot_transform.cpp index 3e4e197fbf..4cf42257a4 100644 --- a/modules/fbx/data/pivot_transform.cpp +++ b/modules/fbx/data/pivot_transform.cpp @@ -90,7 +90,7 @@ void PivotTransform::ReadTransformChain() { if (ok) { geometric_rotation = ImportUtils::EulerToQuaternion(rot, ImportUtils::deg2rad(GeometricRotation)); } else { - geometric_rotation = Quat(); + geometric_rotation = Quaternion(); } const Vector3 &GeometricTranslation = ImportUtils::safe_import_vector3(FBXDocParser::PropertyGet<Vector3>(props, "GeometricTranslation", ok)); @@ -100,7 +100,7 @@ void PivotTransform::ReadTransformChain() { geometric_translation = Vector3(0, 0, 0); } - if (geometric_rotation != Quat()) { + if (geometric_rotation != Quaternion()) { print_error("geometric rotation is unsupported!"); //CRASH_COND(true); } @@ -116,7 +116,7 @@ void PivotTransform::ReadTransformChain() { } } -Transform3D PivotTransform::ComputeLocalTransform(Vector3 p_translation, Quat p_rotation, Vector3 p_scaling) const { +Transform3D PivotTransform::ComputeLocalTransform(Vector3 p_translation, Quaternion p_rotation, Vector3 p_scaling) const { Transform3D T, Roff, Rp, Soff, Sp, S; // Here I assume this is the operation which needs done. @@ -142,18 +142,18 @@ Transform3D PivotTransform::ComputeLocalTransform(Vector3 p_translation, Quat p_ Transform3D PivotTransform::ComputeGlobalTransform(Transform3D t) const { Vector3 pos = t.origin; Vector3 scale = t.basis.get_scale(); - Quat rot = t.basis.get_rotation_quat(); + Quaternion rot = t.basis.get_rotation_quaternion(); return ComputeGlobalTransform(pos, rot, scale); } Transform3D PivotTransform::ComputeLocalTransform(Transform3D t) const { Vector3 pos = t.origin; Vector3 scale = t.basis.get_scale(); - Quat rot = t.basis.get_rotation_quat(); + Quaternion rot = t.basis.get_rotation_quaternion(); return ComputeLocalTransform(pos, rot, scale); } -Transform3D PivotTransform::ComputeGlobalTransform(Vector3 p_translation, Quat p_rotation, Vector3 p_scaling) const { +Transform3D PivotTransform::ComputeGlobalTransform(Vector3 p_translation, Quaternion p_rotation, Vector3 p_scaling) const { Transform3D T, Roff, Rp, Soff, Sp, S; // Here I assume this is the operation which needs done. @@ -183,11 +183,11 @@ Transform3D PivotTransform::ComputeGlobalTransform(Vector3 p_translation, Quat p } Transform3D local_rotation_m, parent_global_rotation_m; - Quat parent_global_rotation = parent_global_xform.basis.get_rotation_quat(); - parent_global_rotation_m.basis.set_quat(parent_global_rotation); + Quaternion parent_global_rotation = parent_global_xform.basis.get_rotation_quaternion(); + parent_global_rotation_m.basis.set_quaternion(parent_global_rotation); local_rotation_m = Rpre * R * Rpost; - //Basis parent_global_rotation = Basis(parent_global_xform.get_basis().get_rotation_quat().normalized()); + //Basis parent_global_rotation = Basis(parent_global_xform.get_basis().get_rotation_quaternion().normalized()); Transform3D local_shear_scaling, parent_shear_scaling, parent_shear_rotation, parent_shear_translation; Vector3 parent_translation = parent_global_xform.get_origin(); @@ -250,11 +250,11 @@ void PivotTransform::ComputePivotTransform() { } Transform3D local_rotation_m, parent_global_rotation_m; - Quat parent_global_rotation = parent_global_xform.basis.get_rotation_quat(); - parent_global_rotation_m.basis.set_quat(parent_global_rotation); + Quaternion parent_global_rotation = parent_global_xform.basis.get_rotation_quaternion(); + parent_global_rotation_m.basis.set_quaternion(parent_global_rotation); local_rotation_m = Rpre * R * Rpost; - //Basis parent_global_rotation = Basis(parent_global_xform.get_basis().get_rotation_quat().normalized()); + //Basis parent_global_rotation = Basis(parent_global_xform.get_basis().get_rotation_quaternion().normalized()); Transform3D local_shear_scaling, parent_shear_scaling, parent_shear_rotation, parent_shear_translation; Vector3 parent_translation = parent_global_xform.get_origin(); diff --git a/modules/fbx/data/pivot_transform.h b/modules/fbx/data/pivot_transform.h index 8ed8358b70..29cf7a3d0e 100644 --- a/modules/fbx/data/pivot_transform.h +++ b/modules/fbx/data/pivot_transform.h @@ -58,10 +58,10 @@ enum TransformationComp { struct PivotTransform : Reference, ModelAbstraction { // at the end we want to keep geometric_ everything, post and pre rotation // these are used during animation data processing / keyframe ingestion the rest can be simplified down / out. - Quat pre_rotation = Quat(); - Quat post_rotation = Quat(); - Quat rotation = Quat(); - Quat geometric_rotation = Quat(); + Quaternion pre_rotation = Quaternion(); + Quaternion post_rotation = Quaternion(); + Quaternion rotation = Quaternion(); + Quaternion geometric_rotation = Quaternion(); Vector3 rotation_pivot = Vector3(); Vector3 rotation_offset = Vector3(); Vector3 scaling_offset = Vector3(1.0, 1.0, 1.0); @@ -87,8 +87,8 @@ struct PivotTransform : Reference, ModelAbstraction { Transform3D ComputeGlobalTransform(Transform3D t) const; Transform3D ComputeLocalTransform(Transform3D t) const; - Transform3D ComputeGlobalTransform(Vector3 p_translation, Quat p_rotation, Vector3 p_scaling) const; - Transform3D ComputeLocalTransform(Vector3 p_translation, Quat p_rotation, Vector3 p_scaling) const; + Transform3D ComputeGlobalTransform(Vector3 p_translation, Quaternion p_rotation, Vector3 p_scaling) const; + Transform3D ComputeLocalTransform(Vector3 p_translation, Quaternion p_rotation, Vector3 p_scaling) const; /* Extract into xforms and calculate once */ void ComputePivotTransform(); |