Skyscraper 2.0
SBS::DynamicMesh Class Reference

#include <dynamicmesh.h>

Inheritance diagram for SBS::DynamicMesh:
Collaboration diagram for SBS::DynamicMesh:

Classes

struct  Mesh
 

Public Member Functions

 DynamicMesh (Object *parent, SceneNode *node, const std::string &name, Real max_render_distance=0, bool dynamic_buffers=false)
 
 ~DynamicMesh ()
 
void Enabled (bool value, MeshObject *client=0)
 
bool ChangeTexture (const std::string &old_texture, const std::string &new_texture, MeshObject *client=0)
 
void EnableDebugView (bool value, MeshObject *client=0)
 
bool IsVisible (MeshObject *client=0)
 
bool IsVisible (Ogre::Camera *camera, MeshObject *client=0)
 
bool IsVisible (Ogre::Camera *camera, int mesh_index)
 
void Prepare (MeshObject *client=0)
 
bool LoadFromFile (const std::string &filename, const std::string &path)
 
bool LoadFromMesh (const std::string &meshname)
 
void AddClient (MeshObject *mesh)
 
void RemoveClient (MeshObject *mesh)
 
MeshObjectGetClient (int number)
 
int GetClientIndex (MeshObject *client)
 
int GetClientCount ()
 
void NeedsUpdate (MeshObject *client=0)
 
int GetMaterials (std::vector< std::string > &materials, int client=-1)
 
int GetMaterialCount (int client=-1)
 
unsigned int GetVertexCount (const std::string &material="", int client=-1)
 
unsigned int GetTriangleCount (const std::string &material, int &client_count, int client=-1)
 
unsigned int GetIndexOffset (MeshObject *client)
 
bool UseDynamicBuffers ()
 
void UpdateVertices (MeshObject *client, const std::string &material="", Polygon *polygon=0, bool single=false)
 
void DetachClient (MeshObject *client)
 
int GetMeshCount ()
 
int GetSubMeshCount (int mesh_index)
 
std::string GetMeshName (int mesh_index)
 
Ogre::AxisAlignedBox GetBounds (MeshObject *client=0)
 
void EnableShadows (bool value)
 
void SetMaterial (const std::string &material)
 
- Public Member Functions inherited from SBS::ObjectBase
 ObjectBase (Object *parent)
 
virtual ~ObjectBase ()
 
ObjectGetParent ()
 
SBSGetRoot ()
 
void SetName (const std::string &name)
 
const std::string & GetName ()
 
std::string GetNameBase ()
 
virtual void Report (const std::string &message)
 
virtual bool ReportError (const std::string &message)
 

Public Attributes

bool force_combine
 

Private Attributes

std::vector< Mesh * > meshes
 
SceneNodenode
 
Real render_distance
 
bool file_model
 
std::vector< MeshObject * > clients
 
std::vector< bool > client_enable
 
bool prepared
 
bool dynamic_buffers
 
bool auto_combine
 

Additional Inherited Members

- Protected Attributes inherited from SBS::ObjectBase
SBSsbs
 

Detailed Description

Definition at line 29 of file dynamicmesh.h.

Constructor & Destructor Documentation

◆ DynamicMesh()

SBS::DynamicMesh::DynamicMesh ( Object * parent,
SceneNode * node,
const std::string & name,
Real max_render_distance = 0,
bool dynamic_buffers = false )

◆ ~DynamicMesh()

SBS::DynamicMesh::~DynamicMesh ( )

Definition at line 65 of file dynamicmesh.cpp.

References SBS::SBS::FastDelete, meshes, SBS::ObjectBase::sbs, and SBS::SBS::UnregisterDynamicMesh().

Here is the call graph for this function:

Member Function Documentation

◆ AddClient()

void SBS::DynamicMesh::AddClient ( MeshObject * mesh)

Definition at line 339 of file dynamicmesh.cpp.

References client_enable, and clients.

Referenced by SBS::MeshObject::MeshObject().

◆ ChangeTexture()

bool SBS::DynamicMesh::ChangeTexture ( const std::string & old_texture,
const std::string & new_texture,
MeshObject * client = 0 )

Definition at line 156 of file dynamicmesh.cpp.

References GetClientIndex(), meshes, and SBS::MeshObject::size.

Referenced by SBS::Polygon::ChangeTexture(), and SBS::Polygon::ReplaceTexture().

Here is the call graph for this function:

◆ DetachClient()

void SBS::DynamicMesh::DetachClient ( MeshObject * client)

Definition at line 571 of file dynamicmesh.cpp.

References GetClientIndex(), and meshes.

Referenced by SBS::MeshObject::~MeshObject().

Here is the call graph for this function:

◆ Enabled()

void SBS::DynamicMesh::Enabled ( bool value,
MeshObject * client = 0 )

◆ EnableDebugView()

void SBS::DynamicMesh::EnableDebugView ( bool value,
MeshObject * client = 0 )

Definition at line 179 of file dynamicmesh.cpp.

References EnableDebugView(), GetClientIndex(), meshes, and SBS::MeshObject::size.

Referenced by EnableDebugView(), and SBS::MeshObject::EnableDebugView().

Here is the call graph for this function:

◆ EnableShadows()

void SBS::DynamicMesh::EnableShadows ( bool value)

Definition at line 621 of file dynamicmesh.cpp.

References EnableShadows(), and meshes.

Referenced by EnableShadows(), and SBS::MeshObject::EnableShadows().

Here is the call graph for this function:

◆ GetBounds()

Ogre::AxisAlignedBox SBS::DynamicMesh::GetBounds ( MeshObject * client = 0)

Definition at line 604 of file dynamicmesh.cpp.

References GetClientIndex(), meshes, and SBS::MeshObject::size.

Referenced by SBS::MeshObject::GetBounds().

Here is the call graph for this function:

◆ GetClient()

MeshObject * SBS::DynamicMesh::GetClient ( int number)

Definition at line 362 of file dynamicmesh.cpp.

References clients.

◆ GetClientCount()

int SBS::DynamicMesh::GetClientCount ( )
inline

Definition at line 50 of file dynamicmesh.h.

◆ GetClientIndex()

int SBS::DynamicMesh::GetClientIndex ( MeshObject * client)

◆ GetIndexOffset()

unsigned int SBS::DynamicMesh::GetIndexOffset ( MeshObject * client)

Definition at line 534 of file dynamicmesh.cpp.

References clients, and meshes.

◆ GetMaterialCount()

int SBS::DynamicMesh::GetMaterialCount ( int client = -1)

Definition at line 452 of file dynamicmesh.cpp.

References GetMaterials().

Referenced by Prepare().

Here is the call graph for this function:

◆ GetMaterials()

int SBS::DynamicMesh::GetMaterials ( std::vector< std::string > & materials,
int client = -1 )

Definition at line 404 of file dynamicmesh.cpp.

References clients.

Referenced by GetMaterialCount().

◆ GetMeshCount()

int SBS::DynamicMesh::GetMeshCount ( )
inline

Definition at line 60 of file dynamicmesh.h.

◆ GetMeshName()

std::string SBS::DynamicMesh::GetMeshName ( int mesh_index)

Definition at line 593 of file dynamicmesh.cpp.

References meshes.

◆ GetSubMeshCount()

int SBS::DynamicMesh::GetSubMeshCount ( int mesh_index)

Definition at line 582 of file dynamicmesh.cpp.

References meshes.

Referenced by SBS::DynamicMesh::Mesh::CreateSubMesh(), and SBS::DynamicMesh::Mesh::IsVisible().

◆ GetTriangleCount()

unsigned int SBS::DynamicMesh::GetTriangleCount ( const std::string & material,
int & client_count,
int client = -1 )

Definition at line 509 of file dynamicmesh.cpp.

References clients.

◆ GetVertexCount()

unsigned int SBS::DynamicMesh::GetVertexCount ( const std::string & material = "",
int client = -1 )

Definition at line 461 of file dynamicmesh.cpp.

References clients, SBS::Polygon::geometry, and SBS::Polygon::material.

◆ IsVisible() [1/3]

bool SBS::DynamicMesh::IsVisible ( MeshObject * client = 0)

Definition at line 195 of file dynamicmesh.cpp.

References GetClientIndex(), meshes, and SBS::MeshObject::size.

Referenced by SBS::Camera::IsDynamicMeshVisible(), IsVisible(), SBS::DynamicMesh::Mesh::IsVisible(), and SBS::MeshObject::IsVisible().

Here is the call graph for this function:

◆ IsVisible() [2/3]

bool SBS::DynamicMesh::IsVisible ( Ogre::Camera * camera,
int mesh_index )

Definition at line 229 of file dynamicmesh.cpp.

References meshes.

◆ IsVisible() [3/3]

bool SBS::DynamicMesh::IsVisible ( Ogre::Camera * camera,
MeshObject * client = 0 )

Definition at line 212 of file dynamicmesh.cpp.

References GetClientIndex(), IsVisible(), meshes, and SBS::MeshObject::size.

Here is the call graph for this function:

◆ LoadFromFile()

bool SBS::DynamicMesh::LoadFromFile ( const std::string & filename,
const std::string & path )

◆ LoadFromMesh()

bool SBS::DynamicMesh::LoadFromMesh ( const std::string & meshname)

◆ NeedsUpdate()

void SBS::DynamicMesh::NeedsUpdate ( MeshObject * client = 0)

Definition at line 383 of file dynamicmesh.cpp.

References GetClientIndex(), meshes, Prepare(), prepared, and SBS::MeshObject::size.

Referenced by SBS::MeshObject::Prepare().

Here is the call graph for this function:

◆ Prepare()

void SBS::DynamicMesh::Prepare ( MeshObject * client = 0)

◆ RemoveClient()

void SBS::DynamicMesh::RemoveClient ( MeshObject * mesh)

Definition at line 347 of file dynamicmesh.cpp.

References client_enable, and clients.

Referenced by SBS::MeshObject::~MeshObject().

◆ SetMaterial()

void SBS::DynamicMesh::SetMaterial ( const std::string & material)

Definition at line 629 of file dynamicmesh.cpp.

References meshes, and SetMaterial().

Referenced by SetMaterial(), and SBS::MeshObject::SetMaterial().

Here is the call graph for this function:

◆ UpdateVertices()

void SBS::DynamicMesh::UpdateVertices ( MeshObject * client,
const std::string & material = "",
Polygon * polygon = 0,
bool single = false )

Definition at line 558 of file dynamicmesh.cpp.

References GetClientIndex(), and meshes.

Referenced by SBS::Polygon::ChangeHeight(), SBS::Polygon::Move(), SBS::MeshObject::OnMove(), and SBS::MeshObject::OnRotate().

Here is the call graph for this function:

◆ UseDynamicBuffers()

bool SBS::DynamicMesh::UseDynamicBuffers ( )
inline

Definition at line 57 of file dynamicmesh.h.

Referenced by SBS::MeshObject::UsingDynamicBuffers().

Member Data Documentation

◆ auto_combine

bool SBS::DynamicMesh::auto_combine
private

Definition at line 129 of file dynamicmesh.h.

Referenced by DynamicMesh(), and Prepare().

◆ client_enable

std::vector<bool> SBS::DynamicMesh::client_enable
private

Definition at line 126 of file dynamicmesh.h.

Referenced by AddClient(), Enabled(), and RemoveClient().

◆ clients

std::vector<MeshObject*> SBS::DynamicMesh::clients
private

◆ dynamic_buffers

bool SBS::DynamicMesh::dynamic_buffers
private

Definition at line 128 of file dynamicmesh.h.

Referenced by DynamicMesh(), and Prepare().

◆ file_model

bool SBS::DynamicMesh::file_model
private

Definition at line 124 of file dynamicmesh.h.

Referenced by DynamicMesh(), LoadFromFile(), LoadFromMesh(), and Prepare().

◆ force_combine

◆ meshes

◆ node

◆ prepared

bool SBS::DynamicMesh::prepared
private

◆ render_distance

Real SBS::DynamicMesh::render_distance
private

Definition at line 123 of file dynamicmesh.h.

Referenced by DynamicMesh(), LoadFromFile(), LoadFromMesh(), and Prepare().


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