Aviatrix3D
2.1.0

org.j3d.aviatrix3d.pipeline.graphics
Class GraphicsEnvironmentData

java.lang.Object
  extended by org.j3d.aviatrix3d.pipeline.RenderEnvironmentData
      extended by org.j3d.aviatrix3d.pipeline.graphics.GraphicsEnvironmentData

public class GraphicsEnvironmentData
extends RenderEnvironmentData

Data holder class used to pass the current environment data along the rendering pipeline.

End-user code should never be making use of this class unless the end user is implementing a customised rendering pipeline. This class is used as a simple internal collection of the per-frame renderable data that is passed along each stage of the pipeline.

Version:
$Revision: 3.5 $
Author:
Justin Couch

Field Summary
 ObjectRenderable background
          The current background instance, if set
 double[] backgroundFrustum
          The 6 values that define the frustum to render the background with.
 float[] backgroundTransform
          Transform holding the background matrix, including all the projection information needed to cancel out translations and scales of the viewpoint projection matrix.
 float[] cameraTransform
          The camera transformation matrix.
 RenderEffectsProcessor effectsProcessor
          If set, use this to do pre and post rendered effects
 float[] eyeOffset
          The amount of eye offset in use from the nominal middle.
 ObjectRenderable fog
          The current fog instance
 float[] projectionMatrix
          Represents custom projection matrix which was set in the ViewEnvironment by the user.
 int[] scissor
          The current dimensions of the scissor area, if set.
 boolean useStereo
          Flag to say whether this environment should be rendered using stereo or not.
static int VIEW_HEIGHT
          Index into the viewport size array for the height
static int VIEW_WIDTH
          Index into the viewport size array for the width
static int VIEW_X
          Index into the viewport size array for the X position
static int VIEW_Y
          Index into the viewport size array for the Y position
 double[] viewFrustum
          The 6 values that define the view frustum.
 int[] viewport
          The current dimensions of the viewport, if set.
 int viewProjectionType
          The projection type - one of the values from ViewEnvironmentCullable.
 
Fields inherited from class org.j3d.aviatrix3d.pipeline.RenderEnvironmentData
layerId, profilingData, subLayerId, userData, viewpoint, viewTransform
 
Constructor Summary
GraphicsEnvironmentData()
          Create a new instance of this class.
 
Method Summary
 void setScissor(int[] bounds)
          Convenience method to set the scissor array from another array
 void setViewport(int[] bounds)
          Convenience method to set the viewport array from another array
 java.lang.String toString()
          Generate a string representation of this environment data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VIEW_X

public static final int VIEW_X
Index into the viewport size array for the X position

See Also:
Constant Field Values

VIEW_Y

public static final int VIEW_Y
Index into the viewport size array for the Y position

See Also:
Constant Field Values

VIEW_WIDTH

public static final int VIEW_WIDTH
Index into the viewport size array for the width

See Also:
Constant Field Values

VIEW_HEIGHT

public static final int VIEW_HEIGHT
Index into the viewport size array for the height

See Also:
Constant Field Values

effectsProcessor

public RenderEffectsProcessor effectsProcessor
If set, use this to do pre and post rendered effects


fog

public ObjectRenderable fog
The current fog instance


background

public ObjectRenderable background
The current background instance, if set


eyeOffset

public float[] eyeOffset
The amount of eye offset in use from the nominal middle. This is a convenience data item to save the need to regenerate it at the renderer level.


viewFrustum

public double[] viewFrustum
The 6 values that define the view frustum. The order is:
viewFrustum[0] = x minimum
viewFrustum[1] = x maximum
viewFrustum[2] = y minimum
viewFrustum[3] = y maximum
viewFrustum[4] = near clip
viewFrustum[5] = far clip


projectionMatrix

public float[] projectionMatrix
Represents custom projection matrix which was set in the ViewEnvironment by the user. This value gets filled in when the user manually sets the projection matrix from the ViewEnvironment object.


backgroundFrustum

public double[] backgroundFrustum
The 6 values that define the frustum to render the background with. The order is:
backgroundFrustum[0] = x minimum
backgroundFrustum[1] = x maximum
backgroundFrustum[2] = y minimum
backgroundFrustum[3] = y maximum
backgroundFrustum[4] = near clip
backgroundFrustum[5] = far clip


viewProjectionType

public int viewProjectionType
The projection type - one of the values from ViewEnvironmentCullable. If the projection is set to orthographic, then the viewFrustum holds the near clip distance in index 4 and the far clip in index 5.


useStereo

public boolean useStereo
Flag to say whether this environment should be rendered using stereo or not. Not all layers will want stereo effects used.


viewport

public int[] viewport
The current dimensions of the viewport, if set. Dimensions are described as.
viewport[0] = x
viewport[1] = y
viewport[2] = width
viewport[3] = height


scissor

public int[] scissor
The current dimensions of the scissor area, if set. Dimensions are described as.
scissor[0] = x
scissor[1] = y
scissor[2] = width
scissor[3] = height


backgroundTransform

public float[] backgroundTransform
Transform holding the background matrix, including all the projection information needed to cancel out translations and scales of the viewpoint projection matrix.


cameraTransform

public float[] cameraTransform
The camera transformation matrix. This is the inverse of the viewTransform, and also flattened into array form for passing direct to Open GL

Constructor Detail

GraphicsEnvironmentData

public GraphicsEnvironmentData()
Create a new instance of this class. The variables are initialized to their default values and arrays constructed.

Method Detail

toString

public java.lang.String toString()
Generate a string representation of this environment data.

Overrides:
toString in class java.lang.Object
Returns:
a formatted string of the details

setViewport

public void setViewport(int[] bounds)
Convenience method to set the viewport array from another array

Parameters:
bounds - An array of at least length 4

setScissor

public void setScissor(int[] bounds)
Convenience method to set the scissor array from another array

Parameters:
bounds - An array of at least length 4

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org