Cogl.MatrixEntry

const Cogl = imports.gi.Cogl;

let matrixEntry = new Cogl.MatrixEntry();
  

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

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

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

When a Cogl.MatrixStack is first created it references one Cogl.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 Cogl.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 Cogl.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>Cogl.MatrixEntry<!-- -->s are reference counted using Cogl.MatrixEntry.prototype.ref and Cogl.MatrixEntry.prototype.unref not with Cogl.Object.ref and Cogl.Object.unref.</note>