MatrixStack


Description:

public MatrixStack (Context ctx)

Allocates a new MatrixStack that can be used to build up transformations relating to objects in a scenegraph like hierarchy.

(See the description of MatrixStack and MatrixEntry for more details of what a matrix stack is best suited for)

When a MatrixStack is first allocated it is conceptually positioned at the root of your scenegraph hierarchy. As you traverse your scenegraph then you should call push whenever you move down a level and pop whenever you move back up a level towards the root.

Once you have allocated a MatrixStack you can get a reference to the current transformation for the current position in the hierarchy by calling get_entry .

Once you have allocated a MatrixStack you can apply operations such as rotate, scale and translate to modify the current transform for the current position in the hierarchy by calling rotate, scale and translate.

Parameters:

ctx

A Context

Returns:

A newly allocated MatrixStack