Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Data Fields | Protected Types | Protected Attributes | Static Private Member Functions | Private Attributes
Forests::BatchedGeometry::SubBatch Class Reference

Description

Visible chunk of geometry.

Definition at line 28 of file BatchedGeometry.h.

+ Inheritance diagram for Forests::BatchedGeometry::SubBatch:

Data Structures

struct  QueuedMesh
 

Public Member Functions

 SubBatch (BatchedGeometry *parent, Ogre::SubEntity *ent)
 
 ~SubBatch ()
 
void addSubEntity (Ogre::SubEntity *ent, const Ogre::Vector3 &position, const Ogre::Quaternion &orientation, const Ogre::Vector3 &scale, const Ogre::ColourValue &color=Ogre::ColourValue::White, void *userData=NULL)
 
virtual void build ()
 
void clear ()
 
void addSelfToRenderQueue (Ogre::RenderQueueGroup *rqg)
 
void getRenderOperation (Ogre::RenderOperation &op)
 
Ogre::Real getSquaredViewDepth (const Ogre::Camera *cam) const
 
const Ogre::LightList & getLights (void) const
 
void setMaterial (Ogre::MaterialPtr &mat)
 
void setMaterialName (const Ogre::String &mat, const Ogre::String &rg=Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
 
const Ogre::String & getMaterialName () const
 
Ogre::Technique * getTechnique () const
 
const Ogre::MaterialPtr & getMaterial (void) const
 
void getWorldTransforms (Ogre::Matrix4 *xform) const
 
const Ogre::Quaternion & getWorldOrientation (void) const
 
const Ogre::Vector3 & getWorldPosition (void) const
 
bool castsShadows (void) const
 

Data Fields

Ogre::VertexData * m_pVertexData
 
Ogre::IndexData * m_pIndexData
 

Protected Types

typedef std::vector< QueuedMesh > TMeshQueue
 

Protected Attributes

bool m_Built
 
bool m_RequireVertexColors
 
Ogre::SubMesh * m_pSubMesh
 
BatchedGeometry * m_pParentGeom
 
Ogre::MaterialPtr m_ptrMaterial
 
TMeshQueue m_queueMesh
 

Static Private Member Functions

static void _buildIdentiryOrientation (const QueuedMesh &queuedMesh, const Ogre::Vector3 &parentGeomCenter, const std::vector< Ogre::VertexDeclaration::VertexElementList > &vertexBufferElements, std::vector< Ogre::uchar * > &vertexBuffers, Ogre::VertexData *dst)
 
static void _buildFullTransform (const QueuedMesh &queuedMesh, const Ogre::Vector3 &parentGeomCenter, const std::vector< Ogre::VertexDeclaration::VertexElementList > &vertexBufferElements, std::vector< Ogre::uchar * > &vertexBuffers, Ogre::VertexData *dst)
 

Private Attributes

Ogre::Technique * m_pBestTechnique
 

Member Typedef Documentation

◆ TMeshQueue

Queue of meshes for build batch of geometry.

Definition at line 56 of file BatchedGeometry.h.

Constructor & Destructor Documentation

◆ SubBatch()

BatchedGeometry::SubBatch::SubBatch ( BatchedGeometry *  parent,
Ogre::SubEntity *  ent 
)

Constructor.

Definition at line 473 of file BatchedGeometry.cpp.

◆ ~SubBatch()

BatchedGeometry::SubBatch::~SubBatch ( )

Destructor.

Definition at line 532 of file BatchedGeometry.cpp.

Member Function Documentation

◆ _buildFullTransform()

void BatchedGeometry::SubBatch::_buildFullTransform ( const QueuedMesh &  queuedMesh,
const Ogre::Vector3 &  parentGeomCenter,
const std::vector< Ogre::VertexDeclaration::VertexElementList > &  vertexBufferElements,
std::vector< Ogre::uchar * > &  vertexBuffers,
Ogre::VertexData *  dst 
)
staticprivate

Build vertex of QueuedMesh if it have some orientation.

Definition at line 828 of file BatchedGeometry.cpp.

◆ _buildIdentiryOrientation()

void BatchedGeometry::SubBatch::_buildIdentiryOrientation ( const QueuedMesh &  queuedMesh,
const Ogre::Vector3 &  parentGeomCenter,
const std::vector< Ogre::VertexDeclaration::VertexElementList > &  vertexBufferElements,
std::vector< Ogre::uchar * > &  vertexBuffers,
Ogre::VertexData *  dst 
)
staticprivate

Build vertex of QueuedMesh if it have identity orientation.

Definition at line 704 of file BatchedGeometry.cpp.

◆ addSelfToRenderQueue()

void BatchedGeometry::SubBatch::addSelfToRenderQueue ( Ogre::RenderQueueGroup *  rqg)

Definition at line 983 of file BatchedGeometry.cpp.

◆ addSubEntity()

void BatchedGeometry::SubBatch::addSubEntity ( Ogre::SubEntity *  ent,
const Ogre::Vector3 &  position,
const Ogre::Quaternion &  orientation,
const Ogre::Vector3 &  scale,
const Ogre::ColourValue &  color = Ogre::ColourValue::White,
void *  userData = NULL 
)

Definition at line 543 of file BatchedGeometry.cpp.

◆ build()

void BatchedGeometry::SubBatch::build ( )
virtual

Build (assemble a vertex/index buffers) geometry for rendering.

Definition at line 578 of file BatchedGeometry.cpp.

◆ castsShadows()

bool Forests::BatchedGeometry::SubBatch::castsShadows ( void  ) const
inline

Definition at line 101 of file BatchedGeometry.h.

◆ clear()

void BatchedGeometry::SubBatch::clear ( )

Definition at line 959 of file BatchedGeometry.cpp.

◆ getLights()

const Ogre::LightList & BatchedGeometry::SubBatch::getLights ( void  ) const

Definition at line 1017 of file BatchedGeometry.cpp.

◆ getMaterial()

const Ogre::MaterialPtr & Forests::BatchedGeometry::SubBatch::getMaterial ( void  ) const
inline

Definition at line 97 of file BatchedGeometry.h.

◆ getMaterialName()

const Ogre::String & Forests::BatchedGeometry::SubBatch::getMaterialName ( ) const
inline

Get material name. Be careful, resource group name missing.

Definition at line 95 of file BatchedGeometry.h.

◆ getRenderOperation()

void BatchedGeometry::SubBatch::getRenderOperation ( Ogre::RenderOperation &  op)

Definition at line 997 of file BatchedGeometry.cpp.

◆ getSquaredViewDepth()

Real BatchedGeometry::SubBatch::getSquaredViewDepth ( const Ogre::Camera *  cam) const

Definition at line 1009 of file BatchedGeometry.cpp.

◆ getTechnique()

Ogre::Technique * Forests::BatchedGeometry::SubBatch::getTechnique ( ) const
inline

Definition at line 96 of file BatchedGeometry.h.

◆ getWorldOrientation()

const Ogre::Quaternion & Forests::BatchedGeometry::SubBatch::getWorldOrientation ( void  ) const
inline

Definition at line 99 of file BatchedGeometry.h.

◆ getWorldPosition()

const Ogre::Vector3 & Forests::BatchedGeometry::SubBatch::getWorldPosition ( void  ) const
inline

Definition at line 100 of file BatchedGeometry.h.

◆ getWorldTransforms()

void Forests::BatchedGeometry::SubBatch::getWorldTransforms ( Ogre::Matrix4 *  xform) const
inline

Definition at line 98 of file BatchedGeometry.h.

◆ setMaterial()

void Forests::BatchedGeometry::SubBatch::setMaterial ( Ogre::MaterialPtr &  mat)
inline

Definition at line 87 of file BatchedGeometry.h.

◆ setMaterialName()

void Forests::BatchedGeometry::SubBatch::setMaterialName ( const Ogre::String &  mat,
const Ogre::String &  rg = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME 
)
inline

Definition at line 88 of file BatchedGeometry.h.

Field Documentation

◆ m_Built

bool Forests::BatchedGeometry::SubBatch::m_Built
protected

Definition at line 122 of file BatchedGeometry.h.

◆ m_pBestTechnique

Ogre::Technique* Forests::BatchedGeometry::SubBatch::m_pBestTechnique
private

Technique recalculated every frame.

Definition at line 130 of file BatchedGeometry.h.

◆ m_pIndexData

Ogre::IndexData* Forests::BatchedGeometry::SubBatch::m_pIndexData

Definition at line 119 of file BatchedGeometry.h.

◆ m_pParentGeom

BatchedGeometry* Forests::BatchedGeometry::SubBatch::m_pParentGeom
protected

Definition at line 125 of file BatchedGeometry.h.

◆ m_pSubMesh

Ogre::SubMesh* Forests::BatchedGeometry::SubBatch::m_pSubMesh
protected

Ogre::SubMesh for Index/Vertex buffers manipulation.

Definition at line 124 of file BatchedGeometry.h.

◆ m_ptrMaterial

Ogre::MaterialPtr Forests::BatchedGeometry::SubBatch::m_ptrMaterial
protected

Definition at line 126 of file BatchedGeometry.h.

◆ m_pVertexData

Ogre::VertexData* Forests::BatchedGeometry::SubBatch::m_pVertexData

Definition at line 118 of file BatchedGeometry.h.

◆ m_queueMesh

TMeshQueue Forests::BatchedGeometry::SubBatch::m_queueMesh
protected

The list of meshes to be added to this batch.

Definition at line 127 of file BatchedGeometry.h.

◆ m_RequireVertexColors

bool Forests::BatchedGeometry::SubBatch::m_RequireVertexColors
protected

Definition at line 123 of file BatchedGeometry.h.


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