edu.stanford.rsl.konrad.geometry.shapes.simple
Class QuadricSurface

java.lang.Object
  extended by edu.stanford.rsl.konrad.geometry.AbstractShape
      extended by edu.stanford.rsl.konrad.geometry.AbstractSurface
          extended by edu.stanford.rsl.konrad.geometry.shapes.simple.SimpleSurface
              extended by edu.stanford.rsl.konrad.geometry.shapes.simple.QuadricSurface
All Implemented Interfaces:
Transformable, java.io.Serializable
Direct Known Subclasses:
Cone, Cylinder, Ellipsoid, Sphere

public abstract class QuadricSurface
extends SimpleSurface

Class to model an arbitrary quadric surface Rotimi X Ojo

See Also:
Serialized Form

Constructor Summary
QuadricSurface()
           
 
Method Summary
 void applyTransform(Transform t)
          Applies the Transform t to the object.
 PointND evaluate(double u, double v)
          Returns a point on the surface at position (u, v).
 int getDimension()
          Returns the external dimension of the shape.
 java.util.ArrayList<PointND> getHits(AbstractCurve other)
           
 java.util.ArrayList<PointND> getHitsOnBoundingBox(AbstractCurve other)
           
 PointND[] getRasterPoints(int number)
          Rasters the shape with a given number of points or less.
abstract  boolean isBounded()
          Returns true if the shape is of limited space
 boolean isMember(PointND point)
          Determines if the given point in within the bounds of shape;
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.shapes.simple.SimpleSurface
addAllBoundingConditions, addBoundingCondition, evaluate, getChangeOfAxisMatrix, getInternalDimension, getPrincipalAxis, getTransform, intersect
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractShape
getHitsOnBoundingBox_slow, getMax, getMin
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuadricSurface

public QuadricSurface()
Method Detail

getHits

public java.util.ArrayList<PointND> getHits(AbstractCurve other)
Specified by:
getHits in class SimpleSurface

isBounded

public abstract boolean isBounded()
Description copied from class: AbstractShape
Returns true if the shape is of limited space

Specified by:
isBounded in class AbstractShape
Returns:
Boundedness of this shape.

getDimension

public int getDimension()
Description copied from class: AbstractShape
Returns the external dimension of the shape.

Specified by:
getDimension in class AbstractShape
Returns:
the dimension

isMember

public boolean isMember(PointND point)
Description copied from class: SimpleSurface
Determines if the given point in within the bounds of shape;

Specified by:
isMember in class SimpleSurface
Returns:
true if the point is within the surface

getHitsOnBoundingBox

public java.util.ArrayList<PointND> getHitsOnBoundingBox(AbstractCurve other)
Overrides:
getHitsOnBoundingBox in class AbstractShape

getRasterPoints

public PointND[] getRasterPoints(int number)
Description copied from class: AbstractShape
Rasters the shape with a given number of points or less. If the shape is not bounded null is returned.

Specified by:
getRasterPoints in class AbstractShape
Parameters:
number - the number of points
Returns:
the raster points

applyTransform

public void applyTransform(Transform t)
Description copied from interface: Transformable
Applies the Transform t to the object.

Specified by:
applyTransform in interface Transformable
Specified by:
applyTransform in class AbstractShape
Parameters:
t - the transform to apply to the object.

evaluate

public PointND evaluate(double u,
                        double v)
Description copied from class: AbstractSurface
Returns a point on the surface at position (u, v). u, v in [0, 1];

Specified by:
evaluate in class AbstractSurface
Parameters:
u - the internal position in u dimension
v - the internal position in v dimension
Returns:
the surface point