public class Box extends Primitive
name, properties| Constructor and Description |
|---|
Box()
Initializes a new instance of the
Box class. |
Box(double length,
double width,
double height)
Initializes a new instance of the
Box class. |
Box(java.lang.String name,
double length,
double width,
double height,
int lengthSegments,
int widthSegments,
int heightSegments)
Initializes a new instance of the
Box class. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Check if two boxes equal
|
double |
getHeight()
Gets the height of the box aligned in y-axis.
|
int |
getHeightSegments()
gets or sets the height segments.
|
double |
getLength()
Gets the length of the box aligned in z-axis.
|
int |
getLengthSegments()
Gets the length segments.
|
double |
getWidth()
Gets the width of the box aligned in x-axis.
|
int |
getWidthSegments()
Gets the width segments
|
int |
hashCode()
Gets the hash code of current primitive instance
|
void |
setHeight(double value)
Sets the height of the box aligned in y-axis.
|
void |
setHeightSegments(int value)
gets or sets the height segments.
|
void |
setLength(double value)
Sets the length of the box aligned in z-axis.
|
void |
setLengthSegments(int value)
Sets the length segments.
|
void |
setWidth(double value)
Sets the width of the box aligned in x-axis.
|
void |
setWidthSegments(int value)
Sets the width segments
|
Mesh |
toMesh()
Convert current object to mesh
|
createEmptyMesh, getCastShadows, getReceiveShadows, merge, setCastShadows, setReceiveShadows, setupgetBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNodegetScenefindProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setPropertypublic Box()
Box class.public Box(double length,
double width,
double height)
Box class.length - Length of the box aligned in z-axis.width - Width of the box aligned in x-axis.height - Height of the box aligned in y-axis.public Box(java.lang.String name,
double length,
double width,
double height,
int lengthSegments,
int widthSegments,
int heightSegments)
Box class.name - Name of the box.length - Length of the box aligned in z-axis.width - Width of the box aligned in x-axis.height - Height of the box aligned in y-axis.lengthSegments - Length segments.widthSegments - Width segments.heightSegments - Height segments.public int getLengthSegments()
public void setLengthSegments(int value)
value - New valuepublic int getWidthSegments()
public void setWidthSegments(int value)
value - New valuepublic int getHeightSegments()
public void setHeightSegments(int value)
value - New valuepublic double getLength()
public void setLength(double value)
value - New valuepublic double getWidth()
public void setWidth(double value)
value - New valuepublic double getHeight()
public void setHeight(double value)
value - New valuepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to check equality.public Mesh toMesh()
toMesh in interface IMeshConvertibletoMesh in class Primitivepublic int hashCode()
hashCode in class java.lang.ObjectBox