Atoms Crowd  7.0.0
Poser.h
1 #pragma once
2 // ===========================================================================
3 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4 //
5 // Use of this software is subject to the terms of the Toolchefs license
6 // agreement provided at the time of installation or download, or which
7 // otherwise accompanies this software in either electronic or hard copy form.
8 // ===========================================================================
9 
10 #include <AtomsCore/Globals.h>
11 #include <AtomsCore/AtomsMath.h>
12 #include <AtomsCore/Skeleton.h>
13 #include <AtomsCore/Pose.h>
14 
15 
16 namespace AtomsCore
17 {
19 
23  class ATOMSCORE_EXPORT Poser
24  {
25  public:
26 
28 
31  Poser(const Skeleton* skeleton);
32 
34  ~Poser();
35 
37 
43  Matrix getWorldMatrix(const Pose& pose, unsigned int jointId) const;
44 
46 
50  std::vector<Matrix> getAllWorldMatrix(const Pose& pose) const;
51 
53 
57  void getAllWorldMatrixInPlace(const Pose& pose, std::vector<Matrix>& poseMatrices) const;
58  void getAllWorldMatrixInPlace(const Pose& pose, std::vector<Matrixf>& poseMatrices) const;
59 
61 
66  Matrix getWorldBindMatrix(unsigned int jointId) const;
67 
69 
73  std::vector<Matrix> getAllWorldBindMatrix() const;
74 
76 
80  void getAllWorldBindMatrixInPlace(std::vector<Matrix>& outMatrices) const;
81 
83 
89  void setWorldMatrix(Pose& pose, const Matrix& matrix, unsigned short jointId) const;
90 
92 
95  inline const Skeleton* skeleton() const;
96 
97  private:
98 
100  const Skeleton* m_skeleton;
101  };
102 }
103 
104 #include "Poser.impl.h"
Pose class.
Definition: Pose.h:32
Poser class.
Definition: Poser.h:24
Matrix getWorldMatrix(const Pose &pose, unsigned int jointId) const
Gets the joint world matrix.
void getAllWorldBindMatrixInPlace(std::vector< Matrix > &outMatrices) const
Gets the world bind matrices of all the joints.
Matrix getWorldBindMatrix(unsigned int jointId) const
Gets the joint bind world matrix.
void setWorldMatrix(Pose &pose, const Matrix &matrix, unsigned short jointId) const
Sets the joint world matrix.
~Poser()
Destructor.
std::vector< Matrix > getAllWorldBindMatrix() const
Gets the world bind matrices of all the joints.
std::vector< Matrix > getAllWorldMatrix(const Pose &pose) const
Gets the world matrices of all the joints.
void getAllWorldMatrixInPlace(const Pose &pose, std::vector< Matrix > &poseMatrices) const
Gets the world matrices of all the joints.
Poser(const Skeleton *skeleton)
Constructor.
Skeleton class.
Definition: Skeleton.h:68
AtomsCore namespace.
Definition: Agent.h:344
AtomsMath::Matrix Matrix
Matrix class.
Definition: AtomsMath.h:63