Method

ClutterActorget_relative_transformation_matrix

Declaration [src]

void
clutter_actor_get_relative_transformation_matrix (
  ClutterActor* self,
  ClutterActor* ancestor,
  graphene_matrix_t* matrix
)

Description [src]

This gets a transformation matrix that will transform coordinates from the coordinate space of self into the coordinate space of ancestor.

For example if you need a matrix that can transform the local actor coordinates of self into stage coordinates you would pass the actor’s stage pointer as the ancestor.

If you pass NULL then the transformation will take you all the way through to eye coordinates. This can be useful if you want to extract the entire modelview transform that Clutter applies before applying the projection transformation. If you want to explicitly set a modelview on a CoglFramebuffer using cogl_set_modelview_matrix() for example then you would want a matrix that transforms into eye coordinates.

Note: This function explicitly initializes the given matrix. If you just want clutter to multiply a relative transformation with an existing matrix you can use clutter_actor_apply_relative_transformation_matrix() instead.

Parameters

ancestor

Type: ClutterActor

The ancestor actor whose coordinate space you want to transform to or NULL if you want to transform all the way to eye coordinates.

The argument can be NULL.
The data is owned by the caller of the method.
matrix

Type: graphene_matrix_t

A #graphene_matrix_t to store the transformation.

The argument will be set by the function.
The returned data is owned by the instance.