Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2012-11-19 0:05

Class SpiderGL.Space.TransformationStack

The SpiderGL.Space.TransformationStack holds the model, view and projection matrix stacks and calculates their matrix compositions.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a SpiderGL.Space.TransformationStack.
Field Summary
Field Attributes Field Name and Description
 
Gets the depth range stack.
 
Gets the model stack.
 
Gets a copy of the top matrix of the model stack.
 
Gets a reference to the top matrix of the model stack.
 
Gets a copy of the inverse of the top matrix of the model stack.
 
Gets a reference to the inverse of the top matrix of the model stack.
 
Gets a copy of the transpose of the inverse of the top matrix of the model stack.
 
Gets a reference to the transpose of the inverse of the top matrix of the model stack.
 
Gets a copy of the transpose of the top matrix of the model stack.
 
Gets a reference to the transpose of the top matrix of the model stack.
 
Gets a copy of the 3-dimensional vector representing the negated 3rd row of the inverse of the model-view matrix.
 
Gets a reference to the 3-dimensional vector representing the negated 3rd row of the inverse of the model-view matrix.
 
Gets a copy of the 3-dimensional vector representing the 4th column of the inverse of the model-view matrix.
 
Gets a reference to the 3-dimensional vector representing the 4th column of the inverse of the model-view matrix.
 
Gets a copy of the matrix T = V * M, where V is the view matrix and M the model matrix.
 
Gets a reference to the matrix T = V * M, where V is the view matrix and M the model matrix.
 
Gets a copy of the inverse of the matrix T = V * M, where V is the view matrix and M the model matrix.
 
Gets a reference to the inverse of the matrix T = V * M, where V is the view matrix and M the model matrix.
 
Gets a copy of the transpose of the inverse of the matrix T = V * M, where V is the view matrix and M the model matrix.
 
Gets a reference to the transpose of the inverse of the matrix T = V * M, where V is the view matrix and M the model matrix.
 
Gets a copy of the transpose of the matrix T = V * M, where V is the view matrix and M the model matrix.
 
Gets a reference to the transpose of the matrix T = V * M, where V is the view matrix and M the model matrix.
 
Gets a copy of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
 
Gets a reference to the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
 
Gets a copy of the inverse of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
 
Gets a reference to the inverse of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
 
Gets a copy of the transpose of the inverse of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
 
Gets a reference to the transpose of the inverse of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
 
Gets a copy of the transpose of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
 
Gets a reference to the transpose of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
 
Gets the projection stack.
 
Gets a copy of the top matrix of the projection stack.
 
Gets a reference to the top matrix of the projection stack.
 
Gets a copy of the inverse of the top matrix of the projection stack.
 
Gets a reference to the inverse of the top matrix of the projection stack.
 
Gets a copy of the transpose of the inverse of the top matrix of the projection stack.
 
Gets a reference to the transpose of the inverse of the top matrix of the projection stack.
 
Gets a copy of the transpose of the top matrix of the projection stack.
 
Gets a reference to the transpose of the top matrix of the projection stack.
 
Gets the view stack.
 
Gets a copy of the top matrix of the view stack.
 
Gets a reference to the top matrix of the view stack.
 
Gets a copy of the inverse of the top matrix of the view stack.
 
Gets a reference to the inverse of the top matrix of the view stack.
 
Gets a copy of the transpose of the inverse of the top matrix of the view stack.
 
Gets a reference to the transpose of the inverse of the top matrix of the view stack.
 
Gets a copy of the transpose of the top matrix of the view stack.
 
Gets a reference to the transpose of the top matrix of the view stack.
 
Gets the viewport stack.
 
Gets a copy of the matrix T = P * V, where P is the projection matrix and V the view matrix.
 
Gets a reference to the matrix T = P * V, where P is the projection matrix and V the view matrix.
 
Gets a copy of the inverse of the matrix T = P * V, where P is the projection matrix and V the view matrix.
 
Gets a reference to the inverse of the matrix T = P * V, where P is the projection matrix and V the view matrix.
 
Gets a copy of the transpose of the inverse of the matrix T = P * V, where P is the projection matrix and V the view matrix.
 
Gets a reference to the transpose of the inverse of the matrix T = P * V, where P is the projection matrix and V the view matrix.
 
Gets a copy of the transpose of the matrix T = P * V, where P is the projection matrix and V the view matrix.
 
Gets a reference to the transpose of the matrix T = P * V, where P is the projection matrix and V the view matrix.
 
Gets a copy of the transpose of the inverse of the upper-left 3x3 matrix of the model matrix.
 
Gets a reference to the transpose of the inverse of the upper-left 3x3 matrix of the model-view matrix.
 
Gets a copy of the transpose of the inverse of the upper-left 3x3 matrix of the model matrix.
 
Gets a reference to the transpose of the inverse of the upper-left 3x3 matrix of the model matrix.
 
Gets a reference to the 3-dimensional vector representing the negated 3rd row of the inverse of the model-view matrix.
 
Gets a reference to the 3-dimensional vector representing the negated 3rd row of the inverse of the view matrix.
 
Gets a copy of the 3-dimensional vector representing the 4th column of the inverse of the model-view matrix.
 
Gets a reference to the 3-dimensional vector representing the 4th column of the inverse of the view matrix.
Fields borrowed from class SpiderGL.Core.ObjectBase:
uid

Method Summary

Method Attributes Method Name and Description
 
project(xyzw)
 
Resets the three stacks.
 
unproject(xyz)

Class Detail

SpiderGL.Space.TransformationStack()
Creates a SpiderGL.Space.TransformationStack. The purpose of SpiderGL.Space.TransformationStack is to provide transformation stack similar to the one in the fixed-pipeline versions of OpenGL. Differently from OpenGL, which has two stacks, namely MODELVIEW and PRIJECTION, the SpiderGL.Space.TransformationStack is composed of three SpiderGL.Space.MatrixStack stacks: model, view and projection. All three stacks can be directly accessed, as well as utility getters to obtain compositions of matrices, e.g. model-view-projection, model-view-inverse etc. To avoid recalculation of several sub-products, matrix compositions and variations are cached and updated when stack operations occur.
var xform = new SpiderGL.Space.TransformationStack();

var uniforms = {
	uModelViewprojection : null,
	uNormalMatrix        : null,
	uColor               : null
};

program.bind();

xform.projection.loadIdentity();
xform.projection.perspective(SpiderGL.Math.degToRad(60.0), width/height, 0.1, 100.0);

xform.view.loadIdentity();
xform.view.lookAt([0, 0, 10], [0, 0, 0], [0, 1, 0]);

xform.model.loadIdentity();
xform.model.scale([0.1, 0.1, 0.1]);

for (var i=0; i
						
					
				
					
					
					
						
See:
reset
SpiderGL.Space.MatrixStack

Field Detail

Gets the depth range stack.
See:
viewport
Gets the model stack.
See:
view
projection
{array} modelMatrix
Gets a copy of the top matrix of the model stack.
See:
modelMatrix$
SpiderGL.Space.MatrixStack.matrix
modelMatrix$
Gets a reference to the top matrix of the model stack. The returned array MUST NOT be changed.
See:
modelMatrix
SpiderGL.Space.MatrixStack.matrix$
{array} modelMatrixInverse
Gets a copy of the inverse of the top matrix of the model stack.
See:
modelMatrixInverse$
SpiderGL.Space.MatrixStack.inverse
{array} modelMatrixInverse$
Gets a reference to the inverse of the top matrix of the model stack. The returned array MUST NOT be changed.
See:
modelMatrixInverse
SpiderGL.Space.MatrixStack.inverse$
{array} modelMatrixInverseTranspose
Gets a copy of the transpose of the inverse of the top matrix of the model stack.
See:
modelMatrixInverseTranspose$
SpiderGL.Space.MatrixStack.inverseTranspose
{array} modelMatrixInverseTranspose$
Gets a reference to the transpose of the inverse of the top matrix of the model stack. The returned array MUST NOT be changed.
See:
modelMatrixInverseTranspose
SpiderGL.Space.MatrixStack.inverseTranspose$
{array} modelMatrixTranspose
Gets a copy of the transpose of the top matrix of the model stack.
See:
modelMatrixTranspose$
SpiderGL.Space.MatrixStack.transpose
{array} modelMatrixTranspose$
Gets a reference to the transpose of the top matrix of the model stack. The returned array MUST NOT be changed.
See:
modelMatrixTranspose
SpiderGL.Space.MatrixStack.transpose$
{array} modelSpaceViewDirection
Gets a copy of the 3-dimensional vector representing the negated 3rd row of the inverse of the model-view matrix.
See:
modelSpaceViewDirection$
modelSpaceViewerPosition
worldSpaceViewDirection
{array} modelSpaceViewDirection$
Gets a reference to the 3-dimensional vector representing the negated 3rd row of the inverse of the model-view matrix. The returned array MUST NOT be changed.
See:
modelSpaceViewDirection
modelSpaceViewerPosition$
worldSpaceViewDirection$
{array} modelSpaceViewerPosition
Gets a copy of the 3-dimensional vector representing the 4th column of the inverse of the model-view matrix.
See:
modelSpaceViewerPosition$
modelSpaceViewDirection$
worldSpaceViewerPosition
{array} modelSpaceViewerPosition$
Gets a reference to the 3-dimensional vector representing the 4th column of the inverse of the model-view matrix. The returned array MUST NOT be changed.
See:
modelSpaceViewerPosition
modelSpaceViewDirection$
worldSpaceViewerPosition$
{array} modelViewMatrix
Gets a copy of the matrix T = V * M, where V is the view matrix and M the model matrix.
See:
modelViewMatrix$
{array} modelViewMatrix$
Gets a reference to the matrix T = V * M, where V is the view matrix and M the model matrix. The returned array MUST NOT be changed.
See:
modelViewMatrix
{array} modelViewMatrixInverse
Gets a copy of the inverse of the matrix T = V * M, where V is the view matrix and M the model matrix.
See:
modelViewMatrixInverse$
{array} modelViewMatrixInverse$
Gets a reference to the inverse of the matrix T = V * M, where V is the view matrix and M the model matrix. The returned array MUST NOT be changed.
See:
modelViewMatrixInverse
{array} modelViewMatrixInverseTranspose
Gets a copy of the transpose of the inverse of the matrix T = V * M, where V is the view matrix and M the model matrix.
See:
modelViewMatrixInverseTranspose$
{array} modelViewMatrixInverseTranspose$
Gets a reference to the transpose of the inverse of the matrix T = V * M, where V is the view matrix and M the model matrix. The returned array MUST NOT be changed.
See:
modelViewMatrixInverseTranspose
{array} modelViewMatrixTranspose
Gets a copy of the transpose of the matrix T = V * M, where V is the view matrix and M the model matrix.
See:
modelViewMatrixTranspose$
{array} modelViewMatrixTranspose$
Gets a reference to the transpose of the matrix T = V * M, where V is the view matrix and M the model matrix. The returned array MUST NOT be changed.
See:
modelViewMatrixTranspose
{array} modelViewProjectionMatrix
Gets a copy of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
See:
modelViewProjectionMatrix$
{array} modelViewProjectionMatrix$
Gets a reference to the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix. The returned array MUST NOT be changed.
See:
modelViewProjectionMatrix
{array} modelViewProjectionMatrixInverse
Gets a copy of the inverse of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
See:
modelViewProjectionMatrix$
{array} modelViewProjectionMatrixInverse$
Gets a reference to the inverse of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix. The returned array MUST NOT be changed.
See:
modelViewProjectionMatrix
{array} modelViewProjectionMatrixInverseTranspose
Gets a copy of the transpose of the inverse of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
See:
modelViewProjectionMatrixInverseTranspose$
{array} modelViewProjectionMatrixInverseTranspose$
Gets a reference to the transpose of the inverse of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix. The returned array MUST NOT be changed.
See:
modelViewProjectionMatrixInverseTranspose
{array} modelViewProjectionMatrixTranspose
Gets a copy of the transpose of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix.
See:
modelViewProjectionMatrixTranspose$
{array} modelViewProjectionMatrixTranspose$
Gets a reference to the transpose of the matrix T = P * V * M, where P is the projection matrix, V the view matrix and M the model matrix. The returned array MUST NOT be changed.
See:
modelViewProjectionMatrixTranspose
Gets the projection stack.
See:
model
view
{array} projectionMatrix
Gets a copy of the top matrix of the projection stack.
See:
projectionMatrix$
SpiderGL.Space.MatrixStack.matrix
{array} projectionMatrix$
Gets a reference to the top matrix of the projection stack. The returned array MUST NOT be changed.
See:
projectionMatrix
SpiderGL.Space.MatrixStack.matrix$
{array} projectionMatrixInverse
Gets a copy of the inverse of the top matrix of the projection stack.
See:
projectionMatrixInverse$
SpiderGL.Space.MatrixStack.inverse
{array} projectionMatrixInverse$
Gets a reference to the inverse of the top matrix of the projection stack. The returned array MUST NOT be changed.
See:
projectionMatrixInverse
SpiderGL.Space.MatrixStack.inverse$
{array} projectionMatrixInverseTranspose
Gets a copy of the transpose of the inverse of the top matrix of the projection stack.
See:
projectionMatrixInverseTranspose$
SpiderGL.Space.MatrixStack.inverseTranspose
{array} projectionMatrixInverseTranspose$
Gets a reference to the transpose of the inverse of the top matrix of the projection stack. The returned array MUST NOT be changed.
See:
projectionMatrixInverseTranspose
SpiderGL.Space.MatrixStack.inverseTranspose$
{array} projectionMatrixTranspose
Gets a copy of the transpose of the top matrix of the projection stack.
See:
projectionMatrixTranspose$
SpiderGL.Space.MatrixStack.transpose
{array} projectionMatrixTranspose$
Gets a reference to the transpose of the top matrix of the projection stack. The returned array MUST NOT be changed.
See:
projectionMatrixTranspose
SpiderGL.Space.MatrixStack.transpose$
Gets the view stack.
See:
model
projection
{array} viewMatrix
Gets a copy of the top matrix of the view stack.
See:
viewMatrix$
SpiderGL.Space.MatrixStack.matrix
{array} viewMatrix$
Gets a reference to the top matrix of the view stack. The returned array MUST NOT be changed.
See:
viewMatrix
SpiderGL.Space.MatrixStack.matrix$
{array} viewMatrixInverse
Gets a copy of the inverse of the top matrix of the view stack.
See:
viewMatrixInverse$
SpiderGL.Space.MatrixStack.inverse
{array} viewMatrixInverse$
Gets a reference to the inverse of the top matrix of the view stack. The returned array MUST NOT be changed.
See:
viewMatrixInverse
SpiderGL.Space.MatrixStack.inverse$
{array} viewMatrixInverseTranspose
Gets a copy of the transpose of the inverse of the top matrix of the view stack.
See:
viewMatrixInverseTranspose$
SpiderGL.Space.MatrixStack.inverseTranspose
{array} viewMatrixInverseTranspose$
Gets a reference to the transpose of the inverse of the top matrix of the view stack. The returned array MUST NOT be changed.
See:
viewMatrixInverseTranspose
SpiderGL.Space.MatrixStack.inverseTranspose$
{array} viewMatrixTranspose
Gets a copy of the transpose of the top matrix of the view stack.
See:
viewMatrixTranspose$
SpiderGL.Space.MatrixStack.transpose
{array} viewMatrixTranspose$
Gets a reference to the transpose of the top matrix of the view stack. The returned array MUST NOT be changed.
See:
viewMatrixTranspose
SpiderGL.Space.MatrixStack.transpose$
Gets the viewport stack.
See:
depthRange
{array} viewProjectionMatrix
Gets a copy of the matrix T = P * V, where P is the projection matrix and V the view matrix.
See:
viewProjectionMatrix$
{array} viewProjectionMatrix$
Gets a reference to the matrix T = P * V, where P is the projection matrix and V the view matrix. The returned array MUST NOT be changed.
See:
viewProjectionMatrix
{array} viewProjectionMatrixInverse
Gets a copy of the inverse of the matrix T = P * V, where P is the projection matrix and V the view matrix.
See:
viewProjectionMatrixInverse$
{array} viewProjectionMatrixInverse$
Gets a reference to the inverse of the matrix T = P * V, where P is the projection matrix and V the view matrix. The returned array MUST NOT be changed.
See:
viewProjectionMatrixInverse
{array} viewProjectionMatrixInverseTranspose
Gets a copy of the transpose of the inverse of the matrix T = P * V, where P is the projection matrix and V the view matrix.
See:
viewProjectionMatrixInverseTranspose$
{array} viewProjectionMatrixInverseTranspose$
Gets a reference to the transpose of the inverse of the matrix T = P * V, where P is the projection matrix and V the view matrix. The returned array MUST NOT be changed.
See:
viewProjectionMatrixInverseTranspose
{array} viewProjectionMatrixTranspose
Gets a copy of the transpose of the matrix T = P * V, where P is the projection matrix and V the view matrix.
See:
viewProjectionMatrixTranspose$
{array} viewProjectionMatrixTranspose$
Gets a reference to the transpose of the matrix T = P * V, where P is the projection matrix and V the view matrix. The returned array MUST NOT be changed.
See:
viewProjectionMatrixTranspose
{array} viewSpaceNormalMatrix
Gets a copy of the transpose of the inverse of the upper-left 3x3 matrix of the model matrix.
See:
viewSpaceNormalMatrix$
worldSpaceNormalMatrix
{array} viewSpaceNormalMatrix$
Gets a reference to the transpose of the inverse of the upper-left 3x3 matrix of the model-view matrix. The returned array MUST NOT be changed.
See:
viewSpaceNormalMatrix
worldSpaceNormalMatrix$
{array} worldSpaceNormalMatrix
Gets a copy of the transpose of the inverse of the upper-left 3x3 matrix of the model matrix.
See:
worldSpaceNormalMatrix$
viewSpaceNormalMatrix
{array} worldSpaceNormalMatrix$
Gets a reference to the transpose of the inverse of the upper-left 3x3 matrix of the model matrix. The returned array MUST NOT be changed.
See:
worldSpaceNormalMatrix
viewSpaceNormalMatrix$
{array} worldSpaceViewDirection
Gets a reference to the 3-dimensional vector representing the negated 3rd row of the inverse of the model-view matrix.
See:
worldSpaceViewDirection$
worldSpaceViewerPosition
modelSpaceViewDirection
{array} worldSpaceViewDirection$
Gets a reference to the 3-dimensional vector representing the negated 3rd row of the inverse of the view matrix. The returned array MUST NOT be changed.
See:
worldSpaceViewDirection
worldSpaceViewerPosition$
modelSpaceViewDirection$
{array} worldSpaceViewerPosition
Gets a copy of the 3-dimensional vector representing the 4th column of the inverse of the model-view matrix.
See:
worldSpaceViewerPosition$
worldSpaceViewDirection
modelSpaceViewerPosition
{array} worldSpaceViewerPosition$
Gets a reference to the 3-dimensional vector representing the 4th column of the inverse of the view matrix. The returned array MUST NOT be changed.
See:
worldSpaceViewerPosition
worldSpaceViewDirection$
modelSpaceViewerPosition$

Method Detail

  • project(xyzw)
    Parameters:
    xyzw
  • reset()
    Resets the three stacks.
    See:
    SpiderGL.Space.MatrixStack.reset
  • unproject(xyz)
    Parameters:
    xyz