PeriDyno 1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dyno::JointAnimationInfo Class Reference

#include <JointInfo.h>

Inheritance diagram for dyno::JointAnimationInfo:
Collaboration diagram for dyno::JointAnimationInfo:

Public Member Functions

 JointAnimationInfo ()
 
 ~JointAnimationInfo ()
 
void setAnimationData (std::map< joint, std::vector< Vec3f > > &jointTranslation, std::map< joint, std::vector< Real > > &jointTimeCodeTranslation, std::map< joint, std::vector< Vec3f > > &jointScale, std::map< joint, std::vector< Real > > &jointIndexTimeCodeScale, std::map< joint, std::vector< Quat1f > > &jointRotation, std::map< joint, std::vector< Real > > &jointIndexRotation, std::shared_ptr< JointInfo > skeleton)
 
void updateJointsTransform (float time)
 
Transform3f updateTransform (joint jId, float time)
 
std::vector< Vec3fgetJointsTranslation (float time)
 
std::vector< Quat1fgetJointsRotation (float time)
 
std::vector< Vec3fgetJointsScale (float time)
 
float getTotalTime ()
 
int findMaxSmallerIndex (const std::vector< float > &arr, float v)
 
Vec3f lerp (Vec3f v0, Vec3f v1, float weight)
 
Quat< Realnormalize (const Quat< Real > &q)
 
Quat< Realslerp (const Quat< Real > &q1, const Quat< Real > &q2, float weight)
 
Quat< Realnlerp (const Quat< Real > &q1, const Quat< Real > &q2, float weight)
 
std::vector< int > getJointDir (int Index, std::map< int, std::vector< int > > joint_Dir)
 
void setLoop (bool loop)
 
Pose getPose (float inTime)
 
void updateAnimationPose (float inTime)
 
float getCurrentAnimationTime ()
 
float & getBlendInTime ()
 
float & getBlendOutTime ()
 
float & getPlayRate ()
 
- Public Member Functions inherited from dyno::OBase
 OBase ()
 
 ~OBase () override
 
virtual std::string caption ()
 Return the caption.
 
virtual bool captionVisible ()
 Whether to hide the caption in the GUI.
 
virtual std::string description ()
 Return a description for the node or module, override this function to support user-defined description.
 
virtual std::string getName ()
 
bool addField (FBase *data)
 Add a field to Base FieldID will be set to the name of Field by default.
 
bool addField (FieldID name, FBase *data)
 Add a field to Base.
 
bool addFieldAlias (FieldID name, FBase *data)
 
bool addFieldAlias (FieldID name, FBase *data, FieldMap &fieldAlias)
 
bool findField (FBase *data)
 Find a field by its pointer.
 
bool findFieldAlias (const FieldID name)
 Find a field by its name.
 
bool findFieldAlias (const FieldID name, FieldMap &fieldAlias)
 Find a field in fieldAlias by its name This function is typically called by other functions.
 
bool removeField (FBase *data)
 Remove a field by its pointer.
 
bool removeFieldAlias (const FieldID name)
 Remove a field by its name.
 
bool removeFieldAlias (const FieldID name, FieldMap &fieldAlias)
 
FBasegetField (const FieldID name)
 Return a field by its name.
 
std::vector< FBase * > & getAllFields ()
 
virtual bool attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true)
 Attach a field to Base.
 
template<typename T>
TgetField (FieldID name)
 
bool isAllFieldsReady ()
 Check the completeness of all required fields.
 
std::vector< FieldIDgetFieldAlias (FBase *data)
 
int getFieldAliasCount (FBase *data)
 
void setBlockCoord (float x, float y)
 
float bx ()
 
float by ()
 
bool findInputField (FBase *field)
 
bool addInputField (FBase *field)
 
bool removeInputField (FBase *field)
 
std::vector< FBase * > & getInputFields ()
 
bool findOutputField (FBase *field)
 
bool addOutputField (FBase *field)
 
bool addToOutput (FBase *field)
 
bool removeOutputField (FBase *field)
 
bool removeFromOutput (FBase *field)
 
std::vector< FBase * > & getOutputFields ()
 
bool findParameter (FBase *field)
 
bool addParameter (FBase *field)
 
bool removeParameter (FBase *field)
 
std::vector< FBase * > & getParameters ()
 
- Public Member Functions inherited from dyno::Object
 Object ()
 
virtual ~Object ()
 
ObjectId objectId ()
 

Public Attributes

std::shared_ptr< JointInfomSkeleton = NULL
 
std::map< joint, std::vector< Vec3f > > mJoint_Index_Translation
 
std::map< joint, std::vector< Real > > mJoint_Index_TimeCode_Translation
 
std::map< joint, std::vector< Vec3f > > mJoint_Index_Scale
 
std::map< joint, std::vector< Real > > mJoint_Index_TimeCode_Scale
 
std::map< joint, std::vector< Quat1f > > mJoint_Index_Rotation
 
std::map< joint, std::vector< Real > > mJoint_Index_TimeCode_Rotation
 

Private Types

typedef int joint
 

Private Attributes

std::vector< Vec3fmTranslation
 
std::vector< Vec3fmScale
 
std::vector< Quat1fmRotation
 
DArray< Mat4fmJointWorldMatrix
 
float mTotalTime = 0
 
float currentTime = -1
 
bool mLoop = true
 
float mBlendInTime = 0.0f
 
float mBlendOutTime = 0.0f
 
float mPlayRate = 1.0f
 
float mAnimationTime = 0.0f
 

Additional Inherited Members

- Public Types inherited from dyno::OBase
typedef std::vector< FBase * > FieldVector
 
typedef std::map< FieldID, FBase * > FieldMap
 
- Static Public Member Functions inherited from dyno::Object
static bool registerClass (ClassInfo *ci)
 
static ObjectcreateObject (std::string name)
 
static std::map< std::string, ClassInfo * > * getClassMap ()
 
static ObjectId baseId ()
 Base Id.
 
- Protected Attributes inherited from dyno::OBase
std::vector< FBase * > fields_input
 
std::vector< FBase * > fields_output
 
std::vector< FBase * > fields_param
 

Detailed Description

Definition at line 122 of file JointInfo.h.

Member Typedef Documentation

◆ joint

typedef int dyno::JointAnimationInfo::joint
private

Definition at line 125 of file JointInfo.h.

Constructor & Destructor Documentation

◆ JointAnimationInfo()

dyno::JointAnimationInfo::JointAnimationInfo ( )
inline

Definition at line 129 of file JointInfo.h.

◆ ~JointAnimationInfo()

dyno::JointAnimationInfo::~JointAnimationInfo ( )

Member Function Documentation

◆ findMaxSmallerIndex()

int dyno::JointAnimationInfo::findMaxSmallerIndex ( const std::vector< float > & arr,
float v )

◆ getBlendInTime()

float & dyno::JointAnimationInfo::getBlendInTime ( )
inline

Definition at line 181 of file JointInfo.h.

◆ getBlendOutTime()

float & dyno::JointAnimationInfo::getBlendOutTime ( )
inline

Definition at line 183 of file JointInfo.h.

◆ getCurrentAnimationTime()

float dyno::JointAnimationInfo::getCurrentAnimationTime ( )
inline

Definition at line 179 of file JointInfo.h.

◆ getJointDir()

std::vector< int > dyno::JointAnimationInfo::getJointDir ( int Index,
std::map< int, std::vector< int > > joint_Dir )

◆ getJointsRotation()

std::vector< Quat1f > dyno::JointAnimationInfo::getJointsRotation ( float time)

◆ getJointsScale()

std::vector< Vec3f > dyno::JointAnimationInfo::getJointsScale ( float time)

◆ getJointsTranslation()

std::vector< Vec3f > dyno::JointAnimationInfo::getJointsTranslation ( float time)

◆ getPlayRate()

float & dyno::JointAnimationInfo::getPlayRate ( )
inline

Definition at line 185 of file JointInfo.h.

◆ getPose()

Pose dyno::JointAnimationInfo::getPose ( float inTime)
Here is the caller graph for this function:

◆ getTotalTime()

float dyno::JointAnimationInfo::getTotalTime ( )
inline

Definition at line 154 of file JointInfo.h.

◆ lerp()

Vec3f dyno::JointAnimationInfo::lerp ( Vec3f v0,
Vec3f v1,
float weight )

◆ nlerp()

Quat< Real > dyno::JointAnimationInfo::nlerp ( const Quat< Real > & q1,
const Quat< Real > & q2,
float weight )

◆ normalize()

Quat< Real > dyno::JointAnimationInfo::normalize ( const Quat< Real > & q)

◆ setAnimationData()

void dyno::JointAnimationInfo::setAnimationData ( std::map< joint, std::vector< Vec3f > > & jointTranslation,
std::map< joint, std::vector< Real > > & jointTimeCodeTranslation,
std::map< joint, std::vector< Vec3f > > & jointScale,
std::map< joint, std::vector< Real > > & jointIndexTimeCodeScale,
std::map< joint, std::vector< Quat1f > > & jointRotation,
std::map< joint, std::vector< Real > > & jointIndexRotation,
std::shared_ptr< JointInfo > skeleton )

◆ setLoop()

void dyno::JointAnimationInfo::setLoop ( bool loop)
inline

Definition at line 168 of file JointInfo.h.

◆ slerp()

Quat< Real > dyno::JointAnimationInfo::slerp ( const Quat< Real > & q1,
const Quat< Real > & q2,
float weight )

◆ updateAnimationPose()

void dyno::JointAnimationInfo::updateAnimationPose ( float inTime)
inline

Definition at line 172 of file JointInfo.h.

Here is the call graph for this function:

◆ updateJointsTransform()

void dyno::JointAnimationInfo::updateJointsTransform ( float time)

◆ updateTransform()

Transform3f dyno::JointAnimationInfo::updateTransform ( joint jId,
float time )

Member Data Documentation

◆ currentTime

float dyno::JointAnimationInfo::currentTime = -1
private

Definition at line 211 of file JointInfo.h.

◆ mAnimationTime

float dyno::JointAnimationInfo::mAnimationTime = 0.0f
private

Definition at line 218 of file JointInfo.h.

◆ mBlendInTime

float dyno::JointAnimationInfo::mBlendInTime = 0.0f
private

Definition at line 214 of file JointInfo.h.

◆ mBlendOutTime

float dyno::JointAnimationInfo::mBlendOutTime = 0.0f
private

Definition at line 215 of file JointInfo.h.

◆ mJoint_Index_Rotation

std::map<joint, std::vector<Quat1f> > dyno::JointAnimationInfo::mJoint_Index_Rotation

Definition at line 198 of file JointInfo.h.

◆ mJoint_Index_Scale

std::map<joint, std::vector<Vec3f> > dyno::JointAnimationInfo::mJoint_Index_Scale

Definition at line 195 of file JointInfo.h.

◆ mJoint_Index_TimeCode_Rotation

std::map<joint, std::vector<Real> > dyno::JointAnimationInfo::mJoint_Index_TimeCode_Rotation

Definition at line 199 of file JointInfo.h.

◆ mJoint_Index_TimeCode_Scale

std::map<joint, std::vector<Real> > dyno::JointAnimationInfo::mJoint_Index_TimeCode_Scale

Definition at line 196 of file JointInfo.h.

◆ mJoint_Index_TimeCode_Translation

std::map<joint, std::vector<Real> > dyno::JointAnimationInfo::mJoint_Index_TimeCode_Translation

Definition at line 193 of file JointInfo.h.

◆ mJoint_Index_Translation

std::map<joint, std::vector<Vec3f> > dyno::JointAnimationInfo::mJoint_Index_Translation

Definition at line 192 of file JointInfo.h.

◆ mJointWorldMatrix

DArray<Mat4f> dyno::JointAnimationInfo::mJointWorldMatrix
private

Definition at line 207 of file JointInfo.h.

◆ mLoop

bool dyno::JointAnimationInfo::mLoop = true
private

Definition at line 213 of file JointInfo.h.

◆ mPlayRate

float dyno::JointAnimationInfo::mPlayRate = 1.0f
private

Definition at line 216 of file JointInfo.h.

◆ mRotation

std::vector<Quat1f> dyno::JointAnimationInfo::mRotation
private

Definition at line 205 of file JointInfo.h.

◆ mScale

std::vector<Vec3f> dyno::JointAnimationInfo::mScale
private

Definition at line 204 of file JointInfo.h.

◆ mSkeleton

std::shared_ptr<JointInfo> dyno::JointAnimationInfo::mSkeleton = NULL

Definition at line 189 of file JointInfo.h.

◆ mTotalTime

float dyno::JointAnimationInfo::mTotalTime = 0
private

Definition at line 209 of file JointInfo.h.

◆ mTranslation

std::vector<Vec3f> dyno::JointAnimationInfo::mTranslation
private

Definition at line 203 of file JointInfo.h.


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