Class FrustumBase

  extended by de.grogra.vecmath.geom.VolumeBase
      extended by de.grogra.vecmath.geom.TransformableVolume
          extended by de.grogra.vecmath.geom.FrustumBase
All Implemented Interfaces:
Direct Known Subclasses:
Cone, Cylinder

public abstract class FrustumBase
extends TransformableVolume

This class represents the geometry of a cone. In local object coordinates, the tip is located at the origin, the axis points in the z-direction, and the half opening angle is 45 degrees.

Ole Kniemeyer

Field Summary
static int BASE
static int LATERAL
 float scaleV
          Scaling factor for v coordinate: v coordinates of lateral face range from 0 to scaleV.
static int TOP
Fields inherited from class de.grogra.vecmath.geom.TransformableVolume
m00, m01, m02, m10, m11, m12, m20, m21, m22, t0, t1, t2
Constructor Summary
Method Summary
 boolean boxContainsBoundary(BoundingBox box, Tuple3d center, double radius, Variables temp)
          Returns true if the specified box contains (part of) the boundary surface of this volume.
 boolean intersect(Line line)
          Intersects this object with line.
Methods inherited from class de.grogra.vecmath.geom.TransformableVolume
getDiscExtent, getDiscsExtent, getFrobeniusNorm, getObjectToWorldRotationScale, getTransformation, invalidate, invTransformPoint, scale, setTransformation, setTransformation, transformPoint, transformTranspose, transformVector, translate
Methods inherited from class de.grogra.vecmath.geom.VolumeBase
addConvexIntersections, getId, operator$and, operator$com, operator$or, operator$sub, setId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.grogra.vecmath.geom.Volume
computeIntersections, computeNormal, computeTangents, computeUV, contains, getExtent

Field Detail


public static final int BASE
See Also:
Constant Field Values


public static final int LATERAL
See Also:
Constant Field Values


public float scaleV
Scaling factor for v coordinate: v coordinates of lateral face range from 0 to scaleV.


public static final int TOP
See Also:
Constant Field Values
Constructor Detail


public FrustumBase()
Method Detail


public boolean boxContainsBoundary(BoundingBox box,
                                   Tuple3d center,
                                   double radius,
                                   Variables temp)
Description copied from interface: Volume
Returns true if the specified box contains (part of) the boundary surface of this volume. Otherwise, if box and boundary do not overlap, this method should return false, but may also return true if an exact computation would be too expensive or complicated.

Note that a box contains the boundary of a closed set S iff both have a non-empty intersection and the box is not contained in the open set of S.

box - bounding box
center - center coordinates of box
radius - radius of enclosing sphere
temp - has to be provided by the invoker, may be used in implementations
true if box contains (part of) the boundary of this volume


public boolean intersect(Line line)
Intersects this object with line. The result is will be written to line by a modification of Line.start and Line.end.

line - the line to intersect with
true iff the computed intersection is valid and not empty