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

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
All Implemented Interfaces:
Transformable, java.io.Serializable
Direct Known Subclasses:
ArbitrarySurface, Box, QuadricSurface

public abstract class SimpleSurface
extends AbstractSurface

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
SimpleSurface()
           
 
Method Summary
 void addAllBoundingConditions(java.util.Collection<? extends AbstractBoundingCondition> conditions)
          Adds a collection of bounding conditions
 void addBoundingCondition(AbstractBoundingCondition condition)
          Adds a bounding condition
 PointND evaluate(PointND u)
          Returns the point on the shape at the internal position u.
 SimpleMatrix getChangeOfAxisMatrix(Axis newAxis)
          Calculates matrix for rotating shape from a principal axis to new axis.
abstract  java.util.ArrayList<PointND> getHits(AbstractCurve other)
           
 int getInternalDimension()
          returns the internal dimension of the shape, i.e.
abstract  Axis getPrincipalAxis()
           
 Transform getTransform()
          Returns cloned copy of shape's affine transform
 java.util.ArrayList<PointND> intersect(AbstractCurve other)
          Returns the intersection points between the curve and the shape.
abstract  boolean isMember(PointND point)
          Determines if the given point in within the bounds of shape;
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractSurface
evaluate
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractShape
applyTransform, getDimension, getHitsOnBoundingBox_slow, getHitsOnBoundingBox, getMax, getMin, getRasterPoints, isBounded
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

SimpleSurface

public SimpleSurface()
Method Detail

intersect

public java.util.ArrayList<PointND> intersect(AbstractCurve other)
Description copied from class: AbstractShape
Returns the intersection points between the curve and the shape. Returns null, if the intersection is empty.

Specified by:
intersect in class AbstractShape
Returns:
the intersection points.

getHits

public abstract java.util.ArrayList<PointND> getHits(AbstractCurve other)

getChangeOfAxisMatrix

public SimpleMatrix getChangeOfAxisMatrix(Axis newAxis)
Calculates matrix for rotating shape from a principal axis to new axis. Special case of change of coordinate.

Parameters:
newAxis -
Returns:
the matrix

isMember

public abstract boolean isMember(PointND point)
Determines if the given point in within the bounds of shape;

Parameters:
point -
Returns:
true if the point is within the surface

addBoundingCondition

public void addBoundingCondition(AbstractBoundingCondition condition)
Adds a bounding condition

Parameters:
condition -

getPrincipalAxis

public abstract Axis getPrincipalAxis()

addAllBoundingConditions

public void addAllBoundingConditions(java.util.Collection<? extends AbstractBoundingCondition> conditions)
Adds a collection of bounding conditions

Parameters:
conditions -

getInternalDimension

public int getInternalDimension()
Description copied from class: AbstractShape
returns the internal dimension of the shape, i.e. 1 if it is a curve, 2 if it is a surface, etc.

Overrides:
getInternalDimension in class AbstractSurface
Returns:
the internal dimension

evaluate

public PointND evaluate(PointND u)
Description copied from class: AbstractShape
Returns the point on the shape at the internal position u. If the shape is a curve, u is of dimension 1, if the shape is a surface u is of dimension 2, etc.

Overrides:
evaluate in class AbstractSurface
Parameters:
u - the point in the internal parameter dimension
Returns:
the point on the shape at the internal dimension

getTransform

public Transform getTransform()
Returns cloned copy of shape's affine transform

Returns:
the transform