Constructor and Description |
---|
Cylinder()
Constructor.
|
Cylinder(double startRadius,
double endRadius,
double height,
int numSlices)
Constructor.
|
Cylinder(double radius,
double height,
int numSlices)
Constructor.
|
Cylinder(eu.mihosoft.vvecmath.Vector3d start,
eu.mihosoft.vvecmath.Vector3d end,
double startRadius,
double endRadius,
int numSlices)
Constructor.
|
Cylinder(eu.mihosoft.vvecmath.Vector3d start,
eu.mihosoft.vvecmath.Vector3d end,
double radius,
int numSlices)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
eu.mihosoft.vvecmath.Vector3d |
getEnd() |
double |
getEndRadius() |
int |
getNumSlices() |
PropertyStorage |
getProperties()
Returns the property storage of this primitive.
|
eu.mihosoft.vvecmath.Vector3d |
getStart() |
double |
getStartRadius() |
void |
setEnd(eu.mihosoft.vvecmath.Vector3d end) |
void |
setEndRadius(double radius) |
void |
setNumSlices(int numSlices) |
void |
setStart(eu.mihosoft.vvecmath.Vector3d start) |
void |
setStartRadius(double radius) |
java.util.List<Polygon> |
toPolygons()
Returns the polygons that define this primitive.
|
public Cylinder()
[0,0,0]
and
ranging from [0,-0.5,0]
to [0,0.5,0]
, i.e.
size = 1
.public Cylinder(eu.mihosoft.vvecmath.Vector3d start, eu.mihosoft.vvecmath.Vector3d end, double radius, int numSlices)
start
to end
with the specified radius
. The resolution of the tessellation can
be controlled with numSlices
.start
- cylinder startend
- cylinder endradius
- cylinder radiusnumSlices
- number of slices (used for tessellation)public Cylinder(eu.mihosoft.vvecmath.Vector3d start, eu.mihosoft.vvecmath.Vector3d end, double startRadius, double endRadius, int numSlices)
start
to end
with the specified radius
. The resolution of the tessellation can
be controlled with numSlices
.start
- cylinder startend
- cylinder endstartRadius
- cylinder start radiusendRadius
- cylinder end radiusnumSlices
- number of slices (used for tessellation)public Cylinder(double radius, double height, int numSlices)
[0,0,0]
to
[0,0,height]
with the specified radius
and
height
. The resolution of the tessellation can be controlled with
numSlices
.radius
- cylinder radiusheight
- cylinder heightnumSlices
- number of slices (used for tessellation)public Cylinder(double startRadius, double endRadius, double height, int numSlices)
[0,0,0]
to
[0,0,height]
with the specified radius
and
height
. The resolution of the tessellation can be controlled with
numSlices
.startRadius
- cylinder start radiusendRadius
- cylinder end radiusheight
- cylinder heightnumSlices
- number of slices (used for tessellation)public java.util.List<Polygon> toPolygons()
Primitive
CSG
object.toPolygons
in interface Primitive
public eu.mihosoft.vvecmath.Vector3d getStart()
public void setStart(eu.mihosoft.vvecmath.Vector3d start)
start
- the start to setpublic eu.mihosoft.vvecmath.Vector3d getEnd()
public void setEnd(eu.mihosoft.vvecmath.Vector3d end)
end
- the end to setpublic double getStartRadius()
public void setStartRadius(double radius)
radius
- the radius to setpublic double getEndRadius()
public void setEndRadius(double radius)
radius
- the radius to setpublic int getNumSlices()
public void setNumSlices(int numSlices)
numSlices
- the number of slices to setpublic PropertyStorage getProperties()
Primitive
getProperties
in interface Primitive