HGamer3D-Ogre-Binding-0.1.8: Library to enable 3D game development for Haskell - Ogre Bindings

Safe HaskellSafe-Infered

HGamer3D.Bindings.Ogre.ClassFrustum

Synopsis

Documentation

newSource

Arguments

:: String

name

-> IO HG3DClass 

Named constructor.

deleteSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance which is going to be deleted.

-> IO () 

Sets the Y-dimension Field Of View (FOV) of the frustum. Field Of View (FOV) is the angle made between the frustum's position, and the edges of the screen onto which the scene is projected. High values (90+ degrees) result in a wide-angle, fish-eye kind of view, low values (30- degrees) in a stretched, telescopic kind of view. Typical values are between 45 and 60 degrees. This value represents the VERTICAL field-of-view. The horizontal field of view is calculated from this depending on the dimensions of the viewport (they will only be the same if the viewport is square). Setting the FOV overrides the value supplied for frustum::setNearClipPlane.

setFOVySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Radians

fovy

-> IO () 

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

getFOVySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Radians 

setNearClipDistanceSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

nearDist

-> IO () 

Sets the position of the near clipping plane.

Sets the position of the near clipping plane. The position of the near clipping plane is the distance from the frustums position to the screen on which the world is projected. The near plane distance, combined with the field-of-view and the aspect ratio, determines the size of the viewport through which the world is viewed (in world co-ordinates). Note that this world viewport is different to a screen viewport, which has it's dimensions expressed in pixels. The frustums viewport should have the same aspect ratio as the screen viewport it renders into to avoid distortion.

getNearClipDistanceSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

setFarClipDistanceSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

farDist

-> IO () 

Retrieves the distance from the frustum to the far clipping plane.

Sets the distance to the far clipping plane. The view frustum is a pyramid created from the frustum position and the edges of the viewport. This method sets the distance for the far end of that pyramid. Different applications need different values: e.g. a flight sim needs a much further far clipping plane than a first-person shooter. An important point here is that the larger the ratio between near and far clipping planes, the lower the accuracy of the Z-buffer used to depth-cue pixels. This is because the Z-range is limited to the size of the Z buffer (16 or 32-bit) and the max values must be spread over the gap between near and far clip planes. As it happens, you can affect the accuracy far more by altering the near distance rather than the far distance, but keep this in mind.

getFarClipDistanceSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

setAspectRatioSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

ratio

-> IO () 

Retreives the current aspect ratio.

Sets the aspect ratio for the frustum viewport. The ratio between the x and y dimensions of the rectangular area visible through the frustum is known as aspect ratio: aspect = width / height . The default for most fullscreen windows is 1.3333 - this is also assumed by Ogre

getAspectRatioSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

setFrustumOffsetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Vec2

offset - The horizontal and vertical plane offsets.

-> IO () 

Sets frustum offsets, used in stereo rendering. You can set both horizontal and vertical plane offsets of eye; in stereo rendering frustum is moved in horizontal plane. To be able to render from two eyes you'll need two cameras rendering on two RenderTargets. The frustum offsets is in world coordinates, and default to (0, 0) - no offsets.

Sets frustum offsets, used in stereo rendering. You can set both horizontal and vertical plane offsets of eye; in stereo rendering frustum is moved in horizontal plane. To be able to render from two eyes you'll need two cameras rendering on two RenderTargets. The frustum offsets is in world coordinates, and default to (0, 0) - no offsets.

setFrustumOffset2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

horizontal - The horizontal plane offset.

-> Float

vertical - The vertical plane offset.

-> IO () 

Retrieves the frustum offsets.

getFrustumOffsetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Vec2 

setFocalLengthSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

focalLength - The distance to the focal plane from the frustum in world coordinates.

-> IO () 

Returns focal length of frustum.

Sets frustum focal length (used in stereo rendering).

getFocalLengthSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

setFrustumExtentsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

left - The position where the side clip planes intersect the near clip plane, in eye space

-> Float

right

-> Float

top

-> Float

bottom

-> IO () 

Reset the frustum extents to be automatically derived from other params.

Manually set the extents of the frustum.

resetFrustumExtentsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Get the extents of the frustum in view space.

getFrustumExtentsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO (Float, Float, Float, Float)

outleft

isCustomViewMatrixEnabledSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Returns whether a custom view matrix is in use.

isCustomProjectionMatrixEnabledSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Returns whether a custom projection matrix is in use.

isVisible3Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Vec3

vert - Vertex to be checked (world space)

-> IO (EnumFrustumPlane, Bool)

culledBy - Optional pointer to an int which will be filled by the plane number which culled the box if the result was false;

Tests whether the given vertex is visible in the FrustumOtherwise, false is returned.

getTypeFlagsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Int 

Overridden from MovableObject::getTypeFlags

getBoundingRadiusSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

Overridden from MovableObject

getMovableTypeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO String 

Overridden from MovableObject

getMaterialSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO SharedPtr 

Overridden from Renderable

getSquaredViewDepthSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

cam

-> IO Float 

Overridden from Renderable

getWorldSpaceCornersSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Vec3 

Gets the world space corners of the frustum. The corners are ordered as follows: top-right near, top-left near, bottom-left near, bottom-right near, top-right far, top-left far, bottom-left far, bottom-right far.

setProjectionTypeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> EnumProjectionType

pt

-> IO () 

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

Sets the type of projection to use (orthographic or perspective). Default is perspective.

getProjectionTypeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO EnumProjectionType 

setOrthoWindowSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

w - The dimensions of the view window in world units

-> Float

h

-> IO () 

Sets the orthographic window height, for use with orthographic rendering only. The width of the window will be calculated from the aspect ratio.

Sets the orthographic window settings, for use with orthographic rendering only. Calling this method will recalculate the aspect ratio, use setOrthoWindowHeight or setOrthoWindowWidth alone if you wish to preserve the aspect ratio but just fit one or other dimension to a particular size.

setOrthoWindowHeightSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

h - The height of the view window in world units

-> IO () 

Sets the orthographic window width, for use with orthographic rendering only. The height of the window will be calculated from the aspect ratio.

setOrthoWindowWidthSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

w - The width of the view window in world units

-> IO () 

Gets the orthographic window height, for use with orthographic rendering only.

getOrthoWindowHeightSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

getOrthoWindowWidthSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

Gets the orthographic window width, for use with orthographic rendering only. This is calculated from the orthographic height and the aspect ratio

disableReflectionSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Returns whether this frustum is being reflected.

Disables reflection modification previously turned on with enableReflection

isReflectedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

disableCustomNearClipPlaneSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Is a custom near clip plane in use?

Disables any custom near clip plane.

isCustomNearClipPlaneEnabledSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

getPositionForViewUpdateSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Vec3 

Get the derived position of this frustum.

getOrientationForViewUpdateSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Quaternion 

Get the derived orientation of this frustum.

setOrientationModeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> EnumOrientationMode

orientationMode

-> IO () 

Get the orientation mode of the frustum. Getting the orientation of a frustum is only supported on iPhone at this time. An exception is thrown on other platforms.

Set the orientation mode of the frustum. Default is OR_DEGREE_0 Setting the orientation of a frustum is only supported on iPhone at this time. An exception is thrown on other platforms.

getOrientationModeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO EnumOrientationMode