My Project
Public Member Functions | Protected Member Functions | List of all members
ParaEngine::BlockGeneralTessellator Class Reference

custom model tessellation like button, stairs, etc. More...

#include <BlockTessellators.h>

Inheritance diagram for ParaEngine::BlockGeneralTessellator:
ParaEngine::BlockTessellatorBase

Public Member Functions

 BlockGeneralTessellator (CBlockWorld *pWorld)
 
virtual int32 TessellateBlock (BlockChunk *pChunk, uint16 packedBlockId, BlockRenderMethod dwShaderID, BlockVertexCompressed **pOutputData)
 generate triangles for a given block in a block world, taking all nearby blocks into consideration. More...
 
- Public Member Functions inherited from ParaEngine::BlockTessellatorBase
 BlockTessellatorBase (CBlockWorld *pWorld)
 
virtual void SetWorld (CBlockWorld *pWorld)
 
int32_t GetAvgVertexLight (int32_t v1, int32_t v2, int32_t v3, int32_t v4)
 
int32_t GetMaxVertexLight (int32_t v1, int32_t v2, int32_t v3, int32_t v4)
 not used. More...
 
uint8 GetMeshBrightness (BlockTemplate *pBlockTemplate, uint8 *blockBrightness)
 
uint32_t CalculateCubeAO ()
 calculate ambient occlusion flags for cube model. More...
 

Protected Member Functions

void TessellateLiquidOrIce (BlockRenderMethod dwShaderID)
 
void TessellateStdCube (BlockRenderMethod dwShaderID)
 
void TessellateUniformLightingCustomModel (BlockRenderMethod dwShaderID)
 
void TessellateSelfLightingCustomModel (BlockRenderMethod dwShaderID)
 
- Protected Member Functions inherited from ParaEngine::BlockTessellatorBase
bool UpdateCurrentBlock (BlockChunk *pChunk, uint16 packedBlockId)
 update the current block info, including all block position, m_pCurBlockModel, m_nBlockData, etc. More...
 
void FetchNearbyBlockInfo (BlockChunk *pChunk, const Uint16x3 &packedBlockId, int nNearbyBlockCount=27, int nNearbyLightCount=-1)
 fetch and update nearby (3*3*3=27 blocks) block id and block brightness. More...
 

Additional Inherited Members

- Public Attributes inherited from ParaEngine::BlockTessellatorBase
BlockneighborBlocks [27]
 
uint8_t blockBrightness [27 *3]
 
BlockModel tessellatedModel
 
- Protected Attributes inherited from ParaEngine::BlockTessellatorBase
CBlockWorldm_pWorld
 
BlockTemplatem_pCurBlockTemplate
 
uint32 m_nBlockData
 
BlockModelm_pCurBlockModel
 
Uint16x3 m_blockId_ws
 
BlockChunkm_pChunk
 
Uint16x3 m_blockId_cs
 

Detailed Description

custom model tessellation like button, stairs, etc.

Member Function Documentation

§ TessellateBlock()

int32 ParaEngine::BlockGeneralTessellator::TessellateBlock ( BlockChunk pChunk,
uint16  packedBlockId,
BlockRenderMethod  dwShaderID,
BlockVertexCompressed **  pOutputData 
)
virtual

generate triangles for a given block in a block world, taking all nearby blocks into consideration.

Reimplemented from ParaEngine::BlockTessellatorBase.


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