#include <staticmesh.h>
Inheritance diagram for kerosin::StaticMesh:
Public Types | |
typedef std::vector< oxygen::IndexBuffer > | TIndexBuffers |
Public Member Functions | |
StaticMesh () | |
~StaticMesh () | |
bool | Load (const std::string &name, const zeitgeist::ParameterList ¶meter) |
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::Vector3f & | GetScale () |
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::TriMesh > | GetMesh () |
returns the managed mesh | |
const std::string & | GetMeshName () |
returns the name of the loaded mesh | |
const zeitgeist::ParameterList & | GetMeshParameter () |
returns the parameter list of the loaded mesh | |
Protected Attributes | |
salt::Vector3f | mScale |
vector of scale factors along each axis | |
boost::shared_ptr< oxygen::TriMesh > | mMesh |
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 |
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.
|
Definition at line 43 of file staticmesh.h. |
|
Definition at line 35 of file staticmesh.cpp. |
|
Definition at line 39 of file staticmesh.cpp. |
|
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: ![]() |
|
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(). |
|
returns the managed mesh
Definition at line 212 of file staticmesh.cpp. References mMesh. |
|
returns the name of the loaded mesh
Definition at line 217 of file staticmesh.cpp. References mMeshName. |
|
returns the parameter list of the loaded mesh
Definition at line 222 of file staticmesh.cpp. References mMeshParameter. |
|
returns the scale vector that is used to render the mesh
Definition at line 136 of file staticmesh.cpp. References mScale. |
|
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: ![]() |
|
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: ![]() |
|
renders the node
Implements kerosin::RenderNode. Definition at line 76 of file staticmesh.cpp. References oxygen::TriMesh::Face::indeces, mMaterials, mMesh, and mScale. |
|
sets the scale vector that is used to render the mesh
Definition at line 141 of file staticmesh.cpp. References mScale. |
|
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(). |
|
the mesh to render
Definition at line 93 of file staticmesh.h. Referenced by CalcBoundingBox(), GetMesh(), Load(), and RenderInternal(). |
|
the name of the loaded mesh
Definition at line 99 of file staticmesh.h. Referenced by GetMeshName(), and Load(). |
|
the list of parameters the mesh was loaded with
Definition at line 102 of file staticmesh.h. Referenced by GetMeshParameter(), and Load(). |
|
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(). |