| 
    Planeshift
    
   | 
 
A manager class that handles all the details of a characters appearance. More...
#include <charapp.h>
Public Member Functions | |
| void | ApplyEquipment (const csString &equipment) | 
| Apply a set of equipment based on a XML string.  More... | |
| void | ApplyRider (iMeshWrapper *mesh) | 
| Handle the visual aspect of mounting, by attaching the rider's mesh on the back of the mount.  More... | |
| void | ApplyTraits (const csString &traits) | 
| Apply a set of traits based on a XML string.  More... | |
| void | BeardMesh (csString &submesh) | 
| Attach a beard sub mesh to the model.  More... | |
| bool | ChangeMaterial (const char *part, const char *materialName) | 
| Change the material on a part of the model.  More... | |
| bool | CheckLoadStatus () | 
| void | ClearEquipment (const char *slot=NULL) | 
| Clears the equipment on a mesh.  More... | |
| void | Clone (psCharAppearance *clone) | 
| Copy a current appearance class.  More... | |
| bool | Dequip (csString &slotname, csString &mesh, csString &part, csString &subMesh, csString &texture, csString &removedMesh) | 
| Remove an item from the model.  More... | |
| void | Equip (csString &slotname, csString &mesh, csString &part, csString &subMesh, csString &texture, csString &removedMesh) | 
| Equip an item onto the model.  More... | |
| void | EyeColor (csVector3 &shader) | 
| Set the colour of the eyes.  More... | |
| void | FaceTexture (csString &faceMaterial) | 
| Set the material we want to use for the face.  More... | |
| void | HairColor (csVector3 &shader) | 
| Set the colour of the hair.  More... | |
| void | HairMesh (csString &submesh) | 
| Attach a hair sub mesh to the model.  More... | |
| psCharAppearance (iObjectRegistry *objectReg) | |
| Setup the class.  More... | |
| void | SetMesh (iMeshWrapper *mesh) | 
| Set the mesh that is the base model character.  More... | |
| void | SetSkinTone (csString &part, csString &material) | 
| Set the skin tone.  More... | |
| void | SetSneak (bool sneaking) | 
| void | ShowHair (bool flag=true) | 
| Toggle the hair mesh on and off.  More... | |
| void | ShowMeshes (csString &slot, csString &meshList, bool show=true) | 
| Toggle the meshes on and off.  More... | |
| void | UpdateMeshShowStatus (csString &meshName) | 
| Checks if the mesh is hidden and in that case removes it.  More... | |
| ~psCharAppearance () | |
  Public Member Functions inherited from DelayedLoader | |
| virtual | ~DelayedLoader () | 
A manager class that handles all the details of a characters appearance.
| psCharAppearance::psCharAppearance | ( | iObjectRegistry * | objectReg | ) | 
Setup the class.
| objectReg | The Crystal Space registry so we can aquire some needed objects. | 
| psCharAppearance::~psCharAppearance | ( | ) | 
| void psCharAppearance::ApplyEquipment | ( | const csString & | equipment | ) | 
Apply a set of equipment based on a XML string.
| equipment | The XML formated string that has a list of the equipment to apply. | 
| void psCharAppearance::ApplyRider | ( | iMeshWrapper * | mesh | ) | 
Handle the visual aspect of mounting, by attaching the rider's mesh on the back of the mount.
| mesh | The mount's mesh | 
| void psCharAppearance::ApplyTraits | ( | const csString & | traits | ) | 
Apply a set of traits based on a XML string.
| traits | The XML formated string that has a list of the traits to apply. | 
| void psCharAppearance::BeardMesh | ( | csString & | submesh | ) | 
Attach a beard sub mesh to the model.
| submesh | The name of the beard sub mesh to attach. | 
| bool psCharAppearance::ChangeMaterial | ( | const char * | part, | 
| const char * | materialName | ||
| ) | 
Change the material on a part of the model.
| part | The part of the model we want to change the materail on ( ex Torso ) | 
| materialName | The name of the material to use. | 
      
  | 
  virtual | 
Implements DelayedLoader.
| void psCharAppearance::ClearEquipment | ( | const char * | slot = NULL | ) | 
Clears the equipment on a mesh.
| void psCharAppearance::Clone | ( | psCharAppearance * | clone | ) | 
Copy a current appearance class.
| clone | The class to copy. | 
| bool psCharAppearance::Dequip | ( | csString & | slotname, | 
| csString & | mesh, | ||
| csString & | part, | ||
| csString & | subMesh, | ||
| csString & | texture, | ||
| csString & | removedMesh | ||
| ) | 
Remove an item from the model.
| slotname | The socket we want to remove the item. | 
| mesh | The name of the 3D mesh in above socket. | 
| part | The part of the model we want to change ( ie Torso ) | 
| subMesh | The submesh we want to remove ( ie $P_Plate ) | 
| texture | The texture to apply to that part. | 
| removedMesh | The mesh to remove when this item is equipped | 
| void psCharAppearance::Equip | ( | csString & | slotname, | 
| csString & | mesh, | ||
| csString & | part, | ||
| csString & | subMesh, | ||
| csString & | texture, | ||
| csString & | removedMesh | ||
| ) | 
Equip an item onto the model.
| slotname | The socket we want to place the item. | 
| mesh | The name of the 3D mesh to attach in above socket. | 
| part | The part of the model we want to change ( ie Torso ) | 
| subMesh | The submesh we want to use ( ie $P_Plate ) | 
| texture | The texture to apply to that part. | 
| removedMesh | The mesh to remove when this item is equipped | 
| void psCharAppearance::EyeColor | ( | csVector3 & | shader | ) | 
Set the colour of the eyes.
| shader | the R,G,B value of the shader to use on the eyes. | 
| void psCharAppearance::FaceTexture | ( | csString & | faceMaterial | ) | 
Set the material we want to use for the face.
| faceMaterial | The material to use. | 
| void psCharAppearance::HairColor | ( | csVector3 & | shader | ) | 
Set the colour of the hair.
| shader | the R,G,B value of the shader to use on the hair. | 
| void psCharAppearance::HairMesh | ( | csString & | submesh | ) | 
Attach a hair sub mesh to the model.
| submesh | The name of the hair sub mesh to attach. | 
| void psCharAppearance::SetMesh | ( | iMeshWrapper * | mesh | ) | 
Set the mesh that is the base model character.
| mesh | The mesh that will be the core model that we want to manage the appearance for. | 
| void psCharAppearance::SetSkinTone | ( | csString & | part, | 
| csString & | material | ||
| ) | 
Set the skin tone.
| part | The part of the model to change. | 
| material | The material to use on that part. | 
| void psCharAppearance::SetSneak | ( | bool | sneaking | ) | 
| void psCharAppearance::ShowHair | ( | bool | flag = true | ) | 
Toggle the hair mesh on and off.
| flag | True if we want to show the hair. False if we want to hide it. | 
| void psCharAppearance::ShowMeshes | ( | csString & | slot, | 
| csString & | meshList, | ||
| bool | show = true  | 
        ||
| ) | 
Toggle the meshes on and off.
| slot | The slot which which will apply/remove this restrain. | 
| meshList | The list of meshes which will be applied/removed this restrain. | 
| show | True if the slot is a restrain to showing the mesh. False if it's not anymore. | 
| void psCharAppearance::UpdateMeshShowStatus | ( | csString & | meshName | ) | 
Checks if the mesh is hidden and in that case removes it.
Useful when we are adding a new mesh to check if it should really show.
| meshName | The name of the mesh to check for restrains. |