Camera

Camera

Constructors

this
this(string ID)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

invalidateTransform
void invalidateTransform()
Undocumented in source. Be warned that the author may not have intended to support it.
setOrtho
void setOrtho(float left, float right, float bottom, float top, float near, float far)

set orthographic projection

setPerspective
void setPerspective(float width, float height, float fov, float near, float far)

set perspective projection

Properties

enabled
bool enabled [@property getter]

returns true if camera is active (enabled)

enabled
bool enabled [@property setter]

activates / deactivates camera

farRange
float farRange [@property getter]

returns FAR range of camera

projectionMatrix
const(mat4) projectionMatrix [@property getter]

get projection matrix

projectionMatrix
mat4 projectionMatrix [@property setter]

set custom projection matrix

projectionViewMatrix
const(mat4) projectionViewMatrix [@property getter]

get projection*view matrix

viewChanged
bool viewChanged [@property getter]

returns true if some changes occured in projection or view matrix since last matrix getter call

viewMatrix
const(mat4) viewMatrix [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_dirtyView
bool _dirtyView;
Undocumented in source.
_dirtyViewProjection
bool _dirtyViewProjection;
Undocumented in source.
_enabled
bool _enabled;
Undocumented in source.
_far
float _far;
Undocumented in source.
_projectionMatrix
mat4 _projectionMatrix;
Undocumented in source.
_viewMatrix
mat4 _viewMatrix;
Undocumented in source.
_viewProjectionMatrix
mat4 _viewProjectionMatrix;
Undocumented in source.

Inherited Members

From Node3d

_parent
Node3d _parent;
Undocumented in source.
_scene
Scene3d _scene;
Undocumented in source.
_id
string _id;
Undocumented in source.
_visible
bool _visible;
Undocumented in source.
_drawable
DrawableObjectRef _drawable;
Undocumented in source.
_light
LightRef _light;
Undocumented in source.
_worldMatrix
mat4 _worldMatrix;
Undocumented in source.
_children
ObjectList!Node3d _children;
Undocumented in source.
visible
bool visible [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
visible
bool visible [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
drawable
DrawableObjectRef drawable [@property getter]

drawable attached to node

light
LightRef light [@property getter]

light attached to node

light
Light light [@property setter]

attach light to node

scene
Scene3d scene [@property getter]

returns scene for node

scene
Scene3d scene [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
childCount
int childCount [@property getter]

returns child node count

child
Node3d child(int index)

returns child node by index

addChild
Node3d addChild(Node3d node)

add child node, return current node

removeChild
void removeChild(int index)

removes and destroys child node by index

removeChild
bool removeChild(Node3d child)

remove and destroy child node (returns true if child is found and removed)

findChild
int findChild(Node3d node)

find node index, returns -1 if not found

children
ObjectList!Node3d children [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
parent
Node3d parent [@property getter]

parent node

parent
Node3d parent [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
id
string id [@property getter]

id of node

id
string id [@property setter]

set id for node

activeCamera
Camera activeCamera [@property getter]

active camera or null of no camera

cameraPosition
vec3 cameraPosition [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
viewMatrix
const(mat4) viewMatrix [@property getter]

get view matrix based on active camera

projectionViewMatrix
const(mat4) projectionViewMatrix [@property getter]

get projection*view matrix based on active camera

_projectionViewModelMatrix
mat4 _projectionViewModelMatrix;
Undocumented in source.
projectionViewModelMatrix
const(mat4) projectionViewModelMatrix [@property getter]

returns projectionMatrix * viewMatrix * modelMatrix

worldMatrix
const(mat4) worldMatrix [@property getter]

returns world matrix

worldViewMatrix
const(mat4) worldViewMatrix [@property getter]

Gets the world view matrix corresponding to this node.

translationWorld
vec3 translationWorld [@property getter]

returns translation vector (position) of this node in world space

translationView
vec3 translationView [@property getter]

returns translation vector (position) of this node in view space

inverseTransposeWorldMatrix
const(mat4) inverseTransposeWorldMatrix [@property getter]

Gets the inverse transpose world matrix corresponding to this node.

inverseTransposeWorldViewMatrix
const(mat4) inverseTransposeWorldViewMatrix [@property getter]

Gets the inverse transpose world view matrix corresponding to this node.

forwardVectorWorld
vec3 forwardVectorWorld [@property getter]

Returns the forward vector of the Node in world space.

forwardVectorView
vec3 forwardVectorView [@property getter]

Returns the forward vector of the Node in view space.

Meta