Public Member Functions | |
MeshComponent (Entity *parent) | |
Constructor (default). | |
MeshComponent (Entity *parent, const std::string &fileName, const vector3df &scale=vector3df(1.0f, 1.0f, 1.0f)) | |
Constructor. | |
MeshComponent (Entity *parent, IMesh *mesh, const vector3df &scale=vector3df(1.0f, 1.0f, 1.0f)) | |
Constructor. | |
~MeshComponent () | |
Deconstructor. | |
IMeshSceneNode * | getMeshSceneNode () |
Returns a direct pointer to the IMeshSceneNode. | |
IMesh * | getMesh () |
Returns the current mesh. | |
virtual void | setMesh (const std::string &fileName) |
Loads and sets a new mesh to display. | |
virtual void | setMesh (IMesh *mesh) |
Sets a new mesh to display. | |
void | onMesh (void *p) |
Responds to changes of the mesh attached to this component. | |
Static Public Member Functions | |
static bool | parseXML (IXMLReader *file, Entity *entity) |
Parses for a MeshComponent. | |
static bool | parseBaseXML (IXMLReader *file, MeshComponent *component) |
Parses for the base elements of a MeshComponent. | |
Protected Member Functions | |
MeshComponent (Entity *parent, bool isDerived) | |
Constructor for derived classes. | |
Protected Attributes | |
IMeshSceneNode * | mMeshSN |
std::string | mMeshFileName |
XML:
<MeshComponent> <!-- Properties --> </MeshComponent>
Definition at line 33 of file MeshComponent.h.
MeshComponent::MeshComponent | ( | Entity * | parent | ) |
Constructor (default).
parent | The parent entity to which the component should be added. |
Definition at line 23 of file MeshComponent.cpp.
MeshComponent::MeshComponent | ( | Entity * | parent, | |
const std::string & | fileName, | |||
const vector3df & | scale = vector3df(1.0f, 1.0f, 1.0f) | |||
) |
Constructor.
parent | The parent entity to which the component should be added. | |
fileName | Filename of the mesh to load. | |
scale | Initial scale of the mesh. |
Definition at line 30 of file MeshComponent.cpp.
MeshComponent::MeshComponent | ( | Entity * | parent, | |
IMesh * | mesh, | |||
const vector3df & | scale = vector3df(1.0f, 1.0f, 1.0f) | |||
) |
Constructor.
parent | The parent entity to which the component should be added. | |
mesh | Pointer to the loaded animated mesh to be displayed. | |
scale | Initial scale of the mesh. |
Definition at line 38 of file MeshComponent.cpp.
MeshComponent::~MeshComponent | ( | ) |
MeshComponent::MeshComponent | ( | Entity * | parent, | |
bool | isDerived | |||
) | [protected] |
IMesh * MeshComponent::getMesh | ( | ) |
Returns the current mesh.
Definition at line 81 of file MeshComponent.cpp.
IMeshSceneNode * MeshComponent::getMeshSceneNode | ( | ) |
Returns a direct pointer to the IMeshSceneNode.
Definition at line 75 of file MeshComponent.cpp.
void MeshComponent::onMesh | ( | void * | p | ) |
Responds to changes of the mesh attached to this component.
Reimplemented in OctTreeComponent.
Definition at line 135 of file MeshComponent.cpp.
bool MeshComponent::parseBaseXML | ( | IXMLReader * | file, | |
MeshComponent * | component | |||
) | [static] |
Parses for the base elements of a MeshComponent.
Definition at line 196 of file MeshComponent.cpp.
bool MeshComponent::parseXML | ( | IXMLReader * | file, | |
Entity * | entity | |||
) | [static] |
Parses for a MeshComponent.
Reimplemented from SceneComponent.
Reimplemented in OctTreeComponent.
Definition at line 145 of file MeshComponent.cpp.
void MeshComponent::setMesh | ( | IMesh * | mesh | ) | [virtual] |
Sets a new mesh to display.
mesh | Pointer to the loaded animated mesh to be displayed. |
Reimplemented in OctTreeComponent.
Definition at line 119 of file MeshComponent.cpp.
void MeshComponent::setMesh | ( | const std::string & | fileName | ) | [virtual] |
Loads and sets a new mesh to display.
XML:
<mesh fileName="" />
fileName Filename of the mesh to load.
Reimplemented in OctTreeComponent.
Definition at line 87 of file MeshComponent.cpp.
std::string MeshComponent::mMeshFileName [protected] |
Definition at line 101 of file MeshComponent.h.
IMeshSceneNode* MeshComponent::mMeshSN [protected] |
Definition at line 100 of file MeshComponent.h.