Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

model::Bone Class Reference
[The PCG model layer]

#include <Bone.h>

Collaboration diagram for model::Bone:

Collaboration graph
[legend]
List of all members.

Public Member Functions

BonegetParent ()
vector< Bone * > getChilds ()
IvVector3 * getDirection ()
float getLength ()
vector< Constraint * > getConstraints ()
vector< Mapping * > getMapping ()
void setDirection (IvVector3 *vDirection)
void setLength (float fLength)
void setConstraints (vector< Constraint * > lConstraints)
void setMapping (vector< Mapping * > lMapping)
void addConstraint (Constraint *constraint)
void addMapping (Mapping *mapping)
void addChild (Bone *bone)
void removeConstraint (Constraint *constraint)
void removeMapping (Mapping *mapping)
void removeChild (string name)
void setName (string name)
 Write brief comment for setName here.
string getName ()
 Write brief comment for getName here.
bool operator== (const Bone &other) const
bool operator!= (const Bone &other) const

Private Member Functions

 Bone (Bone *parent, IvVector3 *vDirection, float fLength, string name)
 ~Bone ()
 Bone (const Bone &other)
Boneoperator= (const Bone &other)
void setParent (Bone *bone)

Private Attributes

Bonem_vChilds
Constraintm_lConstraints
Mappingm_lMapping
Bonem_parent
IvVector3 * m_vDirection
float m_fLength
string m_sName

Friends

class Skeleton

Detailed Description

Write brief comment for Bone here.

Write detailed description for Bone here.

Remarks:
Write remarks for Bone here.
See also:
Separate items with the '|' character.

Definition at line 30 of file Bone.h.


Constructor & Destructor Documentation

Bone::Bone Bone parent,
IvVector3 *  vDirection,
float  fLength,
string  name
[private]
 

Write brief comment for Bone here.

Parameters:
origin Description of parameter origin.
vDirection Description of parameter vDirection.
fLength Description of parameter fLength.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for Bone here.

Remarks:
Write remarks for Bone here.
See also:
Separate items with the '|' character.

Definition at line 29 of file Bone.cpp.

References setDirection(), setLength(), setName(), and setParent().

00029                                                                           {
00030         setParent(parent);
00031         setDirection(vDirection);
00032         setLength(fLength);
00033         setName(name);
00034 }

Here is the call graph for this function:

model::Bone::~Bone  )  [inline, private]
 

Write brief comment for ~Bone here.

Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for ~Bone here.

Remarks:
Write remarks for ~Bone here.
See also:
Separate items with the '|' character.

Definition at line 64 of file Bone.h.

00064 {};

Bone::Bone const Bone other  )  [private]
 

Write brief comment for Bone here.

Parameters:
other Description of parameter other.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for Bone here.

Remarks:
Write remarks for Bone here.
See also:
Separate items with the '|' character.

Definition at line 54 of file Bone.cpp.

References m_fLength, m_lConstraints, m_lMapping, m_parent, m_sName, m_vChilds, and m_vDirection.

00054                             {
00055         m_parent = other.m_parent;
00056         m_vDirection = other.m_vDirection;
00057         m_fLength = other.m_fLength;
00058         m_lConstraints = other.m_lConstraints;
00059         m_lMapping = other.m_lMapping;
00060         m_vChilds = other.m_vChilds;
00061         m_sName = other.m_sName;
00062 }  


Member Function Documentation

void Bone::addChild Bone bone  ) 
 

Definition at line 328 of file Bone.cpp.

References m_vChilds.

Referenced by model::Skeleton::addBone().

00328                               {
00329         m_vChilds.push_back(bone);
00330 }

void Bone::addConstraint Constraint constraint  ) 
 

Write brief comment for addConstraint here.

Parameters:
constraint Description of parameter constraint.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for addConstraint here.

Remarks:
Write remarks for addConstraint here.
See also:
Separate items with the '|' character.

Definition at line 303 of file Bone.cpp.

00303                                                {
00304         
00305 }

void Bone::addMapping Mapping mapping  ) 
 

Write brief comment for addMapping here.

Parameters:
mapping Description of parameter mapping.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for addMapping here.

Remarks:
Write remarks for addMapping here.
See also:
Separate items with the '|' character.

Definition at line 324 of file Bone.cpp.

Referenced by pcggui::ConvertSkin().

00324                                       {
00325 
00326 }

vector<Bone*> model::Bone::getChilds  ) 
 

vector< Constraint * > Bone::getConstraints  ) 
 

Write brief comment for getConstraints here.

Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for getConstraints here.

Remarks:
Write remarks for getConstraints here.
See also:
Separate items with the '|' character.

Definition at line 161 of file Bone.cpp.

00161                                          {
00162         return m_lConstraints;
00163 }

IvVector3 * Bone::getDirection  ) 
 

Write brief comment for getDirection here.

Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for getDirection here.

Remarks:
Write remarks for getDirection here.
See also:
Separate items with the '|' character.

Definition at line 119 of file Bone.cpp.

00119                               {
00120         return m_vDirection;
00121 }

float Bone::getLength  ) 
 

Write brief comment for getLength here.

Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for getLength here.

Remarks:
Write remarks for getLength here.
See also:
Separate items with the '|' character.

Definition at line 140 of file Bone.cpp.

00140                       {
00141         return m_fLength;
00142 }

vector< Mapping * > Bone::getMapping  ) 
 

Write brief comment for getMapping here.

Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for getMapping here.

Remarks:
Write remarks for getMapping here.
See also:
Separate items with the '|' character.

Definition at line 182 of file Bone.cpp.

00182                                   {
00183         return m_lMapping;
00184 }

string Bone::getName  ) 
 

Write brief comment for getName here.

Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for getName here.

Remarks:
Write remarks for getName here.
See also:
Separate items with the '|' character.

Definition at line 486 of file Bone.cpp.

00486                      {
00487         return m_sName;
00488 }

Bone* model::Bone::getParent  ) 
 

bool Bone::operator!= const Bone other  )  const
 

Write brief comment for operator != here.

Parameters:
other Description of parameter other.
Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for operator != here.

Remarks:
Write remarks for operator != here.
See also:
Separate items with the '|' character.

Definition at line 434 of file Bone.cpp.

References m_fLength, m_lConstraints, m_lMapping, m_sName, and m_vDirection.

00435 {
00436         if(m_vDirection == other.m_vDirection
00437         && m_fLength == other.m_fLength
00438         && m_lConstraints == other.m_lConstraints
00439         && m_lMapping == other.m_lMapping
00440         && m_sName.compare(other.m_sName)) {
00441         return false;
00442         }
00443     return true;
00444 }  

Bone & Bone::operator= const Bone other  )  [private]
 

Write brief comment for operator = here.

Parameters:
other Description of parameter other.
Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for operator = here.

Remarks:
Write remarks for operator = here.
See also:
Separate items with the '|' character.

Definition at line 85 of file Bone.cpp.

References m_fLength, m_lConstraints, m_lMapping, m_parent, m_sName, m_vChilds, and m_vDirection.

00086 {
00087     // if same object
00088     if ( this == &other )
00089         return *this;
00090         
00091         m_parent = other.m_parent;
00092         m_vDirection = other.m_vDirection;
00093         m_fLength = other.m_fLength;
00094         m_lConstraints = other.m_lConstraints;
00095         m_lMapping = other.m_lMapping;
00096         m_vChilds = other.m_vChilds;
00097         m_sName = other.m_sName;
00098 
00099     return *this;
00100 }  

bool Bone::operator== const Bone other  )  const
 

Write brief comment for operator == here.

Parameters:
other Description of parameter other.
Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for operator == here.

Remarks:
Write remarks for operator == here.
See also:
Separate items with the '|' character.

Definition at line 400 of file Bone.cpp.

References m_fLength, m_lConstraints, m_lMapping, m_sName, and m_vDirection.

00401 {
00402 
00403     if(m_vDirection == other.m_vDirection
00404         && m_fLength == other.m_fLength
00405         && m_lConstraints == other.m_lConstraints
00406         && m_lMapping == other.m_lMapping 
00407         && m_sName.compare(other.m_sName)) {
00408         return true;
00409         }
00410     return false;  
00411 }   

void Bone::removeChild string  name  ) 
 

Definition at line 375 of file Bone.cpp.

00375                                   {
00376         
00377 }

void Bone::removeConstraint Constraint constraint  ) 
 

Write brief comment for removeConstraint here.

Parameters:
constraint Description of parameter constraint.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for removeConstraint here.

Remarks:
Write remarks for removeConstraint here.
See also:
Separate items with the '|' character.

Definition at line 349 of file Bone.cpp.

00349                                                   {
00350 
00351 }

void Bone::removeMapping Mapping mapping  ) 
 

Write brief comment for removeMapping here.

Parameters:
mapping Description of parameter mapping.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for removeMapping here.

Remarks:
Write remarks for removeMapping here.
See also:
Separate items with the '|' character.

Definition at line 371 of file Bone.cpp.

00371                                          {
00372 
00373 }

void Bone::setConstraints vector< Constraint * >  lConstraints  ) 
 

Write brief comment for setConstraints here.

Parameters:
lConstraints Description of parameter lConstraints.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setConstraints here.

Remarks:
Write remarks for setConstraints here.
See also:
Separate items with the '|' character.

Definition at line 261 of file Bone.cpp.

References m_lConstraints.

00261                                                           {
00262         m_lConstraints = lConstraints;
00263 }

void Bone::setDirection IvVector3 *  vDirection  ) 
 

Write brief comment for setDirection here.

Parameters:
vDirection Description of parameter vDirection.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setDirection here.

Remarks:
Write remarks for setDirection here.
See also:
Separate items with the '|' character.

Definition at line 218 of file Bone.cpp.

References m_vDirection.

Referenced by Bone().

00218                                              {
00219         m_vDirection = vDirection;
00220 }

void Bone::setLength float  fLength  ) 
 

Write brief comment for setLength here.

Parameters:
fLength Description of parameter fLength.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setLength here.

Remarks:
Write remarks for setLength here.
See also:
Separate items with the '|' character.

Definition at line 240 of file Bone.cpp.

References m_fLength.

Referenced by Bone().

00240                                   {
00241         m_fLength = fLength;
00242 }

void Bone::setMapping vector< Mapping * >  lMapping  ) 
 

Write brief comment for setMapping here.

Parameters:
lMapping Description of parameter lMapping.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setMapping here.

Remarks:
Write remarks for setMapping here.
See also:
Separate items with the '|' character.

Definition at line 282 of file Bone.cpp.

References m_lMapping.

00282                                                {
00283         m_lMapping = lMapping;
00284 }

void Bone::setName string  name  ) 
 

Write brief comment for setName here.

Parameters:
name Description of parameter name.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setName here.

Remarks:
Write remarks for setName here.
See also:
Separate items with the '|' character.

Definition at line 464 of file Bone.cpp.

References m_sName.

Referenced by Bone().

00464                               {
00465         m_sName = name;
00466 }

void Bone::setParent Bone bone  )  [private]
 

Write brief comment for setParent here.

Parameters:
bone Description of parameter origin.
Write detailed description for setParent here.

See also:
Separate items with the '|' character.

Definition at line 197 of file Bone.cpp.

References m_parent.

Referenced by Bone().

00197                                {
00198         m_parent = bone;
00199 }


Friends And Related Function Documentation

friend class Skeleton [friend]
 

Definition at line 100 of file Bone.h.


Member Data Documentation

float model::Bone::m_fLength [private]
 

Definition at line 43 of file Bone.h.

Referenced by Bone(), operator!=(), operator=(), operator==(), and setLength().

Constraint* model::Bone::m_lConstraints [private]
 

Definition at line 34 of file Bone.h.

Referenced by Bone(), operator!=(), operator=(), operator==(), and setConstraints().

Mapping* model::Bone::m_lMapping [private]
 

Definition at line 35 of file Bone.h.

Referenced by Bone(), operator!=(), operator=(), operator==(), and setMapping().

Bone* model::Bone::m_parent [private]
 

Definition at line 41 of file Bone.h.

Referenced by Bone(), operator=(), and setParent().

string model::Bone::m_sName [private]
 

Definition at line 44 of file Bone.h.

Referenced by Bone(), operator!=(), operator=(), operator==(), and setName().

Bone* model::Bone::m_vChilds [private]
 

Definition at line 33 of file Bone.h.

Referenced by addChild(), Bone(), and operator=().

IvVector3* model::Bone::m_vDirection [private]
 

Definition at line 42 of file Bone.h.

Referenced by Bone(), operator!=(), operator=(), operator==(), and setDirection().


The documentation for this class was generated from the following files:
Generated on Tue Apr 17 09:39:59 2007 for PCG Library by  doxygen 1.3.9.1