Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.OcclusionMeshBuilder Class Reference

OcclusionMesh builder. More...

Inheritance diagram for Dragengine.Scenery.OcclusionMeshBuilder:

Public Member Functions

Constructors
OcclusionMeshBuilder new ()
 Create occlusion mesh builder. More...
 

Management

OcclusionMesh build (String filename)
 Build occlusion mesh using filename. More...
 
void buildOcclusionMesh ()
 Build occlusion mesh. More...
 
void setBoneAt (int index, String name, int parent, Vector position, Quaternion orientation)
 Set bone. More...
 
void setWeightCount (int count)
 Set weight count. More...
 
void setWeightAt (int index, int bone, float weight)
 Set weight. More...
 
void setWeightGroupCount (int count)
 Set weight group count. More...
 
void setWeightGroupAt (int index, int count)
 Set weight group. More...
 
void setVertexCount (int count)
 Set vertex count. More...
 
void setVertexAt (int index, Vector position, int weightSet)
 Set vertex. More...
 
void setCornerCount (int count)
 Set corner count. More...
 
void setCornerAt (int count, int vertex)
 Set corner at. More...
 
void setFaceCount (int count)
 Set face count. More...
 
void setFaceAt (int index, int cornerCount)
 Set face. More...
 
void setDoubleSidedFaceCount (int doubleSidedFaceCount)
 Set double sided face count. More...
 

Detailed Description

OcclusionMesh builder.

Builds occlusion mesh resource without requiring a occlusion mesh resource file. The created occlusion mesh can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named occlusion meshs can not clash with filenames present in the virtual file system. For this reason use unnamed occlusion meshs if possible. Using named occlusion meshs though can be useful if you want to provide occlusion mesh resources to scripts not needing to know if the path they try to load is a build occlusion mesh instead of a resource one.

To use the occlusion mesh builder create a subclass and implement OcclusionMeshBuilder.buildOcclusionMesh() . You are only allowed to call methods from OcclusionMeshBuilder from inside this function call. To create the occlusion mesh call OcclusionMeshBuilder.build() . This will call OcclusionMeshBuilder.buildOcclusionMesh() to fill a new occlusion mesh resource with content. Once finished the build method returns the ready to use occlusion mesh resource. Otherwise an exception is thrown.

This is a native class.

Member Function Documentation

◆ build()

OcclusionMesh Dragengine.Scenery.OcclusionMeshBuilder.build ( String  filename)

Build occlusion mesh using filename.

The created occlusion mesh can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named occlusion meshs can not clash with filenames present in the virtual file system. For this reason use unnamed occlusion meshs if possible. Using named occlusion meshs though can be useful if you want to provide occlusion mesh resources to scripts not needing to know if the path they try to load is a build occlusion mesh instead of a resource one.

To create the occlusion mesh call build() . This will call buildOcclusionMesh() to fill a new occlusion mesh resource with content. Once finished the build method returns the ready to use occlusion mesh resource. Otherwise an exception is thrown.

◆ buildOcclusionMesh()

void Dragengine.Scenery.OcclusionMeshBuilder.buildOcclusionMesh ( )
protected

Build occlusion mesh.

Called by build(String) to fill a new occlusion mesh resource with content. You are only allowed to call methods from OcclusionMeshBuilder from inside this function call.

◆ new()

OcclusionMeshBuilder Dragengine.Scenery.OcclusionMeshBuilder.new ( )

Create occlusion mesh builder.

◆ setBoneAt()

void Dragengine.Scenery.OcclusionMeshBuilder.setBoneAt ( int  index,
String  name,
int  parent,
Vector  position,
Quaternion  orientation 
)
protected

Set bone.

◆ setCornerAt()

void Dragengine.Scenery.OcclusionMeshBuilder.setCornerAt ( int  count,
int  vertex 
)
protected

Set corner at.

◆ setCornerCount()

void Dragengine.Scenery.OcclusionMeshBuilder.setCornerCount ( int  count)
protected

Set corner count.

◆ setDoubleSidedFaceCount()

void Dragengine.Scenery.OcclusionMeshBuilder.setDoubleSidedFaceCount ( int  doubleSidedFaceCount)
protected

Set double sided face count.

◆ setFaceAt()

void Dragengine.Scenery.OcclusionMeshBuilder.setFaceAt ( int  index,
int  cornerCount 
)
protected

Set face.

◆ setFaceCount()

void Dragengine.Scenery.OcclusionMeshBuilder.setFaceCount ( int  count)
protected

Set face count.

◆ setVertexAt()

void Dragengine.Scenery.OcclusionMeshBuilder.setVertexAt ( int  index,
Vector  position,
int  weightSet 
)
protected

Set vertex.

◆ setVertexCount()

void Dragengine.Scenery.OcclusionMeshBuilder.setVertexCount ( int  count)
protected

Set vertex count.

◆ setWeightAt()

void Dragengine.Scenery.OcclusionMeshBuilder.setWeightAt ( int  index,
int  bone,
float  weight 
)
protected

Set weight.

◆ setWeightCount()

void Dragengine.Scenery.OcclusionMeshBuilder.setWeightCount ( int  count)
protected

Set weight count.

◆ setWeightGroupAt()

void Dragengine.Scenery.OcclusionMeshBuilder.setWeightGroupAt ( int  index,
int  count 
)
protected

Set weight group.

◆ setWeightGroupCount()

void Dragengine.Scenery.OcclusionMeshBuilder.setWeightGroupCount ( int  count)
protected

Set weight group count.


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