Contents
Class Cylinder
java.lang.Object
eu.mihosoft.vrl.v3d.Cylinder
- All Implemented Interfaces:
Primitive
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnd()
double
int
Returns the property storage of this primitive.getStart()
double
void
void
setEndRadius
(double radius) void
setNumSlices
(int numSlices) void
void
setStartRadius
(double radius) Returns the polygons that define this primitive.
-
Constructor Details
-
Cylinder
public Cylinder()Constructor. Creates a new cylinder with center[0,0,0]
and ranging from[0,-0.5,0]
to[0,0.5,0]
, i.e.size = 1
. -
Cylinder
Constructor. Creates a cylinder ranging fromstart
toend
with the specifiedradius
. The resolution of the tessellation can be controlled withnumSlices
.- Parameters:
start
- cylinder startend
- cylinder endradius
- cylinder radiusnumSlices
- number of slices (used for tessellation)
-
Cylinder
Constructor. Creates a cylinder ranging fromstart
toend
with the specifiedradius
. The resolution of the tessellation can be controlled withnumSlices
.- Parameters:
start
- cylinder startend
- cylinder endstartRadius
- cylinder start radiusendRadius
- cylinder end radiusnumSlices
- number of slices (used for tessellation)
-
Cylinder
public Cylinder(double radius, double height, int numSlices) Constructor. Creates a cylinder ranging from[0,0,0]
to[0,0,height]
with the specifiedradius
andheight
. The resolution of the tessellation can be controlled withnumSlices
.- Parameters:
radius
- cylinder radiusheight
- cylinder heightnumSlices
- number of slices (used for tessellation)
-
Cylinder
public Cylinder(double startRadius, double endRadius, double height, int numSlices) Constructor. Creates a cylinder ranging from[0,0,0]
to[0,0,height]
with the specifiedradius
andheight
. The resolution of the tessellation can be controlled withnumSlices
.- Parameters:
startRadius
- cylinder start radiusendRadius
- cylinder end radiusheight
- cylinder heightnumSlices
- number of slices (used for tessellation)
-
-
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
-
getStart
- Returns:
- the start
-
setStart
- Parameters:
start
- the start to set
-
getEnd
- Returns:
- the end
-
setEnd
- Parameters:
end
- the end to set
-
getStartRadius
public double getStartRadius()- Returns:
- the radius
-
setStartRadius
public void setStartRadius(double radius) - Parameters:
radius
- the radius to set
-
getEndRadius
public double getEndRadius()- Returns:
- the radius
-
setEndRadius
public void setEndRadius(double radius) - Parameters:
radius
- the radius to set
-
getNumSlices
public int getNumSlices()- Returns:
- the number of slices
-
setNumSlices
public void setNumSlices(int numSlices) - Parameters:
numSlices
- the number of slices 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
-