Class sandy.core.buffer.MatrixBuffer

Description

This class stores the matrix used to render correctly the objects. This static class is used during the rendering, when we climb the tree hierarchy of the 3D scene.

Method Index

getCurrentMatrix(), init(), pop(), push()

Method Detail

push

static public function push(m:Matrix4):Matrix4

Push a Matrix4 to the current.

If there is no Matrix4 already pushed, nothing is done with it. In the other case, it is multiplied with the current values of the pushed Matrix4 and saved.

The getCurrentMatrix() method returns the current Matrix4 within the pushed Matrix4 will be multiplied.

Parameters

mThe Matrix4 to push

Return

The multiplied Matrix4

getCurrentMatrix

static public function getCurrentMatrix(Void):Matrix4

Get the current Matrix4 within the pushed Matrix4 will be multiplied.

It returns null if no Matrix4 has been pushed.

Return

The current multiplie Matrix4 or null

pop

static public function pop(Void):Matrix4

Pop a pushed Matrix4.

Returns the previous Matrix4 (before the last push). If no Matrix4 has been pushed, returns null.

Return

The last multiplied Matrix4 or null

init

static public function init(Void):Void

Completely reinitialize the MatrixBuffer. Deleting all the buffered matrix, and all the public properties.

Parameters

Void