PeriDyno 1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
dyno::JointTree< TDataType > Class Template Reference

A JointTree(Skeleton) represents a hierarchical tree structure of joints. More...

#include <JointTree.h>

Inheritance diagram for dyno::JointTree< TDataType >:
Collaboration diagram for dyno::JointTree< TDataType >:

Public Types

typedef TDataType::Real Real
 
typedef TDataType::Coord Coord
 
typedef TDataType::Matrix Matrix
 
typedef ::dyno::Mat4f Mat
 
- Public Types inherited from dyno::TopologyModule
typedef PointType Point
 
typedef VectorND< PointType, 2 > Edge
 
typedef Vector< PointType, 3 > Triangle
 
typedef VectorND< PointType, 4 > Quad
 
typedef VectorND< PointType, 4 > Tetrahedron
 
typedef VectorND< PointType, 5 > Pyramid
 
typedef VectorND< PointType, 6 > Pentahedron
 
typedef VectorND< PointType, 8 > Hexahedron
 
typedef VectorND< PointType, 2 > Edg2Tri
 
typedef VectorND< PointType, 3 > Tri2Edg
 
typedef VectorND< PointType, 2 > Edg2Quad
 
typedef VectorND< PointType, 4 > Quad2Edg
 
typedef VectorND< PointType, 2 > Tri2Tet
 
typedef VectorND< PointType, 4 > Tet2Tri
 
typedef VectorND< PointType, 2 > Tri2Quad
 
typedef VectorND< PointType, 2 > Quad2Hex
 
typedef VectorND< PointType, 2 > Edg2Hex
 
typedef VectorND< PointType, 2 > Edg2Poly
 
- Public Types inherited from dyno::OBase
typedef std::vector< FBase * > FieldVector
 
typedef std::map< FieldID, FBase * > FieldMap
 

Public Member Functions

 JointTree ()
 
 ~JointTree ()
 
void copyFrom (JointTree< TDataType > jointTree)
 
void scale (Real s)
 
void translate (Coord t)
 
void getGlobalTransform ()
 
Mat getTransform (Coord &T, Coord &R, Coord &S)
 
void getQuat (Coord &T, Coord &R, float &S)
 
void getGlobalQuat ()
 
Coord getCoordByMatrix (Coord X)
 
Coord getCoordByQuat (Coord X)
 
void getGlobalCoord ()
 
void setAnimTranslation (std::shared_ptr< AnimationCurve< TDataType > > t)
 
void setAnimRotation (std::shared_ptr< AnimationCurve< TDataType > > r)
 
void setAnimScaling (std::shared_ptr< AnimationCurve< TDataType > > s)
 
void applyAnimationByOne (Coord &init, Coord &cur, std::shared_ptr< AnimationCurve< TDataType > > &anim, Real ptime)
 
void applyAnimationAll (Real ptime)
 
- Public Member Functions inherited from dyno::TopologyModule
 TopologyModule ()
 
 ~TopologyModule () override
 
virtual int getDOF ()
 
void tagAsChanged ()
 
void tagAsUnchanged ()
 
bool isTopologyChanged ()
 
void update ()
 
- 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

unsigned long long id
 
Coord PreRotation
 
Coord PreScaling
 
Coord PreTranslation
 
Coord tmp
 
Coord LclTranslation
 
Coord LclRotation
 
Coord LclScaling
 
std::shared_ptr< AnimationCurve< TDataType > > AnimTranslation
 
std::shared_ptr< AnimationCurve< TDataType > > AnimRotation
 
std::shared_ptr< AnimationCurve< TDataType > > AnimScaling
 
Coord CurTranslation
 
Coord CurRotation
 
Coord CurScaling
 
Coord GlCoord
 
Coord LastCoord
 
Mat GlobalTransform
 
bool RotationActive
 
Quat< RealGlT
 
Quat< RealGlR
 
Real GlS
 
std::vector< std::shared_ptr< JointTree > > children
 
std::shared_ptr< JointTreeparent
 

Private Attributes

std::default_random_engine generator
 
std::normal_distribution< double > dist
 

Additional Inherited Members

- 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 Member Functions inherited from dyno::TopologyModule
virtual void updateTopology ()
 
- Protected Attributes inherited from dyno::OBase
std::vector< FBase * > fields_input
 
std::vector< FBase * > fields_output
 
std::vector< FBase * > fields_param
 

Detailed Description

template<typename TDataType>
class dyno::JointTree< TDataType >

A JointTree(Skeleton) represents a hierarchical tree structure of joints.

Definition at line 30 of file JointTree.h.

Member Typedef Documentation

◆ Coord

template<typename TDataType>
typedef TDataType::Coord dyno::JointTree< TDataType >::Coord

Definition at line 40 of file JointTree.h.

◆ Mat

template<typename TDataType>
typedef ::dyno::Mat4f dyno::JointTree< TDataType >::Mat

Definition at line 42 of file JointTree.h.

◆ Matrix

template<typename TDataType>
typedef TDataType::Matrix dyno::JointTree< TDataType >::Matrix

Definition at line 41 of file JointTree.h.

◆ Real

template<typename TDataType>
typedef TDataType::Real dyno::JointTree< TDataType >::Real

Definition at line 39 of file JointTree.h.

Constructor & Destructor Documentation

◆ JointTree()

template<typename TDataType>
dyno::JointTree< TDataType >::JointTree ( )

Definition at line 13 of file JointTree.cpp.

Here is the caller graph for this function:

◆ ~JointTree()

template<typename TDataType>
dyno::JointTree< TDataType >::~JointTree ( )

Definition at line 33 of file JointTree.cpp.

Member Function Documentation

◆ applyAnimationAll()

template<typename TDataType>
void dyno::JointTree< TDataType >::applyAnimationAll ( Real ptime)

Definition at line 216 of file JointTree.cpp.

Here is the call graph for this function:

◆ applyAnimationByOne()

template<typename TDataType>
void dyno::JointTree< TDataType >::applyAnimationByOne ( Coord & init,
Coord & cur,
std::shared_ptr< AnimationCurve< TDataType > > & anim,
Real ptime )

Definition at line 209 of file JointTree.cpp.

Here is the caller graph for this function:

◆ copyFrom()

template<typename TDataType>
void dyno::JointTree< TDataType >::copyFrom ( JointTree< TDataType > jointTree)

Definition at line 176 of file JointTree.cpp.

Here is the call graph for this function:

◆ getCoordByMatrix()

template<typename TDataType>
JointTree< TDataType >::Coord dyno::JointTree< TDataType >::getCoordByMatrix ( Coord X)

Definition at line 154 of file JointTree.cpp.

◆ getCoordByQuat()

template<typename TDataType>
JointTree< TDataType >::Coord dyno::JointTree< TDataType >::getCoordByQuat ( Coord X)

Definition at line 161 of file JointTree.cpp.

Here is the caller graph for this function:

◆ getGlobalCoord()

template<typename TDataType>
void dyno::JointTree< TDataType >::getGlobalCoord ( )

Definition at line 169 of file JointTree.cpp.

Here is the call graph for this function:

◆ getGlobalQuat()

template<typename TDataType>
void dyno::JointTree< TDataType >::getGlobalQuat ( )

Definition at line 129 of file JointTree.cpp.

Here is the call graph for this function:

◆ getGlobalTransform()

template<typename TDataType>
void dyno::JointTree< TDataType >::getGlobalTransform ( )

Definition at line 82 of file JointTree.cpp.

Here is the call graph for this function:

◆ getQuat()

template<typename TDataType>
void dyno::JointTree< TDataType >::getQuat ( Coord & T,
Coord & R,
float & S )

Definition at line 103 of file JointTree.cpp.

Here is the caller graph for this function:

◆ getTransform()

template<typename TDataType>
JointTree< TDataType >::Mat dyno::JointTree< TDataType >::getTransform ( Coord & T,
Coord & R,
Coord & S )

Definition at line 40 of file JointTree.cpp.

Here is the caller graph for this function:

◆ scale()

template<typename TDataType>
void dyno::JointTree< TDataType >::scale ( Real s)

Definition at line 197 of file JointTree.cpp.

◆ setAnimRotation()

template<typename TDataType>
void dyno::JointTree< TDataType >::setAnimRotation ( std::shared_ptr< AnimationCurve< TDataType > > r)
inline

Definition at line 64 of file JointTree.h.

◆ setAnimScaling()

template<typename TDataType>
void dyno::JointTree< TDataType >::setAnimScaling ( std::shared_ptr< AnimationCurve< TDataType > > s)
inline

Definition at line 68 of file JointTree.h.

◆ setAnimTranslation()

template<typename TDataType>
void dyno::JointTree< TDataType >::setAnimTranslation ( std::shared_ptr< AnimationCurve< TDataType > > t)
inline

Definition at line 60 of file JointTree.h.

◆ translate()

template<typename TDataType>
void dyno::JointTree< TDataType >::translate ( Coord t)

Definition at line 203 of file JointTree.cpp.

Member Data Documentation

◆ AnimRotation

template<typename TDataType>
std::shared_ptr<AnimationCurve<TDataType> > dyno::JointTree< TDataType >::AnimRotation

Definition at line 90 of file JointTree.h.

◆ AnimScaling

template<typename TDataType>
std::shared_ptr<AnimationCurve<TDataType> > dyno::JointTree< TDataType >::AnimScaling

Definition at line 91 of file JointTree.h.

◆ AnimTranslation

template<typename TDataType>
std::shared_ptr<AnimationCurve<TDataType> > dyno::JointTree< TDataType >::AnimTranslation

Definition at line 89 of file JointTree.h.

◆ children

template<typename TDataType>
std::vector<std::shared_ptr<JointTree> > dyno::JointTree< TDataType >::children

Definition at line 105 of file JointTree.h.

◆ CurRotation

template<typename TDataType>
Coord dyno::JointTree< TDataType >::CurRotation

Definition at line 94 of file JointTree.h.

◆ CurScaling

template<typename TDataType>
Coord dyno::JointTree< TDataType >::CurScaling

Definition at line 95 of file JointTree.h.

◆ CurTranslation

template<typename TDataType>
Coord dyno::JointTree< TDataType >::CurTranslation

Definition at line 93 of file JointTree.h.

◆ dist

template<typename TDataType>
std::normal_distribution<double> dyno::JointTree< TDataType >::dist
private

Definition at line 35 of file JointTree.h.

◆ generator

template<typename TDataType>
std::default_random_engine dyno::JointTree< TDataType >::generator
private

Definition at line 34 of file JointTree.h.

◆ GlCoord

template<typename TDataType>
Coord dyno::JointTree< TDataType >::GlCoord

Definition at line 97 of file JointTree.h.

◆ GlobalTransform

template<typename TDataType>
Mat dyno::JointTree< TDataType >::GlobalTransform

Definition at line 99 of file JointTree.h.

◆ GlR

template<typename TDataType>
Quat<Real> dyno::JointTree< TDataType >::GlR

Definition at line 103 of file JointTree.h.

◆ GlS

template<typename TDataType>
Real dyno::JointTree< TDataType >::GlS

Definition at line 104 of file JointTree.h.

◆ GlT

template<typename TDataType>
Quat<Real> dyno::JointTree< TDataType >::GlT

Definition at line 102 of file JointTree.h.

◆ id

template<typename TDataType>
unsigned long long dyno::JointTree< TDataType >::id

Definition at line 77 of file JointTree.h.

◆ LastCoord

template<typename TDataType>
Coord dyno::JointTree< TDataType >::LastCoord

Definition at line 98 of file JointTree.h.

◆ LclRotation

template<typename TDataType>
Coord dyno::JointTree< TDataType >::LclRotation

Definition at line 86 of file JointTree.h.

◆ LclScaling

template<typename TDataType>
Coord dyno::JointTree< TDataType >::LclScaling

Definition at line 87 of file JointTree.h.

◆ LclTranslation

template<typename TDataType>
Coord dyno::JointTree< TDataType >::LclTranslation

Definition at line 85 of file JointTree.h.

◆ parent

template<typename TDataType>
std::shared_ptr<JointTree> dyno::JointTree< TDataType >::parent

Definition at line 106 of file JointTree.h.

◆ PreRotation

template<typename TDataType>
Coord dyno::JointTree< TDataType >::PreRotation

Definition at line 79 of file JointTree.h.

◆ PreScaling

template<typename TDataType>
Coord dyno::JointTree< TDataType >::PreScaling

Definition at line 80 of file JointTree.h.

◆ PreTranslation

template<typename TDataType>
Coord dyno::JointTree< TDataType >::PreTranslation

Definition at line 81 of file JointTree.h.

◆ RotationActive

template<typename TDataType>
bool dyno::JointTree< TDataType >::RotationActive

Definition at line 100 of file JointTree.h.

◆ tmp

template<typename TDataType>
Coord dyno::JointTree< TDataType >::tmp

Definition at line 83 of file JointTree.h.


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