org.ogre4j
Interface IFrustum

All Superinterfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IAnimableObject, IMovableObject, INativeObject, IRenderable, ISceneObjAllocatedObject, IShadowCaster
All Known Subinterfaces:
ICamera
All Known Implementing Classes:
Camera, Frustum

public interface IFrustum
extends INativeObject, IMovableObject, IRenderable


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ogre4j.IMovableObject
IMovableObject.IListener
 
Nested classes/interfaces inherited from interface org.ogre4j.IShadowCaster
IShadowCaster.IShadowRenderableList, IShadowCaster.IShadowRenderableListIterator
 
Nested classes/interfaces inherited from interface org.ogre4j.IAnimableObject
IAnimableObject.IAnimableDictionaryMap
 
Nested classes/interfaces inherited from interface org.ogre4j.IRenderable
IRenderable.ICustomParameterMap, IRenderable.IRenderSystemData, IRenderable.IVisitor
 
Method Summary
 void _notifyCurrentCamera(ICamera cam)
          Overridden from
 void _updateRenderQueue(IRenderQueue queue)
          Overridden from
 void calcViewMatrixRelative(IVector3 relPos, IMatrix4 matToUpdate)
          Calculate a view matrix for this frustum, relative to a potentially dynamic point.
 void disableCustomNearClipPlane()
          Disables any custom near clip plane.
 void disableReflection()
          Disables reflection modification previously turned on with enableReflection
 void enableCustomNearClipPlane(IMovablePlane plane)
          Links the frustum to a custom near clip plane, which can be used to clip geometry in a custom manner without using user clip planes.
 void enableCustomNearClipPlane(IPlane plane)
          Links the frustum to a custom near clip plane, which can be used to clip geometry in a custom manner without using user clip planes.
 void enableReflection(IMovablePlane p)
          Modifies this frustum so it always renders from the reflection of itself through the plane specified.
 void enableReflection(IPlane p)
          Modifies this frustum so it always renders from the reflection of itself through the plane specified.
 float getAspectRatio()
          Retreives the current aspect ratio.
 IAxisAlignedBox getBoundingBox()
          Overridden from
 float getBoundingRadius()
          Overridden from
 float getFarClipDistance()
          Retrieves the distance from the frustum to the far clipping plane.
 float getFocalLength()
          Returns focal length of frustum.
 IRadian getFOVy()
          Retrieves the frustums Y-dimension Field Of View (FOV).
 void getFrustumExtents(FloatPointer outleft, FloatPointer outright, FloatPointer outtop, FloatPointer outbottom)
          Get the extents of the frustum in view space.
 IVector2 getFrustumOffset()
          Retrieves the frustum offsets.
 IPlane getFrustumPlane(int plane)
          Retrieves a specified plane of the frustum (world space).
 IPlane getFrustumPlanes()
          Retrieves the clipping planes of the frustum (world space).
 ILightList getLights()
          Overridden from
 IMaterialPtr getMaterial()
          Overridden from
 java.lang.String getMovableType()
          Overridden from
 float getNearClipDistance()
          Sets the position of the near clipping plane.
 IQuaternion getOrientationForViewUpdate()
          Get the derived orientation of this frustum.
 float getOrthoWindowHeight()
          Gets the orthographic window height, for use with orthographic rendering only.
 float getOrthoWindowWidth()
          Gets the orthographic window width, for use with orthographic rendering only.
 IVector3 getPositionForViewUpdate()
          Get the derived position of this frustum.
 IMatrix4 getProjectionMatrix()
          Gets the normal projection matrix for this frustum, ie the projection matrix which conforms to standard right-handed rules and uses depth range [-1,+1].
 IMatrix4 getProjectionMatrixRS()
          Gets the projection matrix for this frustum adjusted for the current rendersystem specifics (may be right or left-handed, depth range may vary).
 IMatrix4 getProjectionMatrixWithRSDepth()
          Gets the depth-adjusted projection matrix for the current rendersystem, but one which still conforms to right-hand rules.
 ProjectionType getProjectionType()
          Retrieves info on the type of projection used (orthographic or perspective).
 IMatrix4 getReflectionMatrix()
           
 IPlane getReflectionPlane()
           
 void getRenderOperation(IRenderOperation op)
          Overridden from
 float getSquaredViewDepth(ICamera cam)
          Overridden from
 long getTypeFlags()
          Get the 'type flags' for this .
 IMatrix4 getViewMatrix()
          Gets the view matrix for this frustum.
 IVector3 getWorldSpaceCorners()
          Gets the world space corners of the frustum.
 void getWorldTransforms(IMatrix4 xform)
          Overridden from
 boolean isCustomNearClipPlaneEnabled()
          Is a custom near clip plane in use?
 boolean isCustomProjectionMatrixEnabled()
           
 boolean isCustomViewMatrixEnabled()
           
 boolean isReflected()
           
 boolean isVisible(IAxisAlignedBox bound, EnumPointer<FrustumPlane> culledBy)
          Tests whether the given container is visible in the .
 boolean isVisible(ISphere bound, EnumPointer<FrustumPlane> culledBy)
          Tests whether the given container is visible in the .
 boolean isVisible(IVector3 vert, EnumPointer<FrustumPlane> culledBy)
          Tests whether the given vertex is visible in the .
 boolean projectSphere(ISphere sphere, FloatPointer left, FloatPointer top, FloatPointer right, FloatPointer bottom)
          Project a sphere onto the near plane and get the bounding rectangle.
 void resetFrustumExtents()
          Reset the frustum extents to be automatically derived from other params.
 void setAspectRatio(float ratio)
          Sets the aspect ratio for the frustum viewport.
 void setCustomProjectionMatrix(boolean enable, IMatrix4 projectionMatrix)
          Set whether to use a custom projection matrix on this frustum.
 void setCustomViewMatrix(boolean enable, IMatrix4 viewMatrix)
          Set whether to use a custom view matrix on this frustum.
 void setFarClipDistance(float farDist)
          Sets the distance to the far clipping plane.
 void setFocalLength(float focalLength)
          Sets frustum focal length (used in stereo rendering).
 void setFOVy(IRadian fovy)
          Sets the Y-dimension Field Of View (FOV) of the frustum.
 void setFrustumExtents(float left, float right, float top, float bottom)
          Manually set the extents of the frustum.
 void setFrustumOffset(float horizontal, float vertical)
          Sets frustum offsets, used in stereo rendering.
 void setFrustumOffset(IVector2 offset)
          Sets frustum offsets, used in stereo rendering.
 void setNearClipDistance(float nearDist)
          Sets the position of the near clipping plane.
 void setOrthoWindow(float w, float h)
          Sets the orthographic window settings, for use with orthographic rendering only.
 void setOrthoWindowHeight(float h)
          Sets the orthographic window height, for use with orthographic rendering only.
 void setOrthoWindowWidth(float w)
          Sets the orthographic window width, for use with orthographic rendering only.
 void setProjectionType(ProjectionType pt)
          Sets the type of projection to use (orthographic or perspective).
 void visitRenderables(IRenderable.IVisitor visitor, boolean debugRenderables)
          Method to allow a caller to abstractly iterate over the instances that this will add to the render queue when asked, if any.
 
Methods inherited from interface org.ogre4j.IMovableObject
_getCreator, _getLightList, _getManager, _getParentNodeFullTransform, _notifyAttached, _notifyCreator, _notifyManager, _notifyMoved, addQueryFlags, addVisibilityFlags, detatchFromParent, getCastShadows, getDarkCapBounds, getEdgeList, getLightCapBounds, getListener, getName, getParentNode, getParentSceneNode, getPointExtrusionDistance, getQueryFlags, getRenderingDistance, getRenderQueueGroup, getShadowVolumeRenderableIterator, getUserAny, getUserObject, getVisibilityFlags, getVisible, getWorldBoundingBox, getWorldBoundingSphere, hasEdgeList, isAttached, isDebugDisplayEnabled, isInScene, isVisible, queryLights, removeQueryFlags, removeVisibilityFlags, setCastShadows, setDebugDisplayEnabled, setListener, setQueryFlags, setRenderingDistance, setRenderQueueGroup, setUserAny, setUserObject, setVisibilityFlags, setVisible
 
Methods inherited from interface org.ogre4j.IAnimableObject
createAnimableValue, getAnimableValueNames
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 
Methods inherited from interface org.ogre4j.IRenderable
_updateCustomGpuParameter, getCastsShadows, getCustomParameter, getNumWorldTransforms, getPolygonModeOverrideable, getRenderSystemData, getTechnique, getUseIdentityProjection, getUseIdentityView, getUserAny, postRender, preRender, setCustomParameter, setPolygonModeOverrideable, setRenderSystemData, setUseIdentityProjection, setUseIdentityView, setUserAny
 

Method Detail

setFOVy

void setFOVy(IRadian fovy)
Sets the Y-dimension Field Of View (FOV) of the frustum.


getFOVy

IRadian getFOVy()
Retrieves the frustums Y-dimension Field Of View (FOV).


setNearClipDistance

void setNearClipDistance(float nearDist)
Sets the position of the near clipping plane.


getNearClipDistance

float getNearClipDistance()
Sets the position of the near clipping plane.


setFarClipDistance

void setFarClipDistance(float farDist)
Sets the distance to the far clipping plane.


getFarClipDistance

float getFarClipDistance()
Retrieves the distance from the frustum to the far clipping plane.


setAspectRatio

void setAspectRatio(float ratio)
Sets the aspect ratio for the frustum viewport.


getAspectRatio

float getAspectRatio()
Retreives the current aspect ratio.


setFrustumOffset

void setFrustumOffset(IVector2 offset)
Sets frustum offsets, used in stereo rendering.


setFrustumOffset

void setFrustumOffset(float horizontal,
                      float vertical)
Sets frustum offsets, used in stereo rendering.


getFrustumOffset

IVector2 getFrustumOffset()
Retrieves the frustum offsets.


setFocalLength

void setFocalLength(float focalLength)
Sets frustum focal length (used in stereo rendering).


getFocalLength

float getFocalLength()
Returns focal length of frustum.


setFrustumExtents

void setFrustumExtents(float left,
                       float right,
                       float top,
                       float bottom)
Manually set the extents of the frustum.


resetFrustumExtents

void resetFrustumExtents()
Reset the frustum extents to be automatically derived from other params.


getFrustumExtents

void getFrustumExtents(FloatPointer outleft,
                       FloatPointer outright,
                       FloatPointer outtop,
                       FloatPointer outbottom)
Get the extents of the frustum in view space.


getProjectionMatrixRS

IMatrix4 getProjectionMatrixRS()
Gets the projection matrix for this frustum adjusted for the current rendersystem specifics (may be right or left-handed, depth range may vary).


getProjectionMatrixWithRSDepth

IMatrix4 getProjectionMatrixWithRSDepth()
Gets the depth-adjusted projection matrix for the current rendersystem, but one which still conforms to right-hand rules.


getProjectionMatrix

IMatrix4 getProjectionMatrix()
Gets the normal projection matrix for this frustum, ie the projection matrix which conforms to standard right-handed rules and uses depth range [-1,+1].


getViewMatrix

IMatrix4 getViewMatrix()
Gets the view matrix for this frustum. Mainly for use by OGRE internally.


calcViewMatrixRelative

void calcViewMatrixRelative(IVector3 relPos,
                            IMatrix4 matToUpdate)
Calculate a view matrix for this frustum, relative to a potentially dynamic point. Mainly for use by OGRE internally when using camera-relative rendering for frustums that are not the centre (e.g. texture projection)


setCustomViewMatrix

void setCustomViewMatrix(boolean enable,
                         IMatrix4 viewMatrix)
Set whether to use a custom view matrix on this frustum.


isCustomViewMatrixEnabled

boolean isCustomViewMatrixEnabled()

setCustomProjectionMatrix

void setCustomProjectionMatrix(boolean enable,
                               IMatrix4 projectionMatrix)
Set whether to use a custom projection matrix on this frustum.


isCustomProjectionMatrixEnabled

boolean isCustomProjectionMatrixEnabled()

getFrustumPlanes

IPlane getFrustumPlanes()
Retrieves the clipping planes of the frustum (world space).


getFrustumPlane

IPlane getFrustumPlane(int plane)
Retrieves a specified plane of the frustum (world space).


isVisible

boolean isVisible(IAxisAlignedBox bound,
                  EnumPointer<FrustumPlane> culledBy)
Tests whether the given container is visible in the .


isVisible

boolean isVisible(ISphere bound,
                  EnumPointer<FrustumPlane> culledBy)
Tests whether the given container is visible in the .


isVisible

boolean isVisible(IVector3 vert,
                  EnumPointer<FrustumPlane> culledBy)
Tests whether the given vertex is visible in the .


getTypeFlags

long getTypeFlags()
Description copied from interface: IMovableObject
Get the 'type flags' for this .

Specified by:
getTypeFlags in interface IMovableObject

getBoundingBox

IAxisAlignedBox getBoundingBox()
Overridden from

Specified by:
getBoundingBox in interface IMovableObject

getBoundingRadius

float getBoundingRadius()
Overridden from

Specified by:
getBoundingRadius in interface IMovableObject

_updateRenderQueue

void _updateRenderQueue(IRenderQueue queue)
Overridden from

Specified by:
_updateRenderQueue in interface IMovableObject

getMovableType

java.lang.String getMovableType()
Overridden from

Specified by:
getMovableType in interface IMovableObject

_notifyCurrentCamera

void _notifyCurrentCamera(ICamera cam)
Overridden from

Specified by:
_notifyCurrentCamera in interface IMovableObject

getMaterial

IMaterialPtr getMaterial()
Overridden from

Specified by:
getMaterial in interface IRenderable

getRenderOperation

void getRenderOperation(IRenderOperation op)
Overridden from

Specified by:
getRenderOperation in interface IRenderable

getWorldTransforms

void getWorldTransforms(IMatrix4 xform)
Overridden from

Specified by:
getWorldTransforms in interface IRenderable

getSquaredViewDepth

float getSquaredViewDepth(ICamera cam)
Overridden from

Specified by:
getSquaredViewDepth in interface IRenderable

getLights

ILightList getLights()
Overridden from

Specified by:
getLights in interface IRenderable

getWorldSpaceCorners

IVector3 getWorldSpaceCorners()
Gets the world space corners of the frustum.


setProjectionType

void setProjectionType(ProjectionType pt)
Sets the type of projection to use (orthographic or perspective). Default is perspective.


getProjectionType

ProjectionType getProjectionType()
Retrieves info on the type of projection used (orthographic or perspective).


setOrthoWindow

void setOrthoWindow(float w,
                    float h)
Sets the orthographic window settings, for use with orthographic rendering only.


setOrthoWindowHeight

void setOrthoWindowHeight(float h)
Sets the orthographic window height, for use with orthographic rendering only.


setOrthoWindowWidth

void setOrthoWindowWidth(float w)
Sets the orthographic window width, for use with orthographic rendering only.


getOrthoWindowHeight

float getOrthoWindowHeight()
Gets the orthographic window height, for use with orthographic rendering only.


getOrthoWindowWidth

float getOrthoWindowWidth()
Gets the orthographic window width, for use with orthographic rendering only.


enableReflection

void enableReflection(IPlane p)
Modifies this frustum so it always renders from the reflection of itself through the plane specified.


enableReflection

void enableReflection(IMovablePlane p)
Modifies this frustum so it always renders from the reflection of itself through the plane specified. Note that this version of the method links to a plane so that changes to it are picked up automatically. It is important that this plane continues to exist whilst this object does; do not destroy the plane before the frustum.


disableReflection

void disableReflection()
Disables reflection modification previously turned on with enableReflection


isReflected

boolean isReflected()

getReflectionMatrix

IMatrix4 getReflectionMatrix()

getReflectionPlane

IPlane getReflectionPlane()

projectSphere

boolean projectSphere(ISphere sphere,
                      FloatPointer left,
                      FloatPointer top,
                      FloatPointer right,
                      FloatPointer bottom)
Project a sphere onto the near plane and get the bounding rectangle.


enableCustomNearClipPlane

void enableCustomNearClipPlane(IMovablePlane plane)
Links the frustum to a custom near clip plane, which can be used to clip geometry in a custom manner without using user clip planes.


enableCustomNearClipPlane

void enableCustomNearClipPlane(IPlane plane)
Links the frustum to a custom near clip plane, which can be used to clip geometry in a custom manner without using user clip planes.


disableCustomNearClipPlane

void disableCustomNearClipPlane()
Disables any custom near clip plane.


isCustomNearClipPlaneEnabled

boolean isCustomNearClipPlaneEnabled()
Is a custom near clip plane in use?


visitRenderables

void visitRenderables(IRenderable.IVisitor visitor,
                      boolean debugRenderables)
Description copied from interface: IMovableObject
Method to allow a caller to abstractly iterate over the instances that this will add to the render queue when asked, if any.

Specified by:
visitRenderables in interface IMovableObject

getPositionForViewUpdate

IVector3 getPositionForViewUpdate()
Get the derived position of this frustum.


getOrientationForViewUpdate

IQuaternion getOrientationForViewUpdate()
Get the derived orientation of this frustum.



Copyright © 2007 netAllied GmbH. All Rights Reserved.