Class RoundedCube
java.lang.Object
eu.mihosoft.vrl.v3d.RoundedCube
- All Implemented Interfaces:
Primitive
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.RoundedCube(double size) Constructor.RoundedCube(double w, double h, double d) Constructor.RoundedCube(Vector3d center, Vector3d dimensions) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncornerRadius(double cornerRadius) doubleReturns the property storage of this primitive.intnoCenter()Defines that this cube will not be centered.resolution(int resolution) voidvoidsetCornerRadius(double cornerRadius) voidsetDimensions(Vector3d dimensions) voidsetResolution(int resolution) Returns the polygons that define this primitive.
-
Constructor Details
-
RoundedCube
public RoundedCube()Constructor. Creates a new rounded cube with center[0,0,0]and dimensions[1,1,1]. -
RoundedCube
public RoundedCube(double size) Constructor. Creates a new rounded cube with center[0,0,0]and dimensions[size,size,size].- Parameters:
size- size
-
RoundedCube
-
RoundedCube
public RoundedCube(double w, double h, double d) Constructor. Creates a new rounded cuboid with center[0,0,0]and with the specified dimensions.- Parameters:
w- widthh- heightd- depth
-
-
Method Details
-
toPolygons
Description copied from interface:PrimitiveReturns the polygons that define this primitive. Note: this method computes the polygons each time this method is called. The polygons can be cached inside aCSGobject.- Specified by:
toPolygonsin interfacePrimitive- Returns:
- a list of polygons that define this primitive
-
getProperties
Description copied from interface:PrimitiveReturns the property storage of this primitive.- Specified by:
getPropertiesin interfacePrimitive- Returns:
- the property storage of this primitive
-
getCenter
- Returns:
- the center
-
setCenter
- Parameters:
center- the center to set
-
getDimensions
- Returns:
- the dimensions
-
setDimensions
- Parameters:
dimensions- the dimensions to set
-
noCenter
-
getResolution
public int getResolution()- Returns:
- the resolution
-
setResolution
public void setResolution(int resolution) - Parameters:
resolution- the resolution to set
-
resolution
- Parameters:
resolution- the resolution to set- Returns:
- this cube
-
getCornerRadius
public double getCornerRadius()- Returns:
- the corner radius
-
setCornerRadius
public void setCornerRadius(double cornerRadius) - Parameters:
cornerRadius- the corner radius to set
-
cornerRadius
- Parameters:
cornerRadius- the corner radius to set- Returns:
- this cube
-