org.ogre4j
Interface ICamera

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

public interface ICamera
extends INativeObject, IFrustum


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 _autoTrack()
          Internal method used by OGRE to update auto-tracking cameras.
 float _getLodBiasInverse()
          Internal method for OGRE to use for LOD calculations.
 long _getNumRenderedBatches()
          Internal method to retrieve the number of visible batches in the last render.
 long _getNumRenderedFaces()
          Internal method to retrieve the number of visible faces in the last render.
 void _notifyRenderedBatches(long numbatches)
          Internal method to notify camera of the visible batches in the last render.
 void _notifyRenderedFaces(long numfaces)
          Internal method to notify camera of the visible faces in the last render.
 void _notifyViewport(IViewport viewport)
          Notifies this camera that a viewport is using it.
 void _renderScene(IViewport vp, boolean includeOverlays)
          Tells the to contact the to render from it's viewpoint.
 void forwardIntersect(IPlane worldPlane, Ivector<IVector4> intersect3d)
          Forward projects frustum rays to find forward intersection with plane.
 boolean getAutoAspectRatio()
          Retrieves if AutoAspectRatio is currently set or not
 IVector3 getAutoTrackOffset()
          Get the auto tracking offset for this camera, if it is auto tracking.
 ISceneNode getAutoTrackTarget()
          Get the auto tracking target for this camera, if any.
 float getBoundingRadius()
          Overridden from
 void getCameraToViewportBoxVolume(float screenLeft, float screenTop, float screenRight, float screenBottom, IPlaneBoundedVolume outVolume, boolean includeFarPlane)
          Gets a world-space list of planes enclosing a volume based on a viewport rectangle.
 void getCameraToViewportBoxVolume(IPlaneBoundedVolume returnValue, float screenLeft, float screenTop, float screenRight, float screenBottom, boolean includeFarPlane)
          Gets a world-space list of planes enclosing a volume based on a viewport rectangle.
 void getCameraToViewportRay(float screenx, float screeny, IRay outRay)
          Gets a world space ray as cast from the camera through a viewport position.
 void getCameraToViewportRay(IRay returnValue, float screenx, float screeny)
          Gets a world space ray as cast from the camera through a viewport position.
 IFrustum getCullingFrustum()
          Returns the custom culling frustum in use.
 void getDerivedDirection(IVector3 returnValue)
          Gets the derived direction vector of the camera, including any rotation inherited from a node attachment and reflection matrix.
 IQuaternion getDerivedOrientation()
          Gets the derived orientation of the camera, including any rotation inherited from a node attachment and reflection matrix.
 IVector3 getDerivedPosition()
          Gets the derived position of the camera, including any translation inherited from a node attachment and reflection matrix.
 void getDerivedRight(IVector3 returnValue)
          Gets the derived right vector of the camera, including any rotation inherited from a node attachment and reflection matrix.
 void getDerivedUp(IVector3 returnValue)
          Gets the derived up vector of the camera, including any rotation inherited from a node attachment and reflection matrix.
 void getDirection(IVector3 returnValue)
           
 float getFarClipDistance()
          Retrieves the distance from the frustum to the far clipping plane.
 IPlane getFrustumPlane(int plane)
          Retrieves a specified plane of the frustum (world space).
 float getLodBias()
          Returns the level-of-detail bias factor currently applied to this camera.
 ICamera getLodCamera()
          Get a pointer to the camera which should be used to determine LOD settings.
 java.lang.String getMovableType()
          Overridden from
 java.lang.String getName()
          Gets the camera's name.
 float getNearClipDistance()
          Sets the position of the near clipping plane.
 IQuaternion getOrientation()
          Returns the camera's current orientation.
 IQuaternion getOrientationForViewUpdate()
          Get the derived orientation of this frustum.
 PolygonMode getPolygonMode()
          Retrieves the level of detail that the camera will render.
 IVector3 getPosition()
          Retrieves the camera's position.
 IVector3 getPositionForViewUpdate()
          Get the derived position of this frustum.
 void getRealDirection(IVector3 returnValue)
          Gets the real world direction vector of the camera, including any rotation inherited from a node attachment.
 IQuaternion getRealOrientation()
          Gets the real world orientation of the camera, including any rotation inherited from a node attachment
 IVector3 getRealPosition()
          Gets the real world position of the camera, including any translation inherited from a node attachment.
 void getRealRight(IVector3 returnValue)
          Gets the real world right vector of the camera, including any rotation inherited from a node attachment.
 void getRealUp(IVector3 returnValue)
          Gets the real world up vector of the camera, including any rotation inherited from a node attachment.
 void getRight(IVector3 returnValue)
          Gets the camera's right vector.
 ISceneManager getSceneManager()
          Returns a pointer to the this camera is rendering through.
 void getUp(IVector3 returnValue)
          Gets the camera's up vector.
 boolean getUseRenderingDistance()
          Get whether this camera should use the 'rendering distance' on objects to exclude distant objects from the final image.
 IMatrix4 getViewMatrix()
          Gets the view matrix for this frustum.
 IMatrix4 getViewMatrix(boolean ownFrustumOnly)
          Specialised version of getViewMatrix allowing caller to differentiate whether the custom culling frustum should be allowed or not.
 IViewport getViewport()
          Get the last viewport which was attached to this camera.
 void getWindowPlanes(Ivector<IPlane> returnValue)
           
 IVector3 getWorldSpaceCorners()
          Gets the world space corners of the frustum.
 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 isWindowSet()
           
 void lookAt(float x, float y, float z)
          Points the camera at a location in worldspace.
 void lookAt(IVector3 targetPoint)
          Points the camera at a location in worldspace.
 void move(IVector3 vec)
          Moves the camera's position by the vector offset provided along world axes.
 void moveRelative(IVector3 vec)
          Moves the camera's position by the vector offset provided along it's own axes (relative to orientation).
 void pitch(IRadian angle)
          Pitches the camera up/down anticlockwise around it's local z axis.
 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 resetWindow()
           
 void roll(IRadian angle)
          Rolls the camera anticlockwise, around its local z axis.
 void rotate(IQuaternion q)
          Rotate the camera around an arbitrary axis using a .
 void rotate(IVector3 axis, IRadian angle)
          Rotate the camera around an arbitrary axis.
 void setAutoAspectRatio(boolean autoratio)
          If set to true a viewport that owns this frustum will be able to recalculate the aspect ratio whenever the frustum is resized.
 void setAutoTracking(boolean enabled, ISceneNode target, IVector3 offset)
          Enables / disables automatic tracking of a .
 void setCullingFrustum(IFrustum frustum)
          Tells the camera to use a separate instance to perform culling.
 void setDirection(float x, float y, float z)
          Sets the camera's direction vector.
 void setDirection(IVector3 vec)
          Sets the camera's direction vector.
 void setFixedYawAxis(boolean useFixed, IVector3 fixedAxis)
          Tells the camera whether to yaw around it's own local Y axis or a fixed axis of choice.
 void setLodBias(float factor)
          Sets the level-of-detail factor for this .
 void setLodCamera(ICamera lodCam)
          Get a pointer to the camera which should be used to determine LOD settings.
 void setOrientation(IQuaternion q)
          Sets the camera's orientation.
 void setPolygonMode(PolygonMode sd)
          Sets the level of rendering detail required from this camera.
 void setPosition(float x, float y, float z)
          Sets the camera's position.
 void setPosition(IVector3 vec)
          Sets the camera's position.
 void setUseRenderingDistance(boolean use)
          Set whether this camera should use the 'rendering distance' on objects to exclude distant objects from the final image.
 void setWindow(float Left, float Top, float Right, float Bottom)
          Sets the viewing window inside of viewport.
 void synchroniseBaseSettingsWith(ICamera cam)
          Synchronise core camera settings with another.
 void yaw(IRadian angle)
          Rotates the camera anticlockwise around it's local y axis.
 
Methods inherited from interface org.ogre4j.IFrustum
_notifyCurrentCamera, _updateRenderQueue, calcViewMatrixRelative, disableCustomNearClipPlane, disableReflection, enableCustomNearClipPlane, enableCustomNearClipPlane, enableReflection, enableReflection, getAspectRatio, getBoundingBox, getFocalLength, getFOVy, getFrustumExtents, getFrustumOffset, getFrustumPlanes, getLights, getMaterial, getOrthoWindowHeight, getOrthoWindowWidth, getProjectionMatrix, getProjectionMatrixRS, getProjectionMatrixWithRSDepth, getProjectionType, getReflectionMatrix, getReflectionPlane, getRenderOperation, getSquaredViewDepth, getTypeFlags, getWorldTransforms, isCustomNearClipPlaneEnabled, isCustomProjectionMatrixEnabled, isCustomViewMatrixEnabled, isReflected, resetFrustumExtents, setAspectRatio, setCustomProjectionMatrix, setCustomViewMatrix, setFarClipDistance, setFocalLength, setFOVy, setFrustumExtents, setFrustumOffset, setFrustumOffset, setNearClipDistance, setOrthoWindow, setOrthoWindowHeight, setOrthoWindowWidth, setProjectionType, visitRenderables
 
Methods inherited from interface org.ogre4j.IMovableObject
_getCreator, _getLightList, _getManager, _getParentNodeFullTransform, _notifyAttached, _notifyCreator, _notifyManager, _notifyMoved, addQueryFlags, addVisibilityFlags, detatchFromParent, getCastShadows, getDarkCapBounds, getEdgeList, getLightCapBounds, getListener, 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

getSceneManager

ISceneManager getSceneManager()
Returns a pointer to the this camera is rendering through.


getName

java.lang.String getName()
Gets the camera's name.

Specified by:
getName in interface IMovableObject

setPolygonMode

void setPolygonMode(PolygonMode sd)
Sets the level of rendering detail required from this camera.


getPolygonMode

PolygonMode getPolygonMode()
Retrieves the level of detail that the camera will render.


setPosition

void setPosition(float x,
                 float y,
                 float z)
Sets the camera's position.


setPosition

void setPosition(IVector3 vec)
Sets the camera's position.


getPosition

IVector3 getPosition()
Retrieves the camera's position.


move

void move(IVector3 vec)
Moves the camera's position by the vector offset provided along world axes.


moveRelative

void moveRelative(IVector3 vec)
Moves the camera's position by the vector offset provided along it's own axes (relative to orientation).


setDirection

void setDirection(float x,
                  float y,
                  float z)
Sets the camera's direction vector.


setDirection

void setDirection(IVector3 vec)
Sets the camera's direction vector.


getDirection

void getDirection(IVector3 returnValue)

getUp

void getUp(IVector3 returnValue)
Gets the camera's up vector.


getRight

void getRight(IVector3 returnValue)
Gets the camera's right vector.


lookAt

void lookAt(IVector3 targetPoint)
Points the camera at a location in worldspace.


lookAt

void lookAt(float x,
            float y,
            float z)
Points the camera at a location in worldspace.


roll

void roll(IRadian angle)
Rolls the camera anticlockwise, around its local z axis.


yaw

void yaw(IRadian angle)
Rotates the camera anticlockwise around it's local y axis.


pitch

void pitch(IRadian angle)
Pitches the camera up/down anticlockwise around it's local z axis.


rotate

void rotate(IVector3 axis,
            IRadian angle)
Rotate the camera around an arbitrary axis.


rotate

void rotate(IQuaternion q)
Rotate the camera around an arbitrary axis using a .


setFixedYawAxis

void setFixedYawAxis(boolean useFixed,
                     IVector3 fixedAxis)
Tells the camera whether to yaw around it's own local Y axis or a fixed axis of choice.


getOrientation

IQuaternion getOrientation()
Returns the camera's current orientation.


setOrientation

void setOrientation(IQuaternion q)
Sets the camera's orientation.


_renderScene

void _renderScene(IViewport vp,
                  boolean includeOverlays)
Tells the to contact the to render from it's viewpoint.


_notifyRenderedFaces

void _notifyRenderedFaces(long numfaces)
Internal method to notify camera of the visible faces in the last render.


_notifyRenderedBatches

void _notifyRenderedBatches(long numbatches)
Internal method to notify camera of the visible batches in the last render.


_getNumRenderedFaces

long _getNumRenderedFaces()
Internal method to retrieve the number of visible faces in the last render.


_getNumRenderedBatches

long _getNumRenderedBatches()
Internal method to retrieve the number of visible batches in the last render.


getDerivedOrientation

IQuaternion getDerivedOrientation()
Gets the derived orientation of the camera, including any rotation inherited from a node attachment and reflection matrix.


getDerivedPosition

IVector3 getDerivedPosition()
Gets the derived position of the camera, including any translation inherited from a node attachment and reflection matrix.


getDerivedDirection

void getDerivedDirection(IVector3 returnValue)
Gets the derived direction vector of the camera, including any rotation inherited from a node attachment and reflection matrix.


getDerivedUp

void getDerivedUp(IVector3 returnValue)
Gets the derived up vector of the camera, including any rotation inherited from a node attachment and reflection matrix.


getDerivedRight

void getDerivedRight(IVector3 returnValue)
Gets the derived right vector of the camera, including any rotation inherited from a node attachment and reflection matrix.


getRealOrientation

IQuaternion getRealOrientation()
Gets the real world orientation of the camera, including any rotation inherited from a node attachment


getRealPosition

IVector3 getRealPosition()
Gets the real world position of the camera, including any translation inherited from a node attachment.


getRealDirection

void getRealDirection(IVector3 returnValue)
Gets the real world direction vector of the camera, including any rotation inherited from a node attachment.


getRealUp

void getRealUp(IVector3 returnValue)
Gets the real world up vector of the camera, including any rotation inherited from a node attachment.


getRealRight

void getRealRight(IVector3 returnValue)
Gets the real world right vector of the camera, including any rotation inherited from a node attachment.


getMovableType

java.lang.String getMovableType()
Overridden from

Specified by:
getMovableType in interface IFrustum
Specified by:
getMovableType in interface IMovableObject

setAutoTracking

void setAutoTracking(boolean enabled,
                     ISceneNode target,
                     IVector3 offset)
Enables / disables automatic tracking of a .


setLodBias

void setLodBias(float factor)
Sets the level-of-detail factor for this .


getLodBias

float getLodBias()
Returns the level-of-detail bias factor currently applied to this camera.


setLodCamera

void setLodCamera(ICamera lodCam)
Get a pointer to the camera which should be used to determine LOD settings.


getLodCamera

ICamera getLodCamera()
Get a pointer to the camera which should be used to determine LOD settings.


getCameraToViewportRay

void getCameraToViewportRay(IRay returnValue,
                            float screenx,
                            float screeny)
Gets a world space ray as cast from the camera through a viewport position.


getCameraToViewportRay

void getCameraToViewportRay(float screenx,
                            float screeny,
                            IRay outRay)
Gets a world space ray as cast from the camera through a viewport position.


getCameraToViewportBoxVolume

void getCameraToViewportBoxVolume(IPlaneBoundedVolume returnValue,
                                  float screenLeft,
                                  float screenTop,
                                  float screenRight,
                                  float screenBottom,
                                  boolean includeFarPlane)
Gets a world-space list of planes enclosing a volume based on a viewport rectangle.


getCameraToViewportBoxVolume

void getCameraToViewportBoxVolume(float screenLeft,
                                  float screenTop,
                                  float screenRight,
                                  float screenBottom,
                                  IPlaneBoundedVolume outVolume,
                                  boolean includeFarPlane)
Gets a world-space list of planes enclosing a volume based on a viewport rectangle.


_getLodBiasInverse

float _getLodBiasInverse()
Internal method for OGRE to use for LOD calculations.


_autoTrack

void _autoTrack()
Internal method used by OGRE to update auto-tracking cameras.


setWindow

void setWindow(float Left,
               float Top,
               float Right,
               float Bottom)
Sets the viewing window inside of viewport.


resetWindow

void resetWindow()

isWindowSet

boolean isWindowSet()

getWindowPlanes

void getWindowPlanes(Ivector<IPlane> returnValue)

getBoundingRadius

float getBoundingRadius()
Overridden from

Specified by:
getBoundingRadius in interface IFrustum
Specified by:
getBoundingRadius in interface IMovableObject

getAutoTrackTarget

ISceneNode getAutoTrackTarget()
Get the auto tracking target for this camera, if any.


getAutoTrackOffset

IVector3 getAutoTrackOffset()
Get the auto tracking offset for this camera, if it is auto tracking.


getViewport

IViewport getViewport()
Get the last viewport which was attached to this camera.


_notifyViewport

void _notifyViewport(IViewport viewport)
Notifies this camera that a viewport is using it.


setAutoAspectRatio

void setAutoAspectRatio(boolean autoratio)
If set to true a viewport that owns this frustum will be able to recalculate the aspect ratio whenever the frustum is resized.


getAutoAspectRatio

boolean getAutoAspectRatio()
Retrieves if AutoAspectRatio is currently set or not


setCullingFrustum

void setCullingFrustum(IFrustum frustum)
Tells the camera to use a separate instance to perform culling.


getCullingFrustum

IFrustum getCullingFrustum()
Returns the custom culling frustum in use.


forwardIntersect

void forwardIntersect(IPlane worldPlane,
                      Ivector<IVector4> intersect3d)
Forward projects frustum rays to find forward intersection with plane.


isVisible

boolean isVisible(IAxisAlignedBox bound,
                  EnumPointer<FrustumPlane> culledBy)
Description copied from interface: IFrustum
Tests whether the given container is visible in the .

Specified by:
isVisible in interface IFrustum

isVisible

boolean isVisible(ISphere bound,
                  EnumPointer<FrustumPlane> culledBy)
Description copied from interface: IFrustum
Tests whether the given container is visible in the .

Specified by:
isVisible in interface IFrustum

isVisible

boolean isVisible(IVector3 vert,
                  EnumPointer<FrustumPlane> culledBy)
Description copied from interface: IFrustum
Tests whether the given vertex is visible in the .

Specified by:
isVisible in interface IFrustum

getWorldSpaceCorners

IVector3 getWorldSpaceCorners()
Description copied from interface: IFrustum
Gets the world space corners of the frustum.

Specified by:
getWorldSpaceCorners in interface IFrustum

getFrustumPlane

IPlane getFrustumPlane(int plane)
Description copied from interface: IFrustum
Retrieves a specified plane of the frustum (world space).

Specified by:
getFrustumPlane in interface IFrustum

projectSphere

boolean projectSphere(ISphere sphere,
                      FloatPointer left,
                      FloatPointer top,
                      FloatPointer right,
                      FloatPointer bottom)
Description copied from interface: IFrustum
Project a sphere onto the near plane and get the bounding rectangle.

Specified by:
projectSphere in interface IFrustum

getNearClipDistance

float getNearClipDistance()
Description copied from interface: IFrustum
Sets the position of the near clipping plane.

Specified by:
getNearClipDistance in interface IFrustum

getFarClipDistance

float getFarClipDistance()
Description copied from interface: IFrustum
Retrieves the distance from the frustum to the far clipping plane.

Specified by:
getFarClipDistance in interface IFrustum

getViewMatrix

IMatrix4 getViewMatrix()
Description copied from interface: IFrustum
Gets the view matrix for this frustum. Mainly for use by OGRE internally.

Specified by:
getViewMatrix in interface IFrustum

getViewMatrix

IMatrix4 getViewMatrix(boolean ownFrustumOnly)
Specialised version of getViewMatrix allowing caller to differentiate whether the custom culling frustum should be allowed or not.


setUseRenderingDistance

void setUseRenderingDistance(boolean use)
Set whether this camera should use the 'rendering distance' on objects to exclude distant objects from the final image. The default behaviour is to use it.


getUseRenderingDistance

boolean getUseRenderingDistance()
Get whether this camera should use the 'rendering distance' on objects to exclude distant objects from the final image.


synchroniseBaseSettingsWith

void synchroniseBaseSettingsWith(ICamera cam)
Synchronise core camera settings with another.


getPositionForViewUpdate

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

Specified by:
getPositionForViewUpdate in interface IFrustum

getOrientationForViewUpdate

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

Specified by:
getOrientationForViewUpdate in interface IFrustum


Copyright © 2007 netAllied GmbH. All Rights Reserved.