Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Skeleton Class Reference

#include <StdSkeletons.h>

Public Member Functions

 Skeleton ()
 Default constructor - don't use; use FindSkeleton instead. More...
 
 ~Skeleton ()
 
int GetBoneCount () const
 Returns the number of bones in the standard-skeleton which this current skeleton is mapped onto. More...
 
int GetBoneID (const std::string &name) const
 Returns the ID number of the standard-skeleton bone, which corresponds to the named nonstandard-skeleton bone. More...
 
int GetRealBoneID (const std::string &name) const
 Similar to GetBoneID, but only returns a value for the most important (first) nonstandard-skeleton bone for each standard bone; returns -1 in other cases. More...
 

Static Public Member Functions

static const SkeletonFindSkeleton (const std::string &rootBoneName)
 Tries to find a skeleton that matches the given root bone name. More...
 
static void LoadSkeletonDataFromXml (const char *xmlData, size_t xmlLength, std::string &xmlErrors)
 Initialises the global state with skeleton data loaded from the given XML data. More...
 

Public Attributes

std::unique_ptr< Skeleton_implm
 

Private Member Functions

 Skeleton (Skeleton &)
 

Constructor & Destructor Documentation

◆ Skeleton() [1/2]

Skeleton::Skeleton ( )

Default constructor - don't use; use FindSkeleton instead.

◆ ~Skeleton()

Skeleton::~Skeleton ( )

◆ Skeleton() [2/2]

Skeleton::Skeleton ( Skeleton )
private

Member Function Documentation

◆ FindSkeleton()

const Skeleton * Skeleton::FindSkeleton ( const std::string &  rootBoneName)
static

Tries to find a skeleton that matches the given root bone name.

Returns NULL if there is no match.

◆ GetBoneCount()

int Skeleton::GetBoneCount ( ) const

Returns the number of bones in the standard-skeleton which this current skeleton is mapped onto.

◆ GetBoneID()

int Skeleton::GetBoneID ( const std::string &  name) const

Returns the ID number of the standard-skeleton bone, which corresponds to the named nonstandard-skeleton bone.

Returns -1 if none is found. Can return the same value for multiple bones.

◆ GetRealBoneID()

int Skeleton::GetRealBoneID ( const std::string &  name) const

Similar to GetBoneID, but only returns a value for the most important (first) nonstandard-skeleton bone for each standard bone; returns -1 in other cases.

This is necessary when deciding which nonstandard-skeleton-bone's animation should be saved. (TODO: think of a better name.)

◆ LoadSkeletonDataFromXml()

void Skeleton::LoadSkeletonDataFromXml ( const char *  xmlData,
size_t  xmlLength,
std::string &  xmlErrors 
)
static

Initialises the global state with skeleton data loaded from the given XML data.

Parameters
xmlData
xmlLength
xmlErrorsoutput - XML parser error messages; will be non-empty on failure (and failure will always throw)
Exceptions
ColladaExceptionon failure

Member Data Documentation

◆ m

std::unique_ptr<Skeleton_impl> Skeleton::m

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