org.xith3d.render
Interface RenderPassConfig

All Known Implementing Classes:
BaseRenderPassConfig

public interface RenderPassConfig

A class implementing this interface holds all information necessary to configure a render pass.


Field Summary
static View.CameraMode DEFAULT_CAMERA_MODE
           
static View.ProjectionPolicy DEFAULT_PROJECTION_POLICY
           
 
Method Summary
 float getBackClipDistance()
           
 View.CameraMode getCameraMode()
           
 org.openmali.vecmath2.Tuple2f getCenterOfView()
           
 int getColorMask()
           
 float getFieldOfView()
           
 float getFrontClipDistance()
           
 RenderBinSorter getOpaqueSorter()
           
 Renderer.OpaqueSortingPolicy getOpaqueSortingPolicy()
           
 View.ProjectionPolicy getProjectionPolicy()
           
 RenderOptions getRenderOptions()
           
 float getScreenScale()
           
 RenderBinSorter getTransparentSorter()
           
 Renderer.TransparentSortingPolicy getTransparentSortingPolicy()
           
 org.openmali.types.twodee.Rect2i getViewport()
           
 Transform3D getViewTransform()
           
 void set(RenderPassConfig template)
          Sets this RenderPassConfigProvider to the values of the template.
 void setBackClipDistance(float backClipDistance)
          Sets the back clip distance.
 void setCameraMode(View.CameraMode cameraMode)
          Sets the camera mode for this RenderPass.
 void setCenterOfView(org.openmali.vecmath2.Tuple2f cov)
          Sets the center of the View.
 void setColorMask(boolean enableRed, boolean enableGreen, boolean enableBlue, boolean enableAlpha)
          Sets the color-mask.
 void setColorMask(int colorMask)
          Sets the color-mask as a bit-mask (red = 1/1, green = 2/2, blue = 3/4, alpha = 4/8).
 void setFieldOfView(float fov)
          Sets the field of view.
 void setFrontClipDistance(float frontClipDistance)
          Sets the front clip distance.
 void setOpaqueSorter(RenderBinSorter sorter)
          Sets the opaque RenderBinSorter for this RenderPass.
 void setOpaqueSortingPolicy(Renderer.OpaqueSortingPolicy policy)
          Sets the opaque sorting policy for this RenderPass.
 void setProjectionPolicy(View.ProjectionPolicy policy)
          Sets the projection policy.
 void setRenderOptions(RenderOptions renderOptions)
          Sets the RenderOptions for this RenderPass.
 void setScreenScale(float screenScale)
          Sets the screen scale.
 void setTransparentSorter(RenderBinSorter sorter)
          Sets the transparent RenderBinSorter for this RenderPass.
 void setTransparentSortingPolicy(Renderer.TransparentSortingPolicy policy)
          Sets the transparency sorting policy for this RenderPass.
 void setViewport(org.openmali.types.twodee.Rect2i rect)
          Sets the viewport of this RenderPass.
 void setViewTransform(Transform3D viewTransform)
          Sets the View Transform3D for this RenderPass.
 

Field Detail

DEFAULT_PROJECTION_POLICY

static final View.ProjectionPolicy DEFAULT_PROJECTION_POLICY

DEFAULT_CAMERA_MODE

static final View.CameraMode DEFAULT_CAMERA_MODE
Method Detail

setProjectionPolicy

void setProjectionPolicy(View.ProjectionPolicy policy)
Sets the projection policy.


getProjectionPolicy

View.ProjectionPolicy getProjectionPolicy()
Returns:
the projection policy.

setCameraMode

void setCameraMode(View.CameraMode cameraMode)
Sets the camera mode for this RenderPass.

Parameters:
cameraMode -

getCameraMode

View.CameraMode getCameraMode()
Returns:
the camera mode for this RenderPass.

setOpaqueSorter

void setOpaqueSorter(RenderBinSorter sorter)
Sets the opaque RenderBinSorter for this RenderPass.
This automatically sets the sorting policy to CUSTOM.

Parameters:
sorter - the RenderBinSorter to use for opaque shapes
See Also:
setOpaqueSortingPolicy(org.xith3d.render.Renderer.OpaqueSortingPolicy)

getOpaqueSorter

RenderBinSorter getOpaqueSorter()
Returns:
sorter the RenderBinSorter to use for opaque shapes
See Also:
getOpaqueSortingPolicy()

setTransparentSorter

void setTransparentSorter(RenderBinSorter sorter)
Sets the transparent RenderBinSorter for this RenderPass.
This automatically sets the sorting policy to CUSTOM.

Parameters:
sorter - the RenderBinSorter to use for transparent shapes

getTransparentSorter

RenderBinSorter getTransparentSorter()
Returns:
sorter the RenderBinSorter to use for transparent shapes
See Also:
getTransparentSortingPolicy()

setOpaqueSortingPolicy

void setOpaqueSortingPolicy(Renderer.OpaqueSortingPolicy policy)
Sets the opaque sorting policy for this RenderPass.

Parameters:
policy - the new policy

getOpaqueSortingPolicy

Renderer.OpaqueSortingPolicy getOpaqueSortingPolicy()
Returns:
the current opaque sorting policy for this RenderPass

setTransparentSortingPolicy

void setTransparentSortingPolicy(Renderer.TransparentSortingPolicy policy)
Sets the transparency sorting policy for this RenderPass.

Parameters:
policy - the new policy

getTransparentSortingPolicy

Renderer.TransparentSortingPolicy getTransparentSortingPolicy()
Returns:
the current transparency sorting policy for this RenderPass.

setFrontClipDistance

void setFrontClipDistance(float frontClipDistance)
Sets the front clip distance. All polygons which are closer to the camera than this value will be culled.

Parameters:
frontClipDistance - the new front clip distance

getFrontClipDistance

float getFrontClipDistance()
Returns:
the back clip distance. All polygons which are farer from the camera than this value will be culled.

setBackClipDistance

void setBackClipDistance(float backClipDistance)
Sets the back clip distance. All polygons which are farer from the camera than this value will be culled.

Parameters:
backClipDistance - the new back clip distance

getBackClipDistance

float getBackClipDistance()
Returns:
the back clip distance. All polygons which are farer from the camera than this value will be culled.

setScreenScale

void setScreenScale(float screenScale)
Sets the screen scale.


getScreenScale

float getScreenScale()
Returns:
the screen scale

setFieldOfView

void setFieldOfView(float fov)
Sets the field of view.


getFieldOfView

float getFieldOfView()
Returns:
the field of view

setCenterOfView

void setCenterOfView(org.openmali.vecmath2.Tuple2f cov)
Sets the center of the View.

Parameters:
cov - values range from 1 (left) to -1 (right) a value of null sets the center to (0|0) - the default

getCenterOfView

org.openmali.vecmath2.Tuple2f getCenterOfView()
Returns:
the center of this View - values range from 1 (left) to -1 (right)

setViewport

void setViewport(org.openmali.types.twodee.Rect2i rect)
Sets the viewport of this RenderPass. If the viewport is null the default viewport is assumed.


getViewport

org.openmali.types.twodee.Rect2i getViewport()
Returns:
the viewport of this RenderPass. If the viewport is null the default viewport is assumed.

setViewTransform

void setViewTransform(Transform3D viewTransform)
Sets the View Transform3D for this RenderPass. If the transform is null the default is taken from the View.

Parameters:
viewTransform -

getViewTransform

Transform3D getViewTransform()
Returns:
the View Transform3D for this RenderPass. If the transform is null the default is taken from the View.

setRenderOptions

void setRenderOptions(RenderOptions renderOptions)
Sets the RenderOptions for this RenderPass. If the RenderOptions are null the default is taken from the Canvas.

Parameters:
renderOptions -

getRenderOptions

RenderOptions getRenderOptions()
Returns:
the RenderOptions for this RenderPass. If the RenderOptions are null the default is taken from the Canvas.

setColorMask

void setColorMask(int colorMask)
Sets the color-mask as a bit-mask (red = 1/1, green = 2/2, blue = 3/4, alpha = 4/8).

Parameters:
colorMask -

setColorMask

void setColorMask(boolean enableRed,
                  boolean enableGreen,
                  boolean enableBlue,
                  boolean enableAlpha)
Sets the color-mask.

Parameters:
enableRed -
enableGreen -
enableBlue -
enableAlpha -

getColorMask

int getColorMask()
Returns:
this RenderPass'es color-mask (red = 1/1, green = 2/2, blue = 3/4, alpha = 4/8).

set

void set(RenderPassConfig template)
Sets this RenderPassConfigProvider to the values of the template.

Parameters:
template - the RenderPassConfigProvider to take the values from