Package eu.mihosoft.vrl.v3d
Class Cylinder
java.lang.Object
eu.mihosoft.vrl.v3d.Cylinder
- All Implemented Interfaces:
- Primitive
A solid cylinder.
 The tessellation can be controlled via the 
numSlices parameter.- Author:
- Michael Hoffer <info@michaelhoffer.de>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetEnd()doubleintReturns the property storage of this primitive.getStart()doublevoidvoidsetEndRadius(double radius) voidsetNumSlices(int numSlices) voidvoidsetStartRadius(double radius) Returns the polygons that define this primitive.
- 
Constructor Details- 
Cylinderpublic 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.
- 
CylinderConstructor. Creates a cylinder ranging fromstarttoendwith the specifiedradius. The resolution of the tessellation can be controlled withnumSlices.- Parameters:
- start- cylinder start
- end- cylinder end
- radius- cylinder radius
- numSlices- number of slices (used for tessellation)
 
- 
CylinderConstructor. Creates a cylinder ranging fromstarttoendwith the specifiedradius. The resolution of the tessellation can be controlled withnumSlices.- Parameters:
- start- cylinder start
- end- cylinder end
- startRadius- cylinder start radius
- endRadius- cylinder end radius
- numSlices- number of slices (used for tessellation)
 
- 
Cylinderpublic Cylinder(double radius, double height, int numSlices) Constructor. Creates a cylinder ranging from[0,0,0]to[0,0,height]with the specifiedradiusandheight. The resolution of the tessellation can be controlled withnumSlices.- Parameters:
- radius- cylinder radius
- height- cylinder height
- numSlices- number of slices (used for tessellation)
 
- 
Cylinderpublic Cylinder(double startRadius, double endRadius, double height, int numSlices) Constructor. Creates a cylinder ranging from[0,0,0]to[0,0,height]with the specifiedradiusandheight. The resolution of the tessellation can be controlled withnumSlices.- Parameters:
- startRadius- cylinder start radius
- endRadius- cylinder end radius
- height- cylinder height
- numSlices- number of slices (used for tessellation)
 
 
- 
- 
Method Details- 
toPolygonsDescription 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 interface- Primitive
- 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
 
- 
getStartRadiuspublic double getStartRadius()- Returns:
- the radius
 
- 
setStartRadiuspublic void setStartRadius(double radius) - Parameters:
- radius- the radius to set
 
- 
getEndRadiuspublic double getEndRadius()- Returns:
- the radius
 
- 
setEndRadiuspublic void setEndRadius(double radius) - Parameters:
- radius- the radius to set
 
- 
getNumSlicespublic int getNumSlices()- Returns:
- the number of slices
 
- 
setNumSlicespublic void setNumSlices(int numSlices) - Parameters:
- numSlices- the number of slices to set
 
- 
getPropertiesDescription copied from interface:PrimitiveReturns the property storage of this primitive.- Specified by:
- getPropertiesin interface- Primitive
- Returns:
- the property storage of this primitive
 
 
-