Atoms Crowd  7.0.0
Atoms::AgentType Class Reference

Agent type. More...

#include <AgentType.h>

Classes

struct  RetargetJointChainData
 

Public Types

enum  RetargetMethodType { kPelvisToFeet = 0 , kFootRootToFootIK , kBoundingBox , kUserValue }
 
enum  FacingDirection {
  kX = 0 , kY , kZ , kNegativeX ,
  kNegativeY , kNegativeZ
}
 

Public Member Functions

 AgentType ()
 Constructor.
 
 AgentType (unsigned int numJoints)
 Constructor. More...
 
 AgentType (const AtomsCore::Skeleton &skeleton)
 Constructor. More...
 
 ~AgentType ()
 Destructor.
 
AtomsCore::Skeletonskeleton ()
 Gets the agent type skeleton. More...
 
const AtomsCore::Skeletonskeleton () const
 Gets the agent type skeleton. More...
 
void setSkeleton (const AtomsCore::Skeleton &skeleton)
 Sets the agent type skeleton. More...
 
AtomsCore::MapMetadatametadata ()
 Gets the metadata map. More...
 
const AtomsCore::MapMetadatametadata () const
 Gets the metadata map. More...
 
const std::string & name () const
 Get name.
 
void setName (const std::string &name)
 Set name.
 
void setRetargetingFactorMethod (const RetargetMethodType method=kPelvisToFeet, const double userFactor=1.0)
 set agent type retargeting method
 
const RetargetMethodType getRetargetingFactorMethod () const
 get the retargeting factor method
 
const double getRetargetingUserFactor () const
 get the retargeting factor provided by the user
 
const double evaluateRetargetingFactor (const RetargetMethodType method=kPelvisToFeet, const double userFactor=1.0) const
 evaluates the retargeting factor
 
const double getRetargetingFactor () const
 gets the retargeting factor
 
size_t memSize ()
 Get memory size.
 
void hash (AtomsCore::MurmurHash3 &h) const
 Get hash.
 
void loadCharacterization ()
 Fill characterization joint chains.
 
const std::vector< AtomsCore::JointChain > & jointChains () const
 Gets characterization joint chains.
 
const std::vector< AtomsCore::Matrix > & retargetJointRefWorldMatrix () const
 Gets characterization joint worldMatrix in ref pose.
 
const std::vector< AtomsCore::Quaternion > & retargetJointOffset () const
 Gets characterization joint rotation offset.
 
void initializeRetargeting (const std::string &other)
 Fill retarget data relative to the given other agent type (other as source, this as target)
 
const std::vector< RetargetJointChainData > & retargetData (const std::string &other) const
 Gets retarget data map (a key for each other agent types as source)
 
const bool hasRetargetData (const std::string &other) const
 Gets if the given agent type is included in the retarget catalog.
 
double getPelvisHeight () const
 Returns the distance from the first foot to the height.
 
double collisionRadius () const
 Get collision radius.
 
void setCollisionRadius (double value)
 Set collision radius.
 
void setVirtualRoot (const bool value, const AtomsCore::Vector3 &position)
 Add virtual root. More...
 
bool hasVirtualRoot () const
 Returns if this agent type has a virtual root.
 
const AtomsCore::Vector3virtualRootPosition () const
 Get virtual root position.
 
FacingDirection getFacingDirection () const
 Get facing direction.
 
void setFacingDirection (FacingDirection direction)
 Set facing direction.
 

Detailed Description

Agent type.

This class describes an agent type. An agent type contains a skeleton and a metadata map. The metadata map should have two entries for the low res and high res meshes.

Constructor & Destructor Documentation

◆ AgentType() [1/2]

Atoms::AgentType::AgentType ( unsigned int  numJoints)

Constructor.

Parameters
numJointsNumber fo joints

◆ AgentType() [2/2]

Atoms::AgentType::AgentType ( const AtomsCore::Skeleton skeleton)

Constructor.

Parameters
skeletonSkeleton

Member Function Documentation

◆ metadata() [1/2]

AtomsCore::MapMetadata & Atoms::AgentType::metadata ( )
inline

Gets the metadata map.

Returns
Agent type metadata map

◆ metadata() [2/2]

const AtomsCore::MapMetadata & Atoms::AgentType::metadata ( ) const
inline

Gets the metadata map.

Returns
Agent type metadata map

◆ setSkeleton()

void Atoms::AgentType::setSkeleton ( const AtomsCore::Skeleton skeleton)

Sets the agent type skeleton.

Parameters
skeletonSkeleton

◆ setVirtualRoot()

void Atoms::AgentType::setVirtualRoot ( const bool  value,
const AtomsCore::Vector3 position 
)

Add virtual root.

Parameters
valuevirtual root status
positionthe position of the virtual root

◆ skeleton() [1/2]

AtomsCore::Skeleton & Atoms::AgentType::skeleton ( )
inline

Gets the agent type skeleton.

Returns
Skeleton

◆ skeleton() [2/2]

const AtomsCore::Skeleton & Atoms::AgentType::skeleton ( ) const
inline

Gets the agent type skeleton.

Returns
Skeleton

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