2 #include <Atoms/Globals.h>
3 #include <AtomsUtils/AtomsMath.h>
4 #include <ToolchefsSTL/String.h>
5 #include <ToolchefsSTL/Containers/Array.h>
6 #include <ToolchefsSTL/Containers/Map.h>
7 #include <ToolchefsSTL/Containers/List.h>
8 #include <ToolchefsSTL/Containers/Set.h>
16 #include <AtomsMath/ImathExport.h>
17 #include <AtomsMath/ImathConfig.h>
18 #include <AtomsMath/ImathVec.h>
19 #include <AtomsMath/ImathVecAlgo.h>
20 #include <AtomsMath/ImathMatrix.h>
21 #include <AtomsMath/ImathMatrixAlgo.h>
22 #include <AtomsMath/ImathQuat.h>
23 #include <AtomsMath/ImathEuler.h>
24 #include <AtomsMath/ImathBox.h>
25 #include <AtomsMath/ImathColor.h>
26 #include <AtomsMath/ImathLine.h>
27 #include <AtomsMath/ImathSphere.h>
28 #include <AtomsMath/ImathRandom.h>
29 #include <AtomsMath/ImathBoxAlgo.h>
31 namespace AtomsScriptUtils
33 using Vector2 = ATOMSMATH_NAMESPACE::V2d;
34 using Vector2f = ATOMSMATH_NAMESPACE::V2f;
35 using Vector2i = ATOMSMATH_NAMESPACE::V2i;
36 using Vector3 = ATOMSMATH_NAMESPACE::V3d;
37 using Vector3f = ATOMSMATH_NAMESPACE::V3f;
38 using Vector3i = ATOMSMATH_NAMESPACE::V3i;
39 using Vector4 = ATOMSMATH_NAMESPACE::V4d;
40 using Vector4f = ATOMSMATH_NAMESPACE::V4f;
41 using Vector4i = ATOMSMATH_NAMESPACE::V4i;
42 using Matrix = ATOMSMATH_NAMESPACE::M44d;
43 using Matrixf = ATOMSMATH_NAMESPACE::M44f;
44 using Matrix33 = ATOMSMATH_NAMESPACE::M33d;
45 using Matrix33f = ATOMSMATH_NAMESPACE::M33f;
46 using Quaternion = ATOMSMATH_NAMESPACE::Quatd;
47 using Quaternionf = ATOMSMATH_NAMESPACE::Quatf;
48 using Euler = ATOMSMATH_NAMESPACE::Eulerd;
49 using Eulerf = ATOMSMATH_NAMESPACE::Eulerf;
50 using Box2 = ATOMSMATH_NAMESPACE::Box2d;
51 using Box2f = ATOMSMATH_NAMESPACE::Box2f;
52 using Box2i = ATOMSMATH_NAMESPACE::Box2i;
53 using Box3 = ATOMSMATH_NAMESPACE::Box3d;
54 using Box3f = ATOMSMATH_NAMESPACE::Box3f;
55 using Box3i = ATOMSMATH_NAMESPACE::Box3i;
56 using Color3c = ATOMSMATH_NAMESPACE::Color3c;
57 using Color3f = ATOMSMATH_NAMESPACE::Color3f;
58 using Color4c = ATOMSMATH_NAMESPACE::Color4c;
59 using Color4f = ATOMSMATH_NAMESPACE::Color4f;
60 using Line3 = ATOMSMATH_NAMESPACE::Line3d;
61 using Line3f = ATOMSMATH_NAMESPACE::Line3f;
62 using Line2 = ATOMSMATH_NAMESPACE::Line2d;
63 using Line2f = ATOMSMATH_NAMESPACE::Line2f;
64 using Sphere3 = ATOMSMATH_NAMESPACE::Sphere3d;
65 using Sphere3f = ATOMSMATH_NAMESPACE::Sphere3f;
66 using Rand32 = ATOMSMATH_NAMESPACE::Rand32;
67 using Rand48 = ATOMSMATH_NAMESPACE::Rand48;
77 namespace AtomsScriptUtils
86 ATOMS_EXPORT
void info(
const char* format, ...);
88 ATOMS_EXPORT
void warning(
const char* format, ...);
90 ATOMS_EXPORT
void error(
const char* format, ...);
99 int numJoints()
const;
105 int getJointParent(
int jointId)
const;
109 AtomsMath::Matrix getJointMatrix(
int jointId)
const;
111 AtomsMath::Matrix getJointWorldMatrix(
int jointId)
const;
113 AtomsMath::Vector3 getJointTranslation(
int jointId)
const;
115 AtomsMath::Quaternion getJointRotation(
int jointId)
const;
117 AtomsMath::Vector3 getJointScale(
int jointId)
const;
143 void setQuaternionMetadata(
const ToolchefsSTL::String& name,
const AtomsMath::Quaternion& value);
167 void setPoseQuaternionMetadata(
const ToolchefsSTL::String& name,
const AtomsMath::Quaternion& value);
187 void setJointPoseDoubleMetadata(
const ToolchefsSTL::String& name,
const double value,
int jointId);
189 void setJointPoseVector2Metadata(
const ToolchefsSTL::String& name,
const AtomsMath::Vector2& value,
int jointId);
190 void setJointPoseVector3Metadata(
const ToolchefsSTL::String& name,
const AtomsMath::Vector3& value,
int jointId);
191 void setJointPoseVector4Metadata(
const ToolchefsSTL::String& name,
const AtomsMath::Vector4& value,
int jointId);
192 void setJointPoseMatrixMetadata(
const ToolchefsSTL::String& name,
const AtomsMath::Matrix& value,
int jointId);
193 void setJointPoseQuaternionMetadata(
const ToolchefsSTL::String& name,
const AtomsMath::Quaternion& value,
int jointId);
194 void setJointPoseEulerMetadata(
const ToolchefsSTL::String& name,
const AtomsMath::Euler& value,
int jointId);
198 double getJointPoseDoubleMetadata(
const ToolchefsSTL::String& name,
const double value,
int jointId)
const;
200 AtomsMath::Vector2 getJointPoseVector2Metadata(
const ToolchefsSTL::String& name,
int jointId)
const;
201 AtomsMath::Vector3 getJointPoseVector3Metadata(
const ToolchefsSTL::String& name,
int jointId)
const;
202 AtomsMath::Vector4 getJointPoseVector4Metadata(
const ToolchefsSTL::String& name,
int jointId)
const;
203 AtomsMath::Matrix getJointPoseMatrixMetadata(
const ToolchefsSTL::String& name,
int jointId)
const;
204 AtomsMath::Quaternion getJointPoseQuaternionMetadata(
const ToolchefsSTL::String& name,
int jointId)
const;
205 AtomsMath::Euler getJointPoseEulerMetadata(
const ToolchefsSTL::String& name,
int jointId)
const;
208 void setJointMatrix(
int jointId,
const AtomsMath::Matrix& value);
209 void setJointWorldMatrix(
int jointId,
const AtomsMath::Matrix& value);
210 void setJointTranslation(
int jointId,
const AtomsMath::Vector3& value);
211 void setJointRotation(
int jointId,
const AtomsMath::Quaternion& value);
212 void setJointScale(
int jointId,
const AtomsMath::Vector3& value);
214 AtomsMath::Matrix getJointMatrix(
int jointId)
const;
215 AtomsMath::Matrix getJointWorldMatrix(
int jointId)
const;
216 AtomsMath::Vector3 getJointTranslation(
int jointId)
const;
217 AtomsMath::Quaternion getJointRotation(
int jointId)
const;
218 AtomsMath::Vector3 getJointScale(
int jointId)
const;
222 inline bool isValid() {
return m_ptr !=
nullptr; }
224 inline operator bool() {
return m_ptr !=
nullptr; }
228 AtomsMath::Vector3& position;
230 AtomsMath::Vector3& direction;
232 AtomsMath::Vector3& up;
234 AtomsMath::Vector3& scale;
253 double m_defaultFrameRate;
255 AtomsMath::Vector3 m_defaultVec;
268 double seconds()
const;
Agent group.
Definition: AgentGroup.h:36
Agent.
Definition: Agent.h:44
Agent type.
Definition: AgentType.h:30
Definition: AtomsMath.h:196
Definition: AtomsScriptUtils.h:260
Definition: AtomsScriptUtils.h:93
Definition: AtomsScriptUtils.h:125
Definition: ImathBox.h:36
Definition: ImathColor.h:29
Definition: ImathColor.h:115
Definition: ImathEuler.h:118
Definition: ImathLine.h:180
Definition: ImathLine.h:25
Definition: ImathMatrix.h:305
Definition: ImathRandom.h:33
Definition: ImathRandom.h:64
Definition: ImathSphere.h:25
Atoms namespace.
Definition: Agent.h:29