jme.geometry.primitive
Class PartialDisk
java.lang.Object
jme.geometry.primitive.Primitive
jme.geometry.primitive.Quadric
jme.geometry.primitive.Disk
jme.geometry.primitive.PartialDisk
- All Implemented Interfaces:
- Geometry
- public class PartialDisk
- extends Disk
PartialDisk
defines a sliver of a disk geometry. The partial
disk is defined by two radii. That of the inner circle and that of the outer
circle. The inner radius can be zero creating a solid disk. Any value greater
than zero for the inner radius will result in a hole of the given radius.
The number of slices determine the number of subdivisions around the z axis.
While the loops determine the number of concentric rings around the center.
The angles define what the "slice" of the disk will consist of. Where 0
degrees is along the positive y-axis, 90 degrees is along the positive
x-axis, 180 degrees is along the negative y-axis, and 270 degrees is along
the negative x-axis
- Version:
- $Id: PartialDisk.java,v 1.4 2003/09/08 20:29:27 mojomonkey Exp $
- Author:
- Mark Powell
Constructor Summary |
PartialDisk(double innerRadius,
double outerRadius,
int slices,
int loops,
double startAngle,
double endAngle)
Constructor builds a new PartialDisk using the passed
parameters. |
Method Summary |
void |
render()
render handles rendering the sphere to the view context. |
void |
setEndAngle(double endAngle)
setEndAngle sets the ending angle for the slice. |
void |
setStartAngle(double startAngle)
setStartAngle sets the initial angle for the slice. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PartialDisk
public PartialDisk(double innerRadius,
double outerRadius,
int slices,
int loops,
double startAngle,
double endAngle)
- Constructor builds a new
PartialDisk
using the passed
parameters. The innerRadius, outerRadius, slices and loops are
maintained by the super class Disk
. PartialDisk
maintains the angle values.
- Parameters:
innerRadius
- the inner radius of the disk.outerRadius
- the outer radius of the disk.slices
- the number of slices for the disk.loops
- the number of loops for the disk.startAngle
- the beginning angle of the "slice".endAngle
- the last angle of the "slice".
render
public void render()
render
handles rendering the sphere to the view context.
- Specified by:
render
in interface Geometry
- Overrides:
render
in class Disk
setStartAngle
public void setStartAngle(double startAngle)
setStartAngle
sets the initial angle for the slice.
- Parameters:
startAngle
- the new start angle of this partial disk.
setEndAngle
public void setEndAngle(double endAngle)
setEndAngle
sets the ending angle for the slice.
- Parameters:
endAngle
- the new end angle of this partial disk.