Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
MeshCollector Struct Reference

#include <collector.h>

+ Collaboration diagram for MeshCollector:

Public Member Functions

 MeshCollector (const v3f center_pos, v3f offset=v3f())
 
void append (const TileSpec &material, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices)
 
void append (const TileSpec &material, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices, v3f pos, video::SColor c, u8 light_source)
 

Public Attributes

std::array< std::vector< PreMeshBuffer >, MAX_TILE_LAYERSprebuffers
 
f32 m_bounding_radius_sq = 0.0f
 
v3f m_center_pos
 
v3f offset
 

Private Member Functions

void append (const TileLayer &material, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices, u8 layernum, bool use_scale=false)
 
void append (const TileLayer &material, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices, v3f pos, video::SColor c, u8 light_source, u8 layernum, bool use_scale=false)
 
PreMeshBufferfindBuffer (const TileLayer &layer, u8 layernum, u32 numVertices)
 

Constructor & Destructor Documentation

◆ MeshCollector()

MeshCollector::MeshCollector ( const v3f center_pos,
v3f offset = v3f() )
inline

Member Function Documentation

◆ append() [1/4]

void MeshCollector::append ( const TileLayer & material,
const video::S3DVertex * vertices,
u32 numVertices,
const u16 * indices,
u32 numIndices,
u8 layernum,
bool use_scale = false )
private

References findBuffer(), m_bounding_radius_sq, m_center_pos, offset, p(), and TileLayer::scale.

+ Here is the call graph for this function:

◆ append() [2/4]

void MeshCollector::append ( const TileLayer & material,
const video::S3DVertex * vertices,
u32 numVertices,
const u16 * indices,
u32 numIndices,
v3f pos,
video::SColor c,
u8 light_source,
u8 layernum,
bool use_scale = false )
private

References applyFacesShading(), findBuffer(), m_bounding_radius_sq, m_center_pos, offset, p(), and TileLayer::scale.

+ Here is the call graph for this function:

◆ append() [3/4]

void MeshCollector::append ( const TileSpec & material,
const video::S3DVertex * vertices,
u32 numVertices,
const u16 * indices,
u32 numIndices )

References append(), TileSpec::layers, MAX_TILE_LAYERS, TileLayer::texture_id, and TileSpec::world_aligned.

Referenced by append(), append(), MapblockMeshGenerator::drawCuboid(), MapblockMeshGenerator::drawLiquidBottom(), MapblockMeshGenerator::drawLiquidSides(), MapblockMeshGenerator::drawLiquidTop(), MapblockMeshGenerator::drawMeshNode(), and MapblockMeshGenerator::drawQuad().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ append() [4/4]

void MeshCollector::append ( const TileSpec & material,
const video::S3DVertex * vertices,
u32 numVertices,
const u16 * indices,
u32 numIndices,
v3f pos,
video::SColor c,
u8 light_source )

References append(), TileSpec::layers, MAX_TILE_LAYERS, TileLayer::texture_id, and TileSpec::world_aligned.

+ Here is the call graph for this function:

◆ findBuffer()

PreMeshBuffer & MeshCollector::findBuffer ( const TileLayer & layer,
u8 layernum,
u32 numVertices )
private

References p(), prebuffers, and U16_MAX.

Referenced by append(), and append().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bounding_radius_sq

f32 MeshCollector::m_bounding_radius_sq = 0.0f

◆ m_center_pos

v3f MeshCollector::m_center_pos

Referenced by append(), and append().

◆ offset

v3f MeshCollector::offset

Referenced by append(), and append().

◆ prebuffers

std::array<std::vector<PreMeshBuffer>, MAX_TILE_LAYERS> MeshCollector::prebuffers

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