j3d.org Code

org.j3d.renderer.java3d.util
Class J3DViewFrustum

java.lang.Object
  extended byorg.j3d.util.frustum.ViewFrustum
      extended byorg.j3d.renderer.java3d.util.J3DViewFrustum

public class J3DViewFrustum
extends ViewFrustum

Java3D-specific implementation of the basic ViewFrustum.

Because Java3D can have multiple canvases that view a single scenegraph, the view frustum must be a bit more complex than the traditional case. It must take into account that every canvas has its own viewplatform, and they may not be looking at the same thing. That means, for culling, they will need to assemble the union of all the spaces for each canvas.

The frustum is for the previous Java3D frame that has just been rendered.

Version:
$Revision: 1.1 $
Author:
Paul Byrne, Justin Couch

Field Summary
 
Fields inherited from class org.j3d.util.frustum.ViewFrustum
CLIPPED, IN, numCanvases, OUT
 
Constructor Summary
J3DViewFrustum(javax.media.j3d.Canvas3D canvas)
          Create a new instance that operates on just a single canvas.
J3DViewFrustum(javax.media.j3d.Canvas3D[] canvasList)
          Creates new ViewFrustum that represents the collection of all canvases.
 
Method Summary
protected  void getInverseWorldProjection(int id, javax.vecmath.Matrix4d matrix)
          Request from the renderer-specific canvas the inverse projection matrix for the given canvasId.
 
Methods inherited from class org.j3d.util.frustum.ViewFrustum
getBounds, isPointInFrustum, isTriangleInFrustum, isTriangleInFrustum, manualPlatformMove, viewingPlatformMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J3DViewFrustum

public J3DViewFrustum(javax.media.j3d.Canvas3D canvas)
Create a new instance that operates on just a single canvas.

Parameters:
canvas - The canvas to use for this frustum

J3DViewFrustum

public J3DViewFrustum(javax.media.j3d.Canvas3D[] canvasList)
Creates new ViewFrustum that represents the collection of all canvases.

Parameters:
canvasList - The list of canvases to view
Method Detail

getInverseWorldProjection

protected void getInverseWorldProjection(int id,
                                         javax.vecmath.Matrix4d matrix)
Request from the renderer-specific canvas the inverse projection matrix for the given canvasId.

Specified by:
getInverseWorldProjection in class ViewFrustum
Parameters:
id - The ID of the canvas
matrix - The matrix to copy the data into

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org