10 #include <AtomsGraph/Ports.h>
12 #include <Atoms/Globals.h>
13 #include <Atoms/Graph/Operator.h>
14 #include <Atoms/AnimationClipLooper.h>
15 #include <AtomsCore/Metadata/Vector3Metadata.h>
16 #include <AtomsCore/JointChain.h>
17 #include <Atoms/AgentType.h>
42 void setupDefaultPose();
62 double retargetingFactor,
68 const long frameOffset);
75 const std::vector<AtomsCore::Vector3>& allPositions,
80 double threshold = 0.9999);
91 void refreshTargetMatrix(
94 unsigned short jointId);
103 std::map<unsigned short, AtomsCore::MapMetadata> &sMetadata,
104 const double agentScale);
106 inline void useLocomotion(
bool value) { m_isLocomotion = value; }
108 void setTimeAndPreviousTime(
double time,
double prevTime);
110 void resetPreviousDirection() { m_resetPreviousDirection =
true; }
116 std::map<unsigned short, AtomsCore::MapMetadata>& sMetadata
119 AtomsMath::Vector3 computeIkBlendRelativeTarget(
122 const double agentScale,
123 const AtomsMath::Vector3& agentPlaneNormal
126 AtomsMath::Vector3 computeIkBlendRelativeTarget(
131 const AtomsMath::Vector3& agentPlaneNormal,
135 const double agentScale
138 AtomsMath::Vector3 computeTargetPos(
139 std::map<unsigned short, AtomsCore::MapMetadata>& sMetadata,
144 const AtomsMath::Vector3& agentPlaneNormal,
148 const double agentScale);
150 void computeThreeJointChain(
155 const AtomsMath::Vector3& targetPos,
159 const double agentScale,
160 const std::pair<AtomsMath::Vector3, AtomsMath::Vector3>& localPoleVector);
162 void computeFARBIKChain(
167 const AtomsMath::Vector3& targetPos,
174 int clampedFrame,
double weight,
203 unsigned int m_currentLoop;
205 std::vector<int> m_skeletonClipJointId;
207 std::vector<BindData> m_bindData;
209 std::string frameRateOverrideName;
213 double m_retargetingFactor;
214 double m_retargetingIKFactor;
223 std::map<std::string, AtomsCore::Vector3> m_poleVectorInBindMap;
226 std::vector<AtomsCore::Matrix> m_sAllMatrix;
227 std::vector<AtomsCore::Matrix> m_tAllMatrix;
228 std::vector<AtomsCore::Vector3> m_sAllPositions;
229 std::vector<AtomsCore::Vector3> m_tAllPositions;
230 std::vector<bool> m_tAllMatrixDirty;
231 std::vector<std::pair<AtomsMath::Vector3, AtomsMath::Vector3>> m_localPoleVectors;
236 double m_agentTypeScaleMultiplier;
242 bool m_isParentSpace;
245 bool m_resetPreviousDirection;
Animation clip looper.
Definition: AnimationClipLooper.h:27
Definition: ClipReaderOperator.h:22
bool compute(const AtomsGraph::ComputeData *computeData)
Compute function.
bool getPoleVector(bool useBind, const AtomsCore::JointChain *chain, const std::vector< AtomsCore::Vector3 > &allPositions, const AtomsCore::Vector3 &startPos, const AtomsCore::Vector3 &endPos, AtomsCore::Vector3 &midPos, AtomsCore::Vector3 &poleVector, double threshold=0.9999)
Methods to compute retargeting.
void reset()
Operator reset function.
Operator node.
Definition: Operator.h:26
JointChain class.
Definition: JointChain.h:31
Joint class.
Definition: Joint.h:30
Pose class.
Definition: Pose.h:32
Poser class.
Definition: Poser.h:24
Skeleton class.
Definition: Skeleton.h:68
Generic node port class.
Definition: PortTemplate.h:24
AtomsMath::Quaternion Quaternion
Quaternion class.
Definition: AtomsMath.h:67
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57
AtomsMath::Matrix Matrix
Matrix class.
Definition: AtomsMath.h:63
Atoms namespace.
Definition: Agent.h:29
AtomsPtr< const AnimationClip > AnimationClipCPtr
animation clip const pointer
Definition: AnimationClip.h:32
AtomsPtr< const AgentType > AgentTypeCPtr
Agent type const pointer.
Definition: AgentType.h:21
Definition: AgentType.h:52
Definition: ClipReaderOperator.h:26
Definition: Skeleton.h:25