Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
PreMeshBuffer Struct Reference

#include <collector.h>

+ Collaboration diagram for PreMeshBuffer:

Public Member Functions

 PreMeshBuffer ()=default
 
 PreMeshBuffer (const TileLayer &layer)
 
bool empty () const
 
void applyTileColor ()
 Colorizes vertices as indicated by tile layer.
 
bool append (const PreMeshBuffer &other)
 Append another buffer to this one.
 

Public Attributes

TileLayer layer
 
std::vector< u16 > indices
 
std::vector< video::S3DVertex > vertices
 

Constructor & Destructor Documentation

◆ PreMeshBuffer() [1/2]

PreMeshBuffer::PreMeshBuffer ( )
default

◆ PreMeshBuffer() [2/2]

PreMeshBuffer::PreMeshBuffer ( const TileLayer & layer)
inlineexplicit

Member Function Documentation

◆ append()

bool PreMeshBuffer::append ( const PreMeshBuffer & other)

Append another buffer to this one.

Returns
false if index would overflow

References indices, U16_MAX, and vertices.

◆ applyTileColor()

void PreMeshBuffer::applyTileColor ( )
inline

Colorizes vertices as indicated by tile layer.

References TileLayer::color, layer, and vertices.

◆ empty()

bool PreMeshBuffer::empty ( ) const
inline

References indices.

Member Data Documentation

◆ indices

std::vector<u16> PreMeshBuffer::indices

Referenced by append(), and empty().

◆ layer

TileLayer PreMeshBuffer::layer

Referenced by applyTileColor().

◆ vertices

std::vector<video::S3DVertex> PreMeshBuffer::vertices

Referenced by append(), and applyTileColor().


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