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

kerosin::StaticMesh Class Reference

Render that renders a TriMesh. More...

#include <staticmesh.h>

Inheritance diagram for kerosin::StaticMesh:

Inheritance graph
[legend]
Collaboration diagram for kerosin::StaticMesh:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< oxygen::IndexBufferTIndexBuffers

Public Member Functions

 StaticMesh ()
 ~StaticMesh ()
bool Load (const std::string &name, const zeitgeist::ParameterList &parameter)
 loads the mesh with the given name and parameters
bool Load (const std::string &name)
 loads the mesh with the given name
virtual void ComputeBoundingBox ()
 empty! this prevents the bounding box from being updated, as it cannot change
void CalcBoundingBox ()
 calculates the local bounding box
const salt::Vector3fGetScale ()
 returns the scale vector that is used to render the mesh
void SetScale (const salt::Vector3f &scale)
 sets the scale vector that is used to render the mesh
virtual void RenderInternal ()
 renders the node
const boost::shared_ptr< oxygen::TriMeshGetMesh ()
 returns the managed mesh
const std::string & GetMeshName ()
 returns the name of the loaded mesh
const zeitgeist::ParameterListGetMeshParameter ()
 returns the parameter list of the loaded mesh

Protected Attributes

salt::Vector3f mScale
 vector of scale factors along each axis
boost::shared_ptr< oxygen::TriMeshmMesh
 the mesh to render
std::vector< boost::shared_ptr<
Material > > 
mMaterials
 the materials used to render the mesh
std::string mMeshName
 the name of the loaded mesh
zeitgeist::ParameterList mMeshParameter
 the list of parameters the mesh was loaded with

Detailed Description

Render that renders a TriMesh.

The mesh is imported using the GeometryServer and all referenced materials are automatically loaded using the MaterialServer.

Definition at line 37 of file staticmesh.h.


Member Typedef Documentation

typedef std::vector<oxygen::IndexBuffer> kerosin::StaticMesh::TIndexBuffers
 

Definition at line 43 of file staticmesh.h.


Constructor & Destructor Documentation

StaticMesh::StaticMesh  ) 
 

Definition at line 35 of file staticmesh.cpp.

StaticMesh::~StaticMesh  ) 
 

Definition at line 39 of file staticmesh.cpp.


Member Function Documentation

void StaticMesh::CalcBoundingBox  ) 
 

calculates the local bounding box

Definition at line 47 of file staticmesh.cpp.

References salt::AABB3::Encapsulate(), salt::AABB3::Init(), oxygen::BaseNode::mLocalBoundingBox, mMesh, and mScale.

Here is the call graph for this function:

void StaticMesh::ComputeBoundingBox  )  [virtual]
 

empty! this prevents the bounding box from being updated, as it cannot change

Reimplemented from oxygen::BaseNode.

Definition at line 43 of file staticmesh.cpp.

Referenced by Load().

const shared_ptr< TriMesh > StaticMesh::GetMesh  ) 
 

returns the managed mesh

Definition at line 212 of file staticmesh.cpp.

References mMesh.

const std::string & StaticMesh::GetMeshName  ) 
 

returns the name of the loaded mesh

Definition at line 217 of file staticmesh.cpp.

References mMeshName.

const ParameterList & StaticMesh::GetMeshParameter  ) 
 

returns the parameter list of the loaded mesh

Definition at line 222 of file staticmesh.cpp.

References mMeshParameter.

const Vector3f & StaticMesh::GetScale  ) 
 

returns the scale vector that is used to render the mesh

Definition at line 136 of file staticmesh.cpp.

References mScale.

bool StaticMesh::Load const std::string &  name  ) 
 

loads the mesh with the given name

Definition at line 146 of file staticmesh.cpp.

References Load().

Here is the call graph for this function:

bool StaticMesh::Load const std::string &  name,
const zeitgeist::ParameterList parameter
 

loads the mesh with the given name and parameters

Definition at line 152 of file staticmesh.cpp.

References ComputeBoundingBox(), zeitgeist::Object::GetCore(), zeitgeist::Object::GetLog(), oxygen::TriMesh::Face::material, mMaterials, mMesh, mMeshName, and mMeshParameter.

Referenced by Load(), kerosin::Sphere::OnLink(), kerosin::Box::OnLink(), and kerosin::CCylinder::SetParams().

Here is the call graph for this function:

void StaticMesh::RenderInternal  )  [virtual]
 

renders the node

Implements kerosin::RenderNode.

Definition at line 76 of file staticmesh.cpp.

References oxygen::TriMesh::Face::indeces, mMaterials, mMesh, and mScale.

void StaticMesh::SetScale const salt::Vector3f scale  ) 
 

sets the scale vector that is used to render the mesh

Definition at line 141 of file staticmesh.cpp.

References mScale.


Member Data Documentation

std::vector<boost::shared_ptr<Material> > kerosin::StaticMesh::mMaterials [protected]
 

the materials used to render the mesh

Definition at line 96 of file staticmesh.h.

Referenced by kerosin::SingleMatNode::GetMaterial(), Load(), RenderInternal(), and kerosin::SingleMatNode::SetMaterial().

boost::shared_ptr<oxygen::TriMesh> kerosin::StaticMesh::mMesh [protected]
 

the mesh to render

Definition at line 93 of file staticmesh.h.

Referenced by CalcBoundingBox(), GetMesh(), Load(), and RenderInternal().

std::string kerosin::StaticMesh::mMeshName [protected]
 

the name of the loaded mesh

Definition at line 99 of file staticmesh.h.

Referenced by GetMeshName(), and Load().

zeitgeist::ParameterList kerosin::StaticMesh::mMeshParameter [protected]
 

the list of parameters the mesh was loaded with

Definition at line 102 of file staticmesh.h.

Referenced by GetMeshParameter(), and Load().

salt::Vector3f kerosin::StaticMesh::mScale [protected]
 

vector of scale factors along each axis

Definition at line 90 of file staticmesh.h.

Referenced by CalcBoundingBox(), kerosin::Box::GetExtents(), kerosin::Sphere::GetRadius(), GetScale(), RenderInternal(), kerosin::Box::SetExtents(), kerosin::Sphere::SetRadius(), and SetScale().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:43:50 2006 for rcssserver3d by  doxygen 1.4.4