HDK
|
#include <GU_MotionClip.h>
Classes | |
struct | EvaluationParms |
Public Member Functions | |
GU_MotionClipRO (const GU_Detail *gdp, UT_WorkBuffer &err_msg, bool can_evaluate=true, GU_MotionClipInfo *clipinfo=nullptr, bool compute_default_clipinfo=false, bool do_sort_samples=true, bool enable_locking=true) | |
clipinfo will override the gdp's clipinfo detail attribute More... | |
virtual | ~GU_MotionClipRO ()=default |
virtual bool | updateGdp (const GU_Detail *gdp) |
void | getTopology (fpreal &time, GU_Detail *dest, const GA_AttributeFilter *skip=nullptr) |
bool | hasTopology () const |
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) |
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) |
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) |
void | setScaleInheritance (UT_ScaleInheritanceMode scale_inheritance) |
void | computeLocalTransforms (fpreal time, UT_Array< GU_AgentXformD > &result, bool constant_evaluation=false) |
exint | getJointIndex (const UT_StringHolder &joint_name) const |
const GA_PointGroup * | getJointGroup (GOP_Manager &gop, const UT_StringHolder &pattern) const |
void | getJointsInGroup (GOP_Manager &gop, const UT_StringHolder &pattern, UT_StringArray &joints_in_group) const |
bool | isInitialised () const |
exint | numJoints () const |
const GU_MotionClipInfo & | clipInfo () const |
const GU_Detail * | getSample (fpreal time) const |
returns the sample at time, or nullptr if not found More... | |
const GU_Detail * | restFrame () const |
void | getSortedFrameOrder (UT_Array< exint > &frame_order) |
const UT_Array< fpreal > & | getSampleTimes () |
bool | canEvaluate () const |
Protected Member Functions | |
void | sortPrimitives (GU_Detail *gdp, bool clear_array) |
Protected Attributes | |
const GU_Detail * | ourGdp |
GU_MotionClipDataIds | ourDataIds |
Friends | |
class | GU_MotionClipRW |
class | GU_MotionClipBuilder |
Read-only animation clip represented in geometry as packed primitives.
The first packed geometry primitive contains the skeleton "topology" evaluated at the given rest frame and the remaining packed geometry primitives each represent a cached pose (ie. a KineFX skeleton), each containing a list of points with joint names and transforms. For each pose, the time
primitive attribute represents where it should be in seconds.
Note that the joints in the pose packed primitives must exist in the topology packed primitive, but the converse is not necessarily true. The pose packed primitive may be missing particular joints from the topology packed primitive, in which case, interpolation will be done using adjacent pose packed primitives which do have data for the particular joint.
Definition at line 55 of file GU_MotionClip.h.
GU_MotionClipRO::GU_MotionClipRO | ( | const GU_Detail * | gdp, |
UT_WorkBuffer & | err_msg, | ||
bool | can_evaluate = true , |
||
GU_MotionClipInfo * | clipinfo = nullptr , |
||
bool | compute_default_clipinfo = false , |
||
bool | do_sort_samples = true , |
||
bool | enable_locking = true |
||
) |
clipinfo will override the gdp's clipinfo detail attribute
|
virtualdefault |
|
inline |
Definition at line 344 of file GU_MotionClip.h.
|
inline |
Definition at line 332 of file GU_MotionClip.h.
|
inline |
This computes the local transforms of each joint at the given time. The ith element defines represents the ith joint in the topology detail. getJointIndex can be used to check this
Definition at line 289 of file GU_MotionClip.h.
|
inline |
This will compute the frame at the given time, and then copy the P+transform attributes of the ith point in topologyPts into the ith point in resultPts.
It will also include whatever extra attribs you request as long as there is no current active GU_MotionClipBuilder
Definition at line 166 of file GU_MotionClip.h.
|
inline |
This will compute the frame at the given time, and then copy the P+transform attributes of the ith point in topologyPts into the ith point in resultPts.
It will also include whatever extra attribs you request as long as there is no current active GU_MotionClipBuilder
The parameters used to define the interpolation must be set by in an EvaluationParms structure.
Definition at line 207 of file GU_MotionClip.h.
|
inline |
Definition at line 241 of file GU_MotionClip.h.
const GA_PointGroup* GU_MotionClipRO::getJointGroup | ( | GOP_Manager & | gop, |
const UT_StringHolder & | pattern | ||
) | const |
Returns a point group of the topology detail based on the given pattern
|
inline |
Returns the index of the given joint name within the topology detail
Definition at line 305 of file GU_MotionClip.h.
void GU_MotionClipRO::getJointsInGroup | ( | GOP_Manager & | gop, |
const UT_StringHolder & | pattern, | ||
UT_StringArray & | joints_in_group | ||
) | const |
returns the sample at time, or nullptr if not found
Definition at line 340 of file GU_MotionClip.h.
void GU_MotionClipRO::getTopology | ( | fpreal & | time, |
GU_Detail * | dest, | ||
const GA_AttributeFilter * | skip = nullptr |
||
) |
Appends the unpacked toplogy geometry to dest
|
inline |
Definition at line 154 of file GU_MotionClip.h.
|
inline |
returns false if there was an error during initialization
Definition at line 322 of file GU_MotionClip.h.
|
inline |
Definition at line 327 of file GU_MotionClip.h.
|
inline |
Definition at line 336 of file GU_MotionClip.h.
|
inline |
Definition at line 280 of file GU_MotionClip.h.
|
virtual |
Reimplemented in GU_MotionClipRW.
|
friend |
Definition at line 360 of file GU_MotionClip.h.
|
friend |
Definition at line 359 of file GU_MotionClip.h.
|
protected |
Definition at line 354 of file GU_MotionClip.h.
|
protected |
Definition at line 349 of file GU_MotionClip.h.