Atoms Crowd  7.0.0
AtomsCore::Pose Class Reference

Pose class. More...

#include <Pose.h>

Public Types

typedef std::map< unsigned short, MapMetadataJointMetadataMap
 Joint metadata map.
 

Public Member Functions

 Pose ()
 Constructor.
 
 Pose (const Skeleton *skeleton, bool inParentSpace=false)
 Constructor. More...
 
 Pose (const Pose &rhs)
 Copy constructor.
 
 ~Pose ()
 Destructor.
 
Poseoperator= (const Pose &rhs)
 Assign operator.
 
void setNumberJoints (unsigned short n)
 Sets the number of joints. More...
 
unsigned short numJoints () const
 Gets the number of joints. More...
 
JointPosejointPose (unsigned short index)
 Gets the joint pose. More...
 
const JointPosejointPose (unsigned short index) const
 Gets the joint pose. More...
 
void setJointPose (unsigned short index, const JointPose &jointPose)
 Sets the joint pose. More...
 
void clearAllPose ()
 Clears all pose.
 
void setDirection (const AtomsCore::Vector3 &direction)
 Sets the pose direction. More...
 
const AtomsCore::Vector3getDirection () const
 Gets the pose direction. More...
 
bool jointHasMetadata (unsigned short index) const
 Checks if a joint has some metadata. More...
 
JointMetadataMapjointsMetadata ()
 Gets the joints metadata map. More...
 
const JointMetadataMapjointsMetadata () const
 Gets the joints metadata map. More...
 
MapMetadatajointMetadata (unsigned short index)
 Gets the joint metadata. More...
 
const MapMetadatajointMetadata (unsigned short index) const
 Gets the joint metadata. More...
 
void setJointMetadata (unsigned short index, const MapMetadata &data)
 Adds joint metadata. More...
 
void addJointMetadata (unsigned short index, const std::string &key, Metadata *data)
 Adds joint metadata. More...
 
void addJointMetadata (unsigned short index, const std::string &key, const AtomsPtr< Metadata > data)
 Adds joint metadata. More...
 
void clearJointMetadata (unsigned short index)
 Clears joint metadata. More...
 
MapMetadataposeMetadata ()
 Gets the pose metadata map. More...
 
const MapMetadataposeMetadata () const
 Gets the pose metadata map. More...
 
void addPoseMetadata (const std::string &key, Metadata *data)
 Adds the pose metadata. More...
 
void clearPoseMetadata ()
 Clears the pose metadata.
 
void clearJointsMetadata ()
 Clears all joint metadata.
 
size_t memSize () const
 Gets the memory size.
 
std::vector< unsigned short > jointMetadataIds () const
 Gets the ids of the joints that have some metadatas.
 
size_t hash (short roundBits=10) const
 Return the hash of this pose. More...
 
void resetActiveJoints ()
 
void setActiveJoints (const std::vector< short > &flags)
 
void setActiveJoint (size_t index, bool value)
 
bool isJointActive (size_t index) const
 
void setInParentSpace (bool flag)
 Sets use parent space flag.
 
bool inParentSpace () const
 Gets the parent space flag.
 
void convertToParentSpace (const Skeleton *skeleton)
 Converts this pose to parent space.
 
void convertToLocalSpace (const Skeleton *skeleton)
 Converts this pose to local space.
 

Detailed Description

Pose class.

A pose defines the transformations and metadatas of a set of joints.

Constructor & Destructor Documentation

◆ Pose()

AtomsCore::Pose::Pose ( const Skeleton skeleton,
bool  inParentSpace = false 
)

Constructor.

Parameters
skeletonSkeleton

Member Function Documentation

◆ addJointMetadata() [1/2]

void AtomsCore::Pose::addJointMetadata ( unsigned short  index,
const std::string &  key,
const AtomsPtr< Metadata data 
)
inline

Adds joint metadata.

Parameters
indexJoint index
keymetadata map key
datametadata

◆ addJointMetadata() [2/2]

void AtomsCore::Pose::addJointMetadata ( unsigned short  index,
const std::string &  key,
Metadata data 
)
inline

Adds joint metadata.

Parameters
indexJoint index
keymetadata map key
datametadata

◆ addPoseMetadata()

void AtomsCore::Pose::addPoseMetadata ( const std::string &  key,
Metadata data 
)
inline

Adds the pose metadata.

Parameters
keymetadata key
datametadata

◆ clearJointMetadata()

void AtomsCore::Pose::clearJointMetadata ( unsigned short  index)

Clears joint metadata.

Parameters
indexJoint index

◆ getDirection()

const AtomsCore::Vector3 & AtomsCore::Pose::getDirection ( ) const
inline

Gets the pose direction.

Returns
pose direction

◆ hash()

size_t AtomsCore::Pose::hash ( short  roundBits = 10) const

Return the hash of this pose.

The hash is computed without the root joint

◆ jointHasMetadata()

bool AtomsCore::Pose::jointHasMetadata ( unsigned short  index) const

Checks if a joint has some metadata.

Parameters
indexJoint index
Returns
Return true if joint has some metadata

◆ jointMetadata() [1/2]

MapMetadata & AtomsCore::Pose::jointMetadata ( unsigned short  index)
inline

Gets the joint metadata.

Parameters
indexJoint index
Returns
Joint metadata map

◆ jointMetadata() [2/2]

const MapMetadata& AtomsCore::Pose::jointMetadata ( unsigned short  index) const

Gets the joint metadata.

Parameters
indexJoint index
Returns
Joint metadata map

◆ jointPose() [1/2]

JointPose & AtomsCore::Pose::jointPose ( unsigned short  index)
inline

Gets the joint pose.

Returns
Joint pose

◆ jointPose() [2/2]

const JointPose & AtomsCore::Pose::jointPose ( unsigned short  index) const
inline

Gets the joint pose.

Returns
Joint pose

◆ jointsMetadata() [1/2]

Pose::JointMetadataMap & AtomsCore::Pose::jointsMetadata ( )
inline

Gets the joints metadata map.

Returns
Joints metadata map

◆ jointsMetadata() [2/2]

const Pose::JointMetadataMap & AtomsCore::Pose::jointsMetadata ( ) const
inline

Gets the joints metadata map.

Returns
Joints metadata map

◆ numJoints()

unsigned short AtomsCore::Pose::numJoints ( ) const
inline

Gets the number of joints.

Returns
Number of joints

◆ poseMetadata() [1/2]

MapMetadata & AtomsCore::Pose::poseMetadata ( )
inline

Gets the pose metadata map.

Returns
Pose metadata map

◆ poseMetadata() [2/2]

const MapMetadata & AtomsCore::Pose::poseMetadata ( ) const
inline

Gets the pose metadata map.

Returns
Pose metadata map

◆ setDirection()

void AtomsCore::Pose::setDirection ( const AtomsCore::Vector3 direction)
inline

Sets the pose direction.

Parameters
directionpelvis direction

◆ setJointMetadata()

void AtomsCore::Pose::setJointMetadata ( unsigned short  index,
const MapMetadata data 
)
inline

Adds joint metadata.

Parameters
indexJoint index
dataJoint metadata map

◆ setJointPose()

void AtomsCore::Pose::setJointPose ( unsigned short  index,
const JointPose jointPose 
)
inline

Sets the joint pose.

Parameters
indexjoint index
jointPoseJoint pose

◆ setNumberJoints()

void AtomsCore::Pose::setNumberJoints ( unsigned short  n)

Sets the number of joints.

Sets the number of joints this pose contains. All the data previosly stored is deleted before reallocate the space for the new number of joints

Parameters
nNumber of joint

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