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

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

#include <Skeleton.h>

Collaboration diagram for model::Skeleton:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Skeleton ()
 ~Skeleton ()
 Skeleton (const Skeleton &other)
Skeletonoperator= (const Skeleton &other)
void addBone (Bone *parent, IvVector3 *direction, float length, string name)
 Write brief comment for addBone here.
void removeBone (int id)
void removeBone (string name)
vector< Bone * > getBones ()
BonegetBone (int id)
BonegetBone (string name)
bool operator== (const Skeleton &other) const
bool operator!= (const Skeleton &other) const

Private Attributes

Bonem_vBones

Detailed Description

Write brief comment for Skeleton here.

Write detailed description for Skeleton here.

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

Definition at line 29 of file Skeleton.h.


Constructor & Destructor Documentation

model::Skeleton::Skeleton  )  [inline]
 

Write brief comment for Skeleton here.

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

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

Definition at line 52 of file Skeleton.h.

00052 {};

model::Skeleton::~Skeleton  )  [inline]
 

Write brief comment for ~Skeleton here.

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

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

Definition at line 68 of file Skeleton.h.

00068 {};

Skeleton::Skeleton const Skeleton other  ) 
 

Write brief comment for Skeleton here.

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

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

Definition at line 22 of file Skeleton.cpp.

References m_vBones.

00022                                         {
00023         m_vBones = other.m_vBones;
00024 }  


Member Function Documentation

void Skeleton::addBone Bone parent,
IvVector3 *  direction,
float  length,
string  name
 

Write brief comment for addBone here.

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

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

Definition at line 205 of file Skeleton.cpp.

References model::Bone::addChild(), and m_vBones.

Referenced by pcggui::ConvertBone().

00205                                                                                     {
00206         Bone* bone = new Bone(parent,direction,length,name);
00207         parent->addChild(bone);
00208         m_vBones.push_back(bone);
00209 }

Here is the call graph for this function:

Bone * Skeleton::getBone string  name  ) 
 

Write brief comment for getBone here.

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

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

Definition at line 154 of file Skeleton.cpp.

References m_vBones.

00154                                    {
00155         for(int i=0; i<m_vBones.size(); i++) {
00156                 if(name.compare(m_vBones[i]->getName()) == 0) {
00157                         return m_vBones[i];
00158                 }
00159         }
00160         return NULL;
00161 }

Bone * Skeleton::getBone int  id  ) 
 

Write brief comment for getBone here.

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

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

Definition at line 183 of file Skeleton.cpp.

References m_vBones.

Referenced by pcggui::ConvertSkin().

00183                               {
00184         return m_vBones[id];
00185 }

vector< Bone * > Skeleton::getBones  ) 
 

Write brief comment for getBones here.

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

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

Definition at line 130 of file Skeleton.cpp.

00130                                  {
00131         return m_vBones;
00132 }

bool Skeleton::operator!= const Skeleton 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 105 of file Skeleton.cpp.

References m_vBones.

00106 {
00107         if(m_vBones != other.m_vBones) {
00108                 return false;
00109         }
00110         return true;
00111 }  

Skeleton & Skeleton::operator= const Skeleton other  ) 
 

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 46 of file Skeleton.cpp.

References m_vBones.

00047 {
00048         // if same object
00049         if ( this == &other )
00050                 return *this;
00051 
00052         m_vBones = other.m_vBones;
00053 
00054         return *this;
00055 }  

bool Skeleton::operator== const Skeleton 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 77 of file Skeleton.cpp.

References m_vBones.

00078 {
00079         if(m_vBones == other.m_vBones) {
00080                 return true;
00081         }
00082         return false;  
00083 }   

void Skeleton::removeBone std::string  name  ) 
 

Write brief comment for removeBone here.

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

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

Definition at line 249 of file Skeleton.cpp.

00249                                         {
00250 
00251 }

void Skeleton::removeBone int  id  ) 
 

Write brief comment for removeBone here.

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

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

Definition at line 228 of file Skeleton.cpp.

00228                                 {
00229 
00230 }


Member Data Documentation

Bone* model::Skeleton::m_vBones [private]
 

Definition at line 32 of file Skeleton.h.

Referenced by addBone(), getBone(), operator!=(), operator=(), operator==(), and Skeleton().


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