Contents
Class Cube
java.lang.Object
eu.mihosoft.vrl.v3d.Cube
- All Implemented Interfaces:
Primitive
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the property storage of this primitive.noCenter()
Defines that this cube will not be centered.void
void
setDimensions
(Vector3d dimensions) Returns the polygons that define this primitive.
-
Constructor Details
-
Cube
public Cube()Constructor. Creates a new cube with center[0,0,0]
and dimensions[1,1,1]
. -
Cube
public Cube(double size) Constructor. Creates a new cube with center[0,0,0]
and dimensions[size,size,size]
.- Parameters:
size
- size
-
Cube
-
Cube
public Cube(double w, double h, double d) Constructor. Creates a new cuboid with center[0,0,0]
and with the specified dimensions.- Parameters:
w
- widthh
- heightd
- depth
-
-
Method Details
-
toPolygons
Description copied from interface:Primitive
Returns the polygons that define this primitive. Note: this method computes the polygons each time this method is called. The polygons can be cached inside aCSG
object.- Specified by:
toPolygons
in interfacePrimitive
- Returns:
- a list of polygons that define this primitive
-
getCenter
- Returns:
- the center
-
setCenter
- Parameters:
center
- the center to set
-
getDimensions
- Returns:
- the dimensions
-
setDimensions
- Parameters:
dimensions
- the dimensions to set
-
getProperties
Description copied from interface:Primitive
Returns the property storage of this primitive.- Specified by:
getProperties
in interfacePrimitive
- Returns:
- the property storage of this primitive
-
noCenter
-