Broke Protocol Game API Reference  1.39
Code reference for server and client scripting
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
BrokeProtocol.Utility.Voxels.Chunk Class Reference
Inheritance diagram for BrokeProtocol.Utility.Voxels.Chunk:
BrokeProtocol.Utility.Voxels.SmoothChunk

Classes

struct  BakeJob
 
struct  MeshJob
 

Public Member Functions

void Init (int3 position, ShVoxel manager)
 
void Dispose ()
 
IEnumerator UpdateMesh ()
 

Public Attributes

Coroutine updateCoroutine
 
ShVoxel manager
 
JobHandle meshJobHandle
 
NativeArray< float3 > nativeVertices
 
NativeArray< float3 > nativeNormals
 
NativeArray< float4 > nativeTangents
 
NativeArray< int > nativeIndices
 
NativeArray< float2 > nativeUVs
 
NativeArray< Color32 > nativeColors
 
NativeArray< int > nativeCounter
 
NativeArray< byte > nativeNeighbors
 

Static Public Attributes

const int chunkPower = 5
 
const int chunkSize = 1 << chunkPower
 

Protected Member Functions

virtual JobHandle GetMeshJob ()
 
void OnDestroy ()
 

Protected Attributes

MeshRenderer meshRenderer
 
MeshFilter meshFilter
 
MeshCollider meshCollider
 
int3 position
 
Mesh mesh
 

Properties

int NeighborChunkSize [get]
 
virtual int FacesPerVoxel [get]
 
virtual int VerticesPerFace [get]
 
virtual int IndicesPerFace [get]
 

Member Function Documentation

◆ Dispose()

void BrokeProtocol.Utility.Voxels.Chunk.Dispose ( )
inline

◆ GetMeshJob()

virtual JobHandle BrokeProtocol.Utility.Voxels.Chunk.GetMeshJob ( )
protectedvirtual

◆ Init()

void BrokeProtocol.Utility.Voxels.Chunk.Init ( int3 position,
ShVoxel manager )
inline

◆ OnDestroy()

void BrokeProtocol.Utility.Voxels.Chunk.OnDestroy ( )
inlineprotected

◆ UpdateMesh()

IEnumerator BrokeProtocol.Utility.Voxels.Chunk.UpdateMesh ( )
inline

Member Data Documentation

◆ chunkPower

const int BrokeProtocol.Utility.Voxels.Chunk.chunkPower = 5
static

◆ chunkSize

const int BrokeProtocol.Utility.Voxels.Chunk.chunkSize = 1 << chunkPower
static

◆ manager

ShVoxel BrokeProtocol.Utility.Voxels.Chunk.manager

◆ mesh

Mesh BrokeProtocol.Utility.Voxels.Chunk.mesh
protected

◆ meshCollider

MeshCollider BrokeProtocol.Utility.Voxels.Chunk.meshCollider
protected

◆ meshFilter

MeshFilter BrokeProtocol.Utility.Voxels.Chunk.meshFilter
protected

◆ meshJobHandle

JobHandle BrokeProtocol.Utility.Voxels.Chunk.meshJobHandle

◆ meshRenderer

MeshRenderer BrokeProtocol.Utility.Voxels.Chunk.meshRenderer
protected

◆ nativeColors

NativeArray<Color32> BrokeProtocol.Utility.Voxels.Chunk.nativeColors

◆ nativeCounter

NativeArray<int> BrokeProtocol.Utility.Voxels.Chunk.nativeCounter

◆ nativeIndices

NativeArray<int> BrokeProtocol.Utility.Voxels.Chunk.nativeIndices

◆ nativeNeighbors

NativeArray<byte> BrokeProtocol.Utility.Voxels.Chunk.nativeNeighbors

◆ nativeNormals

NativeArray<float3> BrokeProtocol.Utility.Voxels.Chunk.nativeNormals

◆ nativeTangents

NativeArray<float4> BrokeProtocol.Utility.Voxels.Chunk.nativeTangents

◆ nativeUVs

NativeArray<float2> BrokeProtocol.Utility.Voxels.Chunk.nativeUVs

◆ nativeVertices

NativeArray<float3> BrokeProtocol.Utility.Voxels.Chunk.nativeVertices

◆ position

int3 BrokeProtocol.Utility.Voxels.Chunk.position
protected

◆ updateCoroutine

Coroutine BrokeProtocol.Utility.Voxels.Chunk.updateCoroutine

Property Documentation

◆ FacesPerVoxel

virtual int BrokeProtocol.Utility.Voxels.Chunk.FacesPerVoxel
getprotected

◆ IndicesPerFace

virtual int BrokeProtocol.Utility.Voxels.Chunk.IndicesPerFace
getprotected

◆ NeighborChunkSize

int BrokeProtocol.Utility.Voxels.Chunk.NeighborChunkSize
get

◆ VerticesPerFace

virtual int BrokeProtocol.Utility.Voxels.Chunk.VerticesPerFace
getprotected

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