javax.media.j3d
Class CachedFrustum

java.lang.Object
  extended by javax.media.j3d.CachedFrustum

 class CachedFrustum
extends java.lang.Object

The CachedFrustum class is used to pre compute data for a set of view frustum planes which allows more efficient intersection testing. The CachedFrustum caches data for frustums for effecient intersection testing.


Field Summary
(package private)  Point3d center
           
(package private)  Vector4d[] clipPlanes
           
(package private) static double EPSILON
           
(package private)  Point3d lower
           
(package private)  Point3d upper
           
(package private)  Point3d[] verts
           
 
Constructor Summary
CachedFrustum()
          Constructs and initializes a new default CachedFrustum
CachedFrustum(Vector4d[] planes)
          Constructs and initializes a new CachedFrustum using the values provided in the argument.
 
Method Summary
private  void computeValues(Vector4d[] planes)
          Computes cached values.
private  void computeVertex(int a, int b, int c, Point3d vert)
           
(package private)  void set(Vector4d[] planes)
          Sets the values of the CachedFrustum based on a new set of frustum planes.
 java.lang.String toString()
          Returns a string containing the values of the CachedFrustum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EPSILON

static final double EPSILON
See Also:
Constant Field Values

clipPlanes

Vector4d[] clipPlanes

verts

Point3d[] verts

upper

Point3d upper

lower

Point3d lower

center

Point3d center
Constructor Detail

CachedFrustum

CachedFrustum(Vector4d[] planes)
Constructs and initializes a new CachedFrustum using the values provided in the argument.

Parameters:
planes - array specifying the frustum's clip plane position

CachedFrustum

CachedFrustum()
Constructs and initializes a new default CachedFrustum

Parameters:
planes - array specifying the frustum's clip planes
Method Detail

toString

public java.lang.String toString()
Returns a string containing the values of the CachedFrustum.

Overrides:
toString in class java.lang.Object

set

void set(Vector4d[] planes)
Sets the values of the CachedFrustum based on a new set of frustum planes.

Parameters:
planes - array specifying the frustum's clip planes

computeValues

private void computeValues(Vector4d[] planes)
Computes cached values.

Parameters:
planes - array specifying the frustum's clip planes

computeVertex

private void computeVertex(int a,
                           int b,
                           int c,
                           Point3d vert)


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.