summaryrefslogtreecommitdiff
path: root/modules/fbx/data/pivot_transform.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fbx/data/pivot_transform.h')
-rw-r--r--modules/fbx/data/pivot_transform.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/modules/fbx/data/pivot_transform.h b/modules/fbx/data/pivot_transform.h
index 9996027870..df97c8db57 100644
--- a/modules/fbx/data/pivot_transform.h
+++ b/modules/fbx/data/pivot_transform.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -31,8 +31,8 @@
#ifndef PIVOT_TRANSFORM_H
#define PIVOT_TRANSFORM_H
-#include "core/math/transform.h"
-#include "core/object/reference.h"
+#include "core/math/transform_3d.h"
+#include "core/object/ref_counted.h"
#include "model_abstraction.h"
@@ -55,13 +55,13 @@ enum TransformationComp {
TransformationComp_MAXIMUM
};
// Abstract away pivot data so its simpler to handle
-struct PivotTransform : Reference, ModelAbstraction {
+struct PivotTransform : RefCounted, 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);
@@ -85,10 +85,10 @@ struct PivotTransform : Reference, ModelAbstraction {
print_verbose("raw post_rotation " + raw_post_rotation * (180 / Math_PI));
}
- Transform ComputeGlobalTransform(Transform t) const;
- Transform ComputeLocalTransform(Transform t) const;
- Transform ComputeGlobalTransform(Vector3 p_translation, Quat p_rotation, Vector3 p_scaling) const;
- Transform ComputeLocalTransform(Vector3 p_translation, Quat p_rotation, Vector3 p_scaling) const;
+ Transform3D ComputeGlobalTransform(Transform3D t) const;
+ Transform3D ComputeLocalTransform(Transform3D t) 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();
@@ -105,10 +105,10 @@ struct PivotTransform : Reference, ModelAbstraction {
//Transform chain[TransformationComp_MAXIMUM];
// cached for later use
- Transform GlobalTransform = Transform();
- Transform LocalTransform = Transform();
- Transform Local_Scaling_Matrix = Transform(); // used for inherit type.
- Transform GeometricTransform = Transform(); // 3DS max only
+ Transform3D GlobalTransform = Transform3D();
+ Transform3D LocalTransform = Transform3D();
+ Transform3D Local_Scaling_Matrix = Transform3D(); // used for inherit type.
+ Transform3D GeometricTransform = Transform3D(); // 3DS max only
FBXDocParser::TransformInheritance inherit_type = FBXDocParser::TransformInheritance_MAX; // maya fbx requires this - sorry <3
};