jme.geometry.primitive
Class PartialDisk

java.lang.Object
  extended byjme.geometry.primitive.Primitive
      extended byjme.geometry.primitive.Quadric
          extended byjme.geometry.primitive.Disk
              extended byjme.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

Field Summary
 
Fields inherited from class jme.geometry.primitive.Disk
innerRadius, loops, outerRadius, slices
 
Fields inherited from class jme.geometry.primitive.Quadric
quadricPointer
 
Fields inherited from class jme.geometry.primitive.Primitive
alpha, blue, green, red
 
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 jme.geometry.primitive.Disk
getPoints, setInnerRadius, setLoops, setOuterRadius, setSlices
 
Methods inherited from class jme.geometry.primitive.Quadric
initialize, preRender
 
Methods inherited from class jme.geometry.primitive.Primitive
clean, getTextureId, setColor, setTexture, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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".
Method Detail

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.