Determines if the only difference between two transforms is a
translation and if so returns what the x,
y,
and z
components of
the translation are.
If the difference between the two translations involves anything other than a translation then the function returns %FALSE.
A second reference transform
Compares two arbitrary #CoglMatrixEntry transforms for equality returning %TRUE if they are equal or %FALSE otherwise.
A second #CoglMatrixEntry to compare
Resolves the current entry
transform into a #CoglMatrix by
combining the sequence of operations that have been applied to
build up the current transform.
There are two possible ways that this function may return its result depending on whether it's possible to directly point to an internal #CoglMatrix or whether the result needs to be composed of multiple operations.
If an internal matrix contains the required result then this
function will directly return a pointer to that matrix, otherwise
if the function returns %NULL then matrix
will be initialized
to match the transform of entry
.
matrix
will be left untouched if a direct pointer is
returned.
Determines whether entry
is known to represent an identity
transform.
If this returns %TRUE then the entry is definitely the identity matrix. If it returns %FALSE it may or may not be the identity matrix but no expensive comparison is performed to verify it.
Takes a reference on the given entry
to ensure the entry
stays
alive and remains valid. When you are finished with the entry
then
you should call cogl_matrix_entry_unref().
It is an error to pass an entry
pointer to cogl_object_ref() and
cogl_object_unref()
Releases a reference on entry
either taken by calling
cogl_matrix_entry_unref() or to release the reference given when
calling cogl_matrix_stack_get_entry().
Represents a single immutable transformation that was retrieved from a #CoglMatrixStack using cogl_matrix_stack_get_entry().
Internally a #CoglMatrixEntry represents a single matrix operation (such as "rotate", "scale", "translate") which is applied to the transform of a single parent entry.
Using the #CoglMatrixStack api effectively builds up a graph of these immutable #CoglMatrixEntry structures whereby operations that can be shared between multiple transformations will result in shared #CoglMatrixEntry nodes in the graph.
When a #CoglMatrixStack is first created it references one #CoglMatrixEntry 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 #CoglMatrixStack 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 #CoglMatrixEntry 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.