gl3n.ext.matrixstack
-
Declaration
struct
MatrixStack
(T) if (is_matrix!T);A matrix stack similiar to OpenGLs glPushMatrix/glPopMatrix
-
Declaration
alias
Matrix
= T;Holds the internal matrix type
-
Declaration
Matrix
top
;The
top
matrix, the one you work with -
Declaration
size_t
realloc_interval
;If the stack is too small to hold more items, space for
realloc_interval
more elements will be allocated -
Declaration
pure nothrow this(size_t
depth
);Sets the stacks initial size to
depth
elements -
Declaration
pure nothrow void
set
(Matrixmatrix
);Sets the top
matrix
-
Declaration
pure nothrow void
push
();Pushes the top matrix on the stack and keeps a copy as the new top matrix
-
Declaration
pure nothrow void
push
(Matrixmatrix
);Pushes the top
matrix
on the stack and setsmatrix
as the new topmatrix
. -
Declaration
pure nothrow ref Matrix
pop
();Pops a matrix from the stack and sets it as top matrix. Also returns a reference to the new top matrix.
-
-
Declaration
pure nothrow MatrixStack!T
matrixStack
(T)(size_tdepth
= 16);Constructs a new stack with an initial size of
depth
elements