Yage3D.net
 

yage.scene.camera

Authors:
Eric Poggel

License:
LGPL v3

class CameraNode : yage.scene.movable.MovableNode;
TODO:
Document me.

this();
Construct

void dispose ();
Set the current listener to null if the listener is this CameraNode.

Plane[] getFrustum ();
Get six planes that make up the CameraNode's view frustum.

Matrix getInverseAbsoluteMatrix ();
Get the inverse of the camera's absolute matrix.

static CameraNode getListener ();
void setListener ();
Sound playback can occur from only one camera at a time. setListener() can be used to make this CameraNode the listener. getListener () will return, from all CameraNodes, the CameraNode that is the current listener. When there is no listener (listener is null ), the first camera added to a scene becomes the listener (not the first CameraNode created). The listener is set to null when the current listener is removed from its scene.

VisibleNode[] getNodesAtCoordinate (Vec!(2,float) position, bool includeBoundingSphere = false);
This function casts a ray from the Camera's view into the scene and returns all Nodes that it collides with. This will not return any Nodes from the Scene's skybox.

Params:
Vec!(2,float) position Coordinates between 0 and 1 in the camera's near view frustum.
bool includeBoundingSphere If true , collision tests will only be performed against Object's bounding sphere and not on a per-polygon basis. The bounding sphere is determined by VisibleNode.getRadius().

Returns:
An unsorted array of matching Nodes.

Vec3f getWorldCoordinate (Vec!(2,float) screenCoordinate, float z);
Unfinished! Get the 3d coordinate at the 2d screen coordinate at a distance of z from the camera.

Params:
x screen coordinate between 0 and 1, where 0 is the left side of the camrea's view, and 1 is the right.
x screen coordinate between 0 and 1, where 0 is the left side of the camrea's view, and 1 is the right.

void setView (float near = cast(float)1, float far = cast(float)1000000, float fov = cast(float)45, float aspect = cast(float)0, float threshold = 0.667F);
Set multiple variables that affect the camera's view.

Params:
float near Nothing closer than this will be rendered. The default is 1.
float far Nothing further away than this will be rendered. The default is 100,000.
float fov The field of view of the camera, in degrees. The default is 45.
apsect The aspect ratio of the camera. A special value of zero allows for it to be set automatically by the Camera resolution. Zero is also the default value.
float threshold Minimum size of a node in pixels before it's rendered. The default is 0.667 (2/3rds of a pixel).

ArrayBuilder!(VisibleNode) getVisibleNodes (Node root = cast(Node)null, ref ArrayBuilder!(VisibleNode) lookaside = opCall());
Get an array of all nodes that this camera can see.

Params:
node Root of the scenegraph to scan. Defaults to the camera's scene.
ArrayBuilder!(VisibleNode) lookaside Optional buffer to use for result to avoid memory allocation.

Yage source files are copywritten by their specified authors and available under the terms of the GNU LGPL.
Documentation generated with CandyDoc on Wed Aug 11 11:14:29 2010