Package com.rvandoosselaer.blocks
Interface Shape
-
public interface Shape
The interface describing the shape of aBlock
element. Theadd(Vec3i, Chunk, ChunkMesh)
method is called for each block in the chunk when the mesh is constructed using theChunkMeshGenerator
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(com.simsilica.mathd.Vec3i location, Chunk chunk, ChunkMesh chunkMesh)
Adds the shape at the location in the chunk to the chunk mesh.static com.jme3.math.Vector3f
createVertex(com.jme3.math.Vector3f vertex, com.simsilica.mathd.Vec3i blockLocation, float blockScale)
A helper method that offsets a vertex based on the location of the block in the chunk and the block scale.
-
-
-
Method Detail
-
add
void add(com.simsilica.mathd.Vec3i location, Chunk chunk, ChunkMesh chunkMesh)
Adds the shape at the location in the chunk to the chunk mesh.- Parameters:
location
- of the shape in the chunkchunk
- of the shapechunkMesh
- to add the shape to
-
createVertex
static com.jme3.math.Vector3f createVertex(com.jme3.math.Vector3f vertex, com.simsilica.mathd.Vec3i blockLocation, float blockScale)
A helper method that offsets a vertex based on the location of the block in the chunk and the block scale.- Parameters:
vertex
-blockLocation
-blockScale
-- Returns:
- the same vertex with an offset
-
-