|
Gama C Library
Gama C API Documentation
|
Defines structures and functions for 3D transformations (position, rotation, scale). More...
#include "position.h"Go to the source code of this file.
Data Structures | |
| struct | gm3Transform |
| Represents a 3D transformation, including position, rotation, and scale. More... | |
Functions | |
| void | gm3_pos_rotate (gm3Pos *res, const gm3Pos *rot) |
| Rotates a gm3Pos vector by the given Euler angles (X, Y, Z). | |
| void | gm3_transform_pos (gm3Pos *p, const gm3Transform *t) |
| Applies a gm3Transform to a gm3Pos vector. | |
| gm3Transform | gm3_transform () |
| Creates a new gm3Transform struct initialized to identity. | |
Variables | |
| const gm3Transform | gm3_default_transform |
| A default gm3Transform instance. | |
Defines structures and functions for 3D transformations (position, rotation, scale).
This file provides the gm3Transform structure to encapsulate the translation, rotation, and scaling of 3D objects, along with helper functions to apply these transformations to 3D points and vectors.
Rotates a gm3Pos vector by the given Euler angles (X, Y, Z).
The rotation is applied sequentially around the X, then Y, then Z axes.
| gm3Transform gm3_transform | ( | ) |
Creates a new gm3Transform struct initialized to identity.
The position and rotation are set to zero, and scale is set to one.
| void gm3_transform_pos | ( | gm3Pos * | p, |
| const gm3Transform * | t ) |
Applies a gm3Transform to a gm3Pos vector.
The transformation is applied in the order: scale, then rotate, then translate.
| p | A pointer to the gm3Pos vector to transform (modified in place). |
| t | A pointer to the gm3Transform to apply. |
| const gm3Transform gm3_default_transform |
A default gm3Transform instance.
Initializes a transform with default position {0, 0, 20}, no rotation, and uniform scale {1, 1, 1}.