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

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

public class Box
extends SimpleSurface

Creates a box.

Author:
Andreas Maier, Rotimi X Ojo
See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
Box()
           
Box(double dx, double dy, double dz)
           
 
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).
 PointND evaluate(PointND u)
          Returns the point on the shape at the internal position u.
 int getDimension()
          Returns the external dimension of the shape.
 java.util.ArrayList<PointND> getHits(AbstractCurve other)
           
 int getInternalDimension()
          returns the internal dimension of the shape, i.e.
 Axis getPrincipalAxis()
           
 PointND[] getRasterPoints(int number)
          Rasters the shape with a given number of points or less.
 java.util.ArrayList<PointND> intersect(AbstractCurve other)
          Returns the intersection points between the curve and the shape.
 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, getChangeOfAxisMatrix, getTransform
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractShape
getHitsOnBoundingBox_slow, getHitsOnBoundingBox, getMax, getMin
 
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

Box

public Box()

Box

public Box(double dx,
           double dy,
           double dz)
Method Detail

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.

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

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 SimpleSurface
Parameters:
u - the point in the internal parameter dimension
Returns:
the point on the shape at the internal dimension

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

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 SimpleSurface
Returns:
the internal dimension

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.

Overrides:
intersect in class SimpleSurface
Returns:
the intersection points.

isBounded

public 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.

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

getHits

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

getPrincipalAxis

public Axis getPrincipalAxis()
Specified by:
getPrincipalAxis in class SimpleSurface

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