Function
Coglgraphene_matrix_project_points_f3
Declaration [src]
void
cogl_graphene_matrix_project_points_f3 (
const graphene_matrix_t* matrix,
size_t stride_in,
void* points_in,
size_t stride_out,
void* points_out,
int n_points
)
Description [src]
Projects an array of input points and writes the result to another array of output points. The output points always have 4 components (known as homogeneous coordinates). The output array can simply point to the input array to do the transform in-place.
Here’s an example with differing input/output strides:
typedef struct {
float x,y, z;
uint8_t r,g,b,a;
float s,t,p;
} MyInVertex;
typedef struct {
uint8_t r,g,b,a;
float x,y,z;
} MyOutVertex;
MyInVertex vertices[N_VERTICES];
MyOutVertex results[N_VERTICES];
graphene_matrix_t matrix;
my_load_vertices (vertices);
my_get_matrix (&matrix);
cogl_graphene_matrix_project_points_f3 (&matrix,
sizeof (MyInVertex),
&vertices[0].x,
sizeof (MyOutVertex),
&results[0].x,
N_VERTICES);
Parameters
matrix
-
Type:
graphene_matrix_t
A projection matrix.
The data is owned by the caller of the function. stride_in
-
Type:
size_t
The stride in bytes between input points.
points_in
-
Type:
void*
A pointer to the first component of the first input point.
The argument can be NULL
.The data is owned by the caller of the function. stride_out
-
Type:
size_t
The stride in bytes between output points.
points_out
-
Type:
void*
A pointer to the first component of the first output point.
The argument can be NULL
.The data is owned by the caller of the function. n_points
-
Type:
int
The number of points to transform.