backend.spheremodel
Class SphereCircleModel

java.lang.Object
  extended by java.util.Observable
      extended by backend.spheremodel.SphereBasicObject
          extended by backend.spheremodel.SphereMultiPointBase
              extended by backend.spheremodel.SphereCircleModel
All Implemented Interfaces:
CircleIntersection, java.util.Observer

public class SphereCircleModel
extends SphereMultiPointBase
implements java.util.Observer, CircleIntersection

SphereCircleModel represents a circle on the sphere


Constructor Summary
SphereCircleModel(SpherePointModel axisOfRot, SpherePointModel radiusPoint)
          The SphereCircleModel default constructor
 
Method Summary
 boolean equals(java.lang.Object checkMe)
           
 float getAngle()
          getAngle will return the angle from the center point to the radius point
 SpherePointModel getCenterPoint()
          getCenterPoint will return the point at the center of the circle
 Line3f getLineFromCirc(javax.vecmath.Vector3f rotationAxis)
          getLineFromCirc this function should create a line which lies on the plane formed by the object implementing this class and it should use this axis of rotation to create the line by rotating the center point of the circle.
 javax.vecmath.Vector3f getNormalVecToPlane()
          getNormalVecToPlane() should return a normal vector to the plane created by whatever class implements this interface.
 int getNumVerticies()
          getNumVerticies will return the number of verticles this circle uses to draw
 javax.vecmath.Point3f[] getPointsOnLine()
          getPointsOnLine will return the actual points that one can use to construct this line
 SpherePointModel getRadiusPoint()
          getRadiusPoint will return the point at the edge of the circle
 void update(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class backend.spheremodel.SphereBasicObject
addChild, getChild, getChildCount, getSelected, isBeingRemoved, isHidden, notifyFamily, removeChild, setBeingRemoved, setHidden, setSelected
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphereCircleModel

public SphereCircleModel(SpherePointModel axisOfRot,
                         SpherePointModel radiusPoint)
The SphereCircleModel default constructor

Parameters:
axisOfRot - the point to rotate about, otherwise known as the center of the circle
radiusPoint - any given point on the outside edge of the circle so we have a reference point
Method Detail

getNumVerticies

public int getNumVerticies()
getNumVerticies will return the number of verticles this circle uses to draw

Specified by:
getNumVerticies in class SphereMultiPointBase
Returns:
the number of verticies used to draw this circle

getPointsOnLine

public javax.vecmath.Point3f[] getPointsOnLine()
getPointsOnLine will return the actual points that one can use to construct this line

Specified by:
getPointsOnLine in class SphereMultiPointBase
Returns:
an array of Point3f[] with the points

equals

public boolean equals(java.lang.Object checkMe)
Overrides:
equals in class java.lang.Object

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer

getCenterPoint

public SpherePointModel getCenterPoint()
getCenterPoint will return the point at the center of the circle

Returns:
the center point for this circle

getRadiusPoint

public SpherePointModel getRadiusPoint()
getRadiusPoint will return the point at the edge of the circle

Returns:
will return the point at the edge of the circle

getAngle

public float getAngle()
getAngle will return the angle from the center point to the radius point

Returns:
angle from the center point to the radius point

getLineFromCirc

public Line3f getLineFromCirc(javax.vecmath.Vector3f rotationAxis)
Description copied from interface: CircleIntersection
getLineFromCirc this function should create a line which lies on the plane formed by the object implementing this class and it should use this axis of rotation to create the line by rotating the center point of the circle.

Specified by:
getLineFromCirc in interface CircleIntersection
Parameters:
rotationAxis - is the axis of rotation to use for rotating the all important center point
Returns:
A line which lies on the plane created by the circle implementing this interface and using the axis of rotation passed in to this function.

getNormalVecToPlane

public javax.vecmath.Vector3f getNormalVecToPlane()
Description copied from interface: CircleIntersection
getNormalVecToPlane() should return a normal vector to the plane created by whatever class implements this interface. WARNING: The vector may or may not be normalized in the sense that its magnitude is one.

Specified by:
getNormalVecToPlane in interface CircleIntersection
Returns:
a vector3f which is a normal vector to this plane. Please note that which this vector will be perpendicular to the plane it may or may not be normalized