HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_MotionClipRO Class Reference

#include <GU_MotionClip.h>

+ Inheritance diagram for GU_MotionClipRO:

Public Member Functions

 GU_MotionClipRO (const GU_Detail *gdp, UT_WorkBuffer &err_msg, bool can_evaluate=true, GU_MotionClipInfo *clipinfo=nullptr)
 clipinfo will override the gdp's clipinfo detail attribute More...
 
 ~GU_MotionClipRO ()=default
 
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 computeLocalTransforms (fpreal time, UT_Array< GU_AgentXformD > &result)
 
exint getJointIndex (const UT_StringHolder &joint_name) const
 
const GA_PointGroupgetJointGroup (GOP_Manager &gop, const UT_StringHolder &pattern) const
 
bool isInitialised () const
 
exint numJoints () const
 
const GU_DetailgetSample (fpreal time) const
 returns the sample at time, or nullptr if not found More...
 
const GU_DetailrestFrame () const
 
const UT_Array< fpreal > & getSampleTimes ()
 

Protected Attributes

const GU_Detail *const ourGdp
 

Friends

class GU_MotionClipRW
 
class GU_MotionClipBuilder
 

Detailed Description

Definition at line 34 of file GU_MotionClip.h.

Constructor & Destructor Documentation

GU_MotionClipRO::GU_MotionClipRO ( const GU_Detail gdp,
UT_WorkBuffer err_msg,
bool  can_evaluate = true,
GU_MotionClipInfo clipinfo = nullptr 
)

clipinfo will override the gdp's clipinfo detail attribute

GU_MotionClipRO::~GU_MotionClipRO ( )
default

Member Function Documentation

void GU_MotionClipRO::computeLocalTransforms ( fpreal  time,
UT_Array< GU_AgentXformD > &  result 
)
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 80 of file GU_MotionClip.h.

void GU_MotionClipRO::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 
)
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

Precondition
resultPts and topologyPts must correspond to the same points in their respective geometries, in the same order.

Definition at line 63 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

exint GU_MotionClipRO::getJointIndex ( const UT_StringHolder joint_name) const
inline

Returns the index of the given joint name within the topology detail

Definition at line 89 of file GU_MotionClip.h.

const GU_Detail* GU_MotionClipRO::getSample ( fpreal  time) const

returns the sample at time, or nullptr if not found

const UT_Array<fpreal>& GU_MotionClipRO::getSampleTimes ( )
inline

Definition at line 117 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

bool GU_MotionClipRO::hasTopology ( ) const
inline

Definition at line 51 of file GU_MotionClip.h.

bool GU_MotionClipRO::isInitialised ( ) const
inline

returns false if there was an error during initialization

Definition at line 103 of file GU_MotionClip.h.

exint GU_MotionClipRO::numJoints ( ) const
inline

Definition at line 108 of file GU_MotionClip.h.

const GU_Detail* GU_MotionClipRO::restFrame ( ) const
inline

Definition at line 115 of file GU_MotionClip.h.

Friends And Related Function Documentation

friend class GU_MotionClipBuilder
friend

Definition at line 126 of file GU_MotionClip.h.

friend class GU_MotionClipRW
friend

Definition at line 125 of file GU_MotionClip.h.

Member Data Documentation

const GU_Detail* const GU_MotionClipRO::ourGdp
protected

Definition at line 122 of file GU_MotionClip.h.


The documentation for this class was generated from the following file: