MatrixEntry


Object Hierarchy:

Object hierarchy for MatrixEntry

Description:

[ Compact ]
public class MatrixEntry

Represents a single immutable transformation that was retrieved from a MatrixStack using get_entry.

Internally a MatrixEntry represents a single matrix operation (such as "rotate", "scale", "translate") which is applied to the transform of a single parent entry.

Using the MatrixStack api effectively builds up a graph of these immutable MatrixEntry structures whereby operations that can be shared between multiple transformations will result in shared MatrixEntry nodes in the graph.

When a MatrixStack is first created it references one MatrixEntry that represents a single "load identity" operation. This serves as the root entry and all operations that are then applied to the stack will extend the graph starting from this root "load identity" entry.

Given the typical usage model for a MatrixStack and the way the entries are built up while traversing a scenegraph then in most cases where an application is interested in comparing two transformations for equality then it is enough to simply compare two MatrixEntry pointers directly. Technically this can lead to false negatives that could be identified with a deeper comparison but often these false negatives are unlikely and don't matter anyway so this enables extremely cheap comparisons.

<note>MatrixEntry<!-- -->s are reference counted using @ref and unref not with cogl_object_ref and cogl_object_unref.</note>


Namespace: Cogl
Package: doc

Content:

Methods: