Aviatrix3D
2.1.0

org.j3d.aviatrix3d.rendering
Interface ViewEnvironmentCullable

All Superinterfaces:
Cullable
All Known Implementing Classes:
ViewEnvironment

public interface ViewEnvironmentCullable
extends Cullable

A cullable that represents the viewing set up within a given layer.

The view environment tells the system how to project the world on to the rendering plane courtesy of the projection type. Three projection types are currently defined: perspective, orthographic and custom.

Version:
$Revision: 2.4 $
Author:
Justin Couch

Field Summary
static int CUSTOM_PROJECTION
          The projection type is a custom projection matrix
static int INFINITE_PROJECTION
          The projection type is a infinite perspective matrix
static int ORTHOGRAPHIC_PROJECTION
          The projection type is perspective mode
static int PERSPECTIVE_PROJECTION
          The projection type is perspective mode
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
 
Method Summary
 double getFieldOfView()
          Get the currently set field of view.
 void getProjectionMatrix(float[] matrix)
          Get the projection matrix that is generated for this environment.
 int getProjectionType()
          Get the type of view environment defined.
 int[] getScissorDimensions()
          Get the currently set dimensions of the scissor area.
 void getViewFrustum(double[] frustum)
          Get the frustum based on the projectionType.
 int[] getViewportDimensions()
          Get the currently set dimensions of the viewport.
 boolean isStereoEnabled()
          Check to see if stereo has been enabled for this environment.
 

Field Detail

PERSPECTIVE_PROJECTION

static final int PERSPECTIVE_PROJECTION
The projection type is perspective mode

See Also:
Constant Field Values

ORTHOGRAPHIC_PROJECTION

static final int ORTHOGRAPHIC_PROJECTION
The projection type is perspective mode

See Also:
Constant Field Values

INFINITE_PROJECTION

static final int INFINITE_PROJECTION
The projection type is a infinite perspective matrix

See Also:
Constant Field Values

CUSTOM_PROJECTION

static final int CUSTOM_PROJECTION
The projection type is a custom projection matrix

See Also:
Constant Field Values

VIEW_X

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

See Also:
Constant Field Values

VIEW_Y

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

See Also:
Constant Field Values

VIEW_WIDTH

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

See Also:
Constant Field Values

VIEW_HEIGHT

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

See Also:
Constant Field Values
Method Detail

isStereoEnabled

boolean isStereoEnabled()
Check to see if stereo has been enabled for this environment.

Returns:
true if stereo rendering is to be used

getProjectionType

int getProjectionType()
Get the type of view environment defined.


getViewFrustum

void getViewFrustum(double[] frustum)
Get the frustum based on the projectionType. Perspective used the current view setup of FoV, near and far clipping distances and the aspectRatio ratio, generate the 6 parameters that describe a view frustum. These parameters are what could be used as arguments to the glFrustum call. The parameter order for perspective is: [x min, x max, y min, y max, z near, z far] Orthographic uses the parameters specified in the setOrthoParams. The parameter order for orthographic: [left, right, bottom, top, near, far]

Parameters:
frustum - An array at least 6 in length for the values generated

getFieldOfView

double getFieldOfView()
Get the currently set field of view. The field of view is specified in degrees.

Returns:
A value 0 <= x <= 180;

getViewportDimensions

int[] getViewportDimensions()
Get the currently set dimensions of the viewport. This is automatically pushed down from the parent Viewport instance. The values are described as
viewport[0] = x
viewport[1] = y
viewport[2] = width
viewport[3] = height

Returns:
The current viewport size

getScissorDimensions

int[] getScissorDimensions()
Get the currently set dimensions of the scissor area. The values are described as
viewport[0] = x
viewport[1] = y
viewport[2] = width
viewport[3] = height

Returns:
The current viewport size

getProjectionMatrix

void getProjectionMatrix(float[] matrix)
Get the projection matrix that is generated for this environment. The projection matrix may be customised, or generated from the other data that is available from this class. The appropriate behaviour on the part of the caller will depend on the projection type flag.

Parameters:
matrix - An array of length 16 to put the projection matrix in to. The format is row-major

Aviatrix3D
2.1.0

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