Package com.rvandoosselaer.blocks.shapes
Class Slab
java.lang.Object
com.rvandoosselaer.blocks.shapes.Slab
- All Implemented Interfaces:
Shape
- Direct Known Subclasses:
SquareCuboid
A shape implementation for a slab. A slab is actual a cube shape with a controllable y (height) value. If you specify
a starting y value of 0 and an end y value of 1, you have a unit cube shape.
Only 4 vertices are used per face, 2 vertices are shared.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Directionprotected final floatprotected final floatFields inherited from interface com.rvandoosselaer.blocks.Shape
DIRECTIONS_SIZE, FACES_DIR, ROTATION_DOWN, ROTATION_EAST, ROTATION_NORTH, ROTATION_SOUTH, ROTATION_UP, ROTATION_WEST, YAW_EAST, YAW_NORTH, YAW_UP, YAW_WEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the shape at the location in the chunk to the chunk mesh.protected voidcreateDown(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) protected voidcreateEast(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) protected voidcreateNorth(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) protected voidcreateSouth(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) protected voidcreateUp(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) protected voidcreateWest(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages)
-
Field Details
-
startY
protected final float startY -
endY
protected final float endY -
direction
-
-
Constructor Details
-
Slab
public Slab(float startY, float endY) -
Slab
-
-
Method Details
-
add
Description copied from interface:ShapeAdds the shape at the location in the chunk to the chunk mesh. -
createNorth
protected void createNorth(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) -
createSouth
protected void createSouth(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) -
createEast
protected void createEast(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) -
createWest
protected void createWest(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) -
createDown
protected void createDown(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages) -
createUp
protected void createUp(com.simsilica.mathd.Vec3i location, com.jme3.math.Quaternion rotation, ChunkMesh chunkMesh, float blockScale, boolean multipleImages)
-