Node3d

3D scene node

static if(ENABLE_OPENGL)
static if(BACKEND_GUI)
class Node3d : Transform {}

Constructors

this
this(string id)
Undocumented in source.
this
this(string id, DrawableObject drawable)
Undocumented in source.

Members

Functions

addChild
Node3d addChild(Node3d node)

add child node, return current node

child
Node3d child(int index)

returns child node by index

findChild
int findChild(Node3d node)

find node index, returns -1 if not found

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)

Properties

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.
childCount
int childCount [@property getter]

returns child node count

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

drawable attached to node

forwardVectorView
vec3 forwardVectorView [@property getter]

Returns the forward vector of the Node in view space.

forwardVectorWorld
vec3 forwardVectorWorld [@property getter]

Returns the forward vector of the Node in world space.

id
string id [@property getter]

id of node

id
string id [@property setter]

set id for node

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.

light
LightRef light [@property getter]

light attached to node

light
Light light [@property setter]

attach light to node

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.
projectionViewMatrix
const(mat4) projectionViewMatrix [@property getter]

get projection*view matrix based on active camera

projectionViewModelMatrix
const(mat4) projectionViewModelMatrix [@property getter]

returns projectionMatrix * viewMatrix * modelMatrix

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.
translationView
vec3 translationView [@property getter]

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

translationWorld
vec3 translationWorld [@property getter]

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

viewMatrix
const(mat4) viewMatrix [@property getter]

get view matrix based on active camera

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.
worldMatrix
const(mat4) worldMatrix [@property getter]

returns world matrix

worldViewMatrix
const(mat4) worldViewMatrix [@property getter]

Gets the world view matrix corresponding to this node.

Variables

_children
ObjectList!Node3d _children;
Undocumented in source.
_drawable
DrawableObjectRef _drawable;
Undocumented in source.
_id
string _id;
Undocumented in source.
_light
LightRef _light;
Undocumented in source.
_parent
Node3d _parent;
Undocumented in source.
_projectionViewModelMatrix
mat4 _projectionViewModelMatrix;
Undocumented in source.
_scene
Scene3d _scene;
Undocumented in source.
_visible
bool _visible;
Undocumented in source.
_worldMatrix
mat4 _worldMatrix;
Undocumented in source.

Inherited Members

From Transform

_dirtyTransform
bool _dirtyTransform;
Undocumented in source.
_hasScale
bool _hasScale;
Undocumented in source.
_hasTranslation
bool _hasTranslation;
Undocumented in source.
_hasRotation
bool _hasRotation;
Undocumented in source.
_scale
vec3 _scale;
Undocumented in source.
_translation
vec3 _translation;
Undocumented in source.
_rotation
mat4 _rotation;
Undocumented in source.
_matrix
mat4 _matrix;
Undocumented in source.
invalidateTransform
void invalidateTransform()
Undocumented in source. Be warned that the author may not have intended to support it.
scaling
const(vec3) scaling [@property getter]

get scale vector

scalingX
float scalingX [@property getter]

get scale X

scalingY
float scalingY [@property getter]

get scale Y

scalingZ
float scalingZ [@property getter]

get scale Z

scaling
vec3 scaling [@property setter]

set scale vector

scaling
float scaling [@property setter]

set scale vector x, y, z to the same value

scalingX
float scalingX [@property setter]

set scale X

scalingY
float scalingY [@property setter]

set scale Y

scalingZ
float scalingZ [@property setter]

set scale Z

translation
const(vec3) translation [@property getter]

get translation vector

translationX
float translationX [@property getter]

get translation X

translationY
float translationY [@property getter]

get translation Y

translationZ
float translationZ [@property getter]

get translation Z

translation
vec3 translation [@property setter]

set translation vector

translation
float translation [@property setter]

set translation vector x, y, z to the same value

translationX
float translationX [@property setter]

set translation x

translationY
float translationY [@property setter]

set translation y

translationZ
float translationZ [@property setter]

set translation z

translate
void translate(vec3 value)

translate by vector

translateX
void translateX(float value)

translate X

translateY
void translateY(float value)

translate Y

translateZ
void translateZ(float value)

translate Z

scale
void scale(vec3 value)

scale by vector

scale
void scale(float value)

scale all axis by the same values

scaleX
void scaleX(float value)

scale X

scaleY
void scaleY(float value)

scale Y

scaleZ
void scaleZ(float value)

scale Z

rotateX
void rotateX(float angle)

rotate around X axis

rotateY
void rotateY(float angle)

rotate around Y axis

rotateZ
void rotateZ(float angle)

rotate around Z axis

rotate
void rotate(float angle, vec3 axis)

rotate around custom axis

setIdentity
void setIdentity()

set transform to identity transform

matrix
const(mat4) matrix [@property getter]

get transform matrix, recalculates if needed

matrix
const(mat4) matrix [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
lookAt
void lookAt(vec3 eye, vec3 center, vec3 up)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta