15 #ifndef __GU_MOTIONCLIP_H_INCLUDED__
16 #define __GU_MOTIONCLIP_H_INCLUDED__
66 myRestAttribsToUnpack =
nullptr;
67 myAnimAttribsToUnpack =
nullptr;
69 myUseLeftEndBehavior =
false;
72 myUseRightEndBehavior =
false;
75 myResetMissingAttribs =
false;
76 myConstantEvaluation =
false;
79 myRecomputeWorld =
true;
80 myHierarchyCache =
nullptr;
82 myCenterOfMassName =
"COM";
84 myConfigAttribName =
"";
139 bool can_evaluate =
true,
141 bool compute_default_clipinfo =
false,
142 bool do_sort_samples =
true,
143 bool enable_locking =
true);
147 virtual bool updateGdp(
const GU_Detail *gdp);
173 AutoLock lock(getLock());
174 myEvaluator.evaluate(time, result, result_pts,
175 getFrameDetail(-1), topology_pts, myHierarchyCache,
176 extra_attribs_to_unpack ,
177 extra_attribs_to_unpack ,
178 left_end_behavior, right_end_behavior,
213 AutoLock lock(getLock());
225 sopcache = &myHierarchyCache;
227 myEvaluator.evaluate(time, result, result_pts,
228 getFrameDetail(-1), topology_pts, *sopcache,
231 left_end_behavior, right_end_behavior,
236 is_anim_point_attrib,
259 sopcache = &myHierarchyCache;
261 myEvaluator.evaluate(time, result, result_pts,
262 getFrameDetail(-1), topology_pts, *sopcache,
265 left_end_behavior, right_end_behavior,
270 is_anim_point_attrib,
282 AutoLock lock(getLock());
283 myEvaluator.setScaleInheritance(getFrameDetail(-1),
291 bool constant_evaluation=
false)
293 AutoLock lock(getLock());
297 myEvaluator.computeLocalTransforms(time, result, presult, presult4,
298 constant_evaluation);
299 if (presult!=
nullptr)
307 if (!myNameToJointIdx.contains(joint_name))
309 return myNameToJointIdx.at(joint_name);
316 void getJointsInGroup(
324 return myIsInitialised;
341 return myEvaluator.getSampleTimes();
345 return myCanEvaluate;
356 void sortPrimitives(
GU_Detail *gdp,
bool clear_array);
394 bool constant_evaluation);
404 bool reset_missing_attribs,
405 bool constant_evaluation,
407 bool recompute_world,
433 bool reset_missing_attribs);
474 exint myLastEvalFrame;
483 bool myIsScaleInheritanceChanged;
494 Evaluator myEvaluator;
520 UT_Lock *getLock() {
return myEnableLocking ? &myLock :
nullptr; }
521 bool myEnableLocking;
535 bool myIsInitialised;
539 const bool myCanEvaluate;
554 bool can_evaluate =
true,
556 bool compute_default_clipinfo =
false,
557 bool do_sort_samples =
true,
558 bool enable_locking =
true);
628 bool recompute_local =
false,
629 bool is_key_pose =
false,
GU_HierarchyCache * myHierarchyCache
virtual bool updateGdp(const GU_Detail *gdp)
bool myUseRightEndBehavior
GT_API const UT_StringHolder time
UT_StringHolder myCenterOfMassName
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
**But if you need a result
UT_StringHolder myConfigAttribName
void computeLocalTransforms(fpreal time, UT_Array< GU_AgentXformD > &result, bool constant_evaluation=false)
#define GA_INVALID_OFFSET
bool myConstantEvaluation
void evaluateNoLock(fpreal time, GU_Detail *result, const EvaluationParms &evaluation_parms, const GA_PointGroup *result_pts=nullptr, const GA_PointGroup *topology_pts=nullptr, UT_ArrayStringMap< bool > *is_anim_point_attrib=nullptr)
GA_Offset myCenterOfMassPtoff
const UT_Array< fpreal > & getSampleTimes()
const GU_MotionClipInfo & clipInfo() const
friend class GU_MotionClipRW
const GA_AttributeFilter * myAnimAttribsToUnpack
bool updateGdp(const GU_Detail *gdp) override
bool myResetMissingAttribs
GU_MotionClipDataIds ourDataIds
void evaluate(fpreal time, GU_Detail *result, const EvaluationParms &evaluation_parms, const GA_PointGroup *result_pts=nullptr, const GA_PointGroup *topology_pts=nullptr, UT_ArrayStringMap< bool > *is_anim_point_attrib=nullptr)
GT_API const UT_StringHolder topology
bool updateGdpNC(GU_Detail *gdp)
bool myUseLeftEndBehavior
exint getJointIndex(const UT_StringHolder &joint_name) const
void setScaleInheritance(UT_ScaleInheritanceMode scale_inheritance)
const GA_AttributeFilter * myRestAttribsToUnpack
void evaluate(fpreal time, GU_Detail *result, const GA_PointGroup *result_pts=nullptr, const GA_PointGroup *topology_pts=nullptr, const GA_AttributeFilter *extra_attribs_to_unpack=nullptr, GU_MotionClipEndBehavior left_end_behavior=GU_MotionClipEndBehavior::Clamp, GU_MotionClipEndBehavior right_end_behavior=GU_MotionClipEndBehavior::Clamp)
const GU_Detail * restFrame() const
GU_MotionClipEndBehavior myLeftEndBehavior
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
bool isInitialised() const
GU_MotionClipEndBehavior myRightEndBehavior
GU_MotionClipBuilder(GU_MotionClipRW *clip)