Object Hierarchy:

Object hierarchy for MatrixStack


public class MatrixStack : Object

Tracks your current position within a hierarchy and lets you build up a graph of transformations as you traverse through a hierarchy such as a scenegraph.

A MatrixStack always maintains a reference to a single transformation at any point in time, representing the transformation at the current position in the hierarchy. You can get a reference to the current transformation by calling get_entry.

When a MatrixStack is first created with MatrixStack then it is conceptually positioned at the root of your hierarchy and the current transformation simply represents an identity transformation.

As you traverse your object hierarchy (your scenegraph) then you should call push whenever you move down one level and call pop whenever you move back up one level towards the root.

At any time you can apply a set of operations, such as "rotate", "scale", "translate" on top of the current transformation of a MatrixStack using functions such as rotate, scale and translate. These operations will derive a new current transformation and will never affect a transformation that you have referenced using get_entry.

Internally applying operations to a MatrixStack builds up a graph of MatrixEntry structures which each represent a single immutable transform.

Namespace: Cogl
Package: doc


Creation methods:


Inherited Members:

All known members inherited from class Cogl.Object