public class Box extends Shape3D
Box
class defines a 3 dimensional box with the specified size.
A Box
is a 3D geometry primitive created with a given depth, width,
and height. It is centered at the origin.Type | Property and Description |
---|---|
DoubleProperty |
depth
Defines the depth or the Z dimension of the Box.
|
DoubleProperty |
height
Defines the height or the Y dimension of the Box.
|
DoubleProperty |
width
Defines the width or the X dimension of the Box.
|
cullFaceProperty, drawModeProperty, materialProperty
Modifier and Type | Class and Description |
---|---|
private static class |
Box.BoxKey |
Shape3D.Key
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_SIZE |
private DoubleProperty |
depth
Defines the depth or the Z dimension of the Box.
|
private DoubleProperty |
height
Defines the height or the Y dimension of the Box.
|
private TriangleMesh |
mesh |
private DoubleProperty |
width
Defines the width or the X dimension of the Box.
|
Constructor and Description |
---|
Box()
Creates a new instance of
Box of dimension 2 by 2 by 2. |
Box(double width,
double height,
double depth)
Creates a new instance of
Box of dimension width by height
by depth. |
Modifier and Type | Method and Description |
---|---|
(package private) static TriangleMesh |
createMesh(float w,
float h,
float d) |
DoubleProperty |
depthProperty()
Defines the depth or the Z dimension of the Box.
|
private boolean |
doComputeContains(double localX,
double localY) |
private BaseBounds |
doComputeGeomBounds(BaseBounds bounds,
BaseTransform tx) |
private boolean |
doComputeIntersects(PickRay pickRay,
PickResultChooser pickResult) |
private NGNode |
doCreatePeer() |
private void |
doUpdatePeer() |
double |
getDepth()
Gets the value of the property depth.
|
double |
getHeight()
Gets the value of the property height.
|
double |
getWidth()
Gets the value of the property width.
|
DoubleProperty |
heightProperty()
Defines the height or the Y dimension of the Box.
|
void |
setDepth(double value)
Sets the value of the property depth.
|
void |
setHeight(double value)
Sets the value of the property height.
|
void |
setWidth(double value)
Sets the value of the property width.
|
DoubleProperty |
widthProperty()
Defines the width or the X dimension of the Box.
|
cullFaceProperty, drawModeProperty, getCullFace, getDrawMode, getMaterial, materialProperty, setCullFace, setDrawMode, setMaterial
public final DoubleProperty depthProperty
getDepth()
,
setDepth(double)
public final DoubleProperty heightProperty
getHeight()
,
setHeight(double)
public final DoubleProperty widthProperty
getWidth()
,
setWidth(double)
private TriangleMesh mesh
public static final double DEFAULT_SIZE
private DoubleProperty depth
private DoubleProperty height
private DoubleProperty width
public Box()
Box
of dimension 2 by 2 by 2.public Box(double width, double height, double depth)
Box
of dimension width by height
by depth.width
- the width of this boxheight
- the height of this boxdepth
- the depth of this boxpublic final void setDepth(double value)
public final double getDepth()
public final DoubleProperty depthProperty()
getDepth()
,
setDepth(double)
public final void setHeight(double value)
public final double getHeight()
public final DoubleProperty heightProperty()
getHeight()
,
setHeight(double)
public final void setWidth(double value)
public final double getWidth()
public final DoubleProperty widthProperty()
getWidth()
,
setWidth(double)
private NGNode doCreatePeer()
private void doUpdatePeer()
private BaseBounds doComputeGeomBounds(BaseBounds bounds, BaseTransform tx)
private boolean doComputeContains(double localX, double localY)
private boolean doComputeIntersects(PickRay pickRay, PickResultChooser pickResult)
static TriangleMesh createMesh(float w, float h, float d)