MeshComponent Class Reference

Component wrapper of Irrlicht's IMeshSceneNode. More...

Inheritance diagram for MeshComponent:

Inheritance graph
[legend]
Collaboration diagram for MeshComponent:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

Component wrapper of Irrlicht's IMeshSceneNode.

XML:

 <MeshComponent>
    <!-- Properties -->
 </MeshComponent>

Definition at line 33 of file MeshComponent.h.


Constructor & Destructor Documentation

MeshComponent::MeshComponent ( Entity parent  ) 

Constructor (default).

Parameters:
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.

Parameters:
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 31 of file MeshComponent.cpp.

MeshComponent::MeshComponent ( Entity parent,
IMesh *  mesh,
const vector3df &  scale = vector3df(1.0f, 1.0f, 1.0f) 
)

Constructor.

Parameters:
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.
Note:
Not available in AngelScript.

Definition at line 42 of file MeshComponent.cpp.

MeshComponent::~MeshComponent (  ) 

Deconstructor.

Definition at line 59 of file MeshComponent.cpp.

MeshComponent::MeshComponent ( Entity parent,
bool  isDerived 
) [protected]

Constructor for derived classes.

Definition at line 53 of file MeshComponent.cpp.


Member Function Documentation

IMesh * MeshComponent::getMesh (  ) 

Returns the current mesh.

Note:
Not available in AngelScript.

Definition at line 91 of file MeshComponent.cpp.

IMeshSceneNode * MeshComponent::getMeshSceneNode (  ) 

Returns a direct pointer to the IMeshSceneNode.

Note:
Not available in AngelScript.

Definition at line 85 of file MeshComponent.cpp.

void MeshComponent::onMesh ( void *  p  ) 

Responds to changes of the mesh attached to this component.

Note:
For internal use only!

Reimplemented in OctTreeComponent.

Definition at line 145 of file MeshComponent.cpp.

bool MeshComponent::parseBaseXML ( IXMLReader *  file,
MeshComponent component 
) [static]

Parses for the base elements of a MeshComponent.

Note:
For internal use only!

Definition at line 206 of file MeshComponent.cpp.

bool MeshComponent::parseXML ( IXMLReader *  file,
Entity entity 
) [static]

Parses for a MeshComponent.

Note:
For internal use only!

Reimplemented from SceneComponent.

Reimplemented in OctTreeComponent.

Definition at line 155 of file MeshComponent.cpp.

void MeshComponent::setMesh ( IMesh *  mesh  )  [virtual]

Sets a new mesh to display.

Parameters:
mesh Pointer to the loaded animated mesh to be displayed.
Note:
Not available in AngelScript.

Reimplemented in OctTreeComponent.

Definition at line 129 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 97 of file MeshComponent.cpp.


Member Data Documentation

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.


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

Generated on Sun Aug 30 14:17:14 2009 for Sirrf - Simple Irrlicht Framework by  doxygen 1.5.8