Class Box
java.lang.Object
com.marginallyclever.ro3.mesh.Mesh
com.marginallyclever.ro3.mesh.proceduralmesh.ProceduralMesh
com.marginallyclever.ro3.mesh.proceduralmesh.Box
-
Field Summary
Fields inherited from class com.marginallyclever.ro3.mesh.Mesh
BYTES_PER_FLOAT, BYTES_PER_INT, colorArray, indexArray, normalArray, NUM_BUFFERS, renderStyle, textureArray, vertexArray
-
Constructor Summary
-
Method Summary
Methods inherited from class com.marginallyclever.ro3.mesh.Mesh
addColor, addIndex, addNormal, addPropertyChangeListener, addTexCoord, addVertex, clear, fireMeshChanged, getBoundingBox, getHasColors, getHasIndexes, getHasNormals, getHasTextures, getNormal, getNumTriangles, getNumVertices, getRenderStyle, getSourceName, getTexCoord, getVertex, intersect, isDirty, isLoaded, isTransparent, removePropertyChangeListener, render, render, setDirty, setLoaded, setRenderStyle, setSourceName, setTexCoord, setVertex, unload, updateCuboid, updateVertexBuffers
-
Field Details
-
width
public double width -
height
public double height -
length
public double length
-
-
Constructor Details
-
Box
public Box() -
Box
public Box(double width, double length, double height) Create a box with the given dimensions.- Parameters:
width
- width of the box (x)length
- length of the box (y)height
- height of the box (z)
-
-
Method Details
-
getEnglishName
- Specified by:
getEnglishName
in classProceduralMesh
-
updateModel
public void updateModel()Description copied from class:ProceduralMesh
Procedurally generate a list of triangles and update the bounding box.- Specified by:
updateModel
in classProceduralMesh
-
toJSON
public org.json.JSONObject toJSON()- Overrides:
toJSON
in classProceduralMesh
-
fromJSON
public void fromJSON(org.json.JSONObject from) - Overrides:
fromJSON
in classProceduralMesh
-