mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
Compare commits
3 Commits
new-affine
...
v0.8.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da5c66d735 | ||
|
|
c4b45a0917 | ||
|
|
8034073965 |
@@ -5,12 +5,6 @@
|
|||||||
* Full license can be found in the LICENSE file
|
* Full license can be found in the LICENSE file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
Functions:
|
|
||||||
CGLM_INLINE void glm_mul(mat4 m1, mat4 m2, mat4 dest);
|
|
||||||
CGLM_INLINE void glm_inv_tr(mat4 mat);
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef cglm_affine_post_h
|
#ifndef cglm_affine_post_h
|
||||||
#define cglm_affine_post_h
|
#define cglm_affine_post_h
|
||||||
|
|
||||||
@@ -40,6 +34,8 @@
|
|||||||
* @brief translate existing transform matrix by v vector
|
* @brief translate existing transform matrix by v vector
|
||||||
* and stores result in same matrix
|
* and stores result in same matrix
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in, out] m affine transfrom
|
* @param[in, out] m affine transfrom
|
||||||
* @param[in] v translate vector [x, y, z]
|
* @param[in] v translate vector [x, y, z]
|
||||||
*/
|
*/
|
||||||
@@ -55,6 +51,8 @@ glm_translated(mat4 m, vec3 v) {
|
|||||||
*
|
*
|
||||||
* source matrix will remain same
|
* source matrix will remain same
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in] m affine transfrom
|
* @param[in] m affine transfrom
|
||||||
* @param[in] v translate vector [x, y, z]
|
* @param[in] v translate vector [x, y, z]
|
||||||
* @param[out] dest translated matrix
|
* @param[out] dest translated matrix
|
||||||
@@ -69,6 +67,8 @@ glm_translated_to(mat4 m, vec3 v, mat4 dest) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief translate existing transform matrix by x factor
|
* @brief translate existing transform matrix by x factor
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in, out] m affine transfrom
|
* @param[in, out] m affine transfrom
|
||||||
* @param[in] x x factor
|
* @param[in] x x factor
|
||||||
*/
|
*/
|
||||||
@@ -81,6 +81,8 @@ glm_translated_x(mat4 m, float x) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief translate existing transform matrix by y factor
|
* @brief translate existing transform matrix by y factor
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in, out] m affine transfrom
|
* @param[in, out] m affine transfrom
|
||||||
* @param[in] y y factor
|
* @param[in] y y factor
|
||||||
*/
|
*/
|
||||||
@@ -93,6 +95,8 @@ glm_translated_y(mat4 m, float y) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief translate existing transform matrix by z factor
|
* @brief translate existing transform matrix by z factor
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in, out] m affine transfrom
|
* @param[in, out] m affine transfrom
|
||||||
* @param[in] z z factor
|
* @param[in] z z factor
|
||||||
*/
|
*/
|
||||||
@@ -106,6 +110,8 @@ glm_translated_z(mat4 m, float z) {
|
|||||||
* @brief rotate existing transform matrix around X axis by angle
|
* @brief rotate existing transform matrix around X axis by angle
|
||||||
* and store result in dest
|
* and store result in dest
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in] m affine transfrom
|
* @param[in] m affine transfrom
|
||||||
* @param[in] angle angle (radians)
|
* @param[in] angle angle (radians)
|
||||||
* @param[out] dest rotated matrix
|
* @param[out] dest rotated matrix
|
||||||
@@ -131,6 +137,8 @@ glm_rotated_x(mat4 m, float angle, mat4 dest) {
|
|||||||
* @brief rotate existing transform matrix around Y axis by angle
|
* @brief rotate existing transform matrix around Y axis by angle
|
||||||
* and store result in dest
|
* and store result in dest
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in] m affine transfrom
|
* @param[in] m affine transfrom
|
||||||
* @param[in] angle angle (radians)
|
* @param[in] angle angle (radians)
|
||||||
* @param[out] dest rotated matrix
|
* @param[out] dest rotated matrix
|
||||||
@@ -156,6 +164,8 @@ glm_rotated_y(mat4 m, float angle, mat4 dest) {
|
|||||||
* @brief rotate existing transform matrix around Z axis by angle
|
* @brief rotate existing transform matrix around Z axis by angle
|
||||||
* and store result in dest
|
* and store result in dest
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in] m affine transfrom
|
* @param[in] m affine transfrom
|
||||||
* @param[in] angle angle (radians)
|
* @param[in] angle angle (radians)
|
||||||
* @param[out] dest rotated matrix
|
* @param[out] dest rotated matrix
|
||||||
@@ -180,6 +190,8 @@ glm_rotated_z(mat4 m, float angle, mat4 dest) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief rotate existing transform matrix around given axis by angle
|
* @brief rotate existing transform matrix around given axis by angle
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in, out] m affine transfrom
|
* @param[in, out] m affine transfrom
|
||||||
* @param[in] angle angle (radians)
|
* @param[in] angle angle (radians)
|
||||||
* @param[in] axis axis
|
* @param[in] axis axis
|
||||||
@@ -196,6 +208,8 @@ glm_rotated(mat4 m, float angle, vec3 axis) {
|
|||||||
* @brief rotate existing transform
|
* @brief rotate existing transform
|
||||||
* around given axis by angle at given pivot point (rotation center)
|
* around given axis by angle at given pivot point (rotation center)
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in, out] m affine transfrom
|
* @param[in, out] m affine transfrom
|
||||||
* @param[in] pivot rotation center
|
* @param[in] pivot rotation center
|
||||||
* @param[in] angle angle (radians)
|
* @param[in] angle angle (radians)
|
||||||
@@ -216,6 +230,8 @@ glm_rotated_at(mat4 m, vec3 pivot, float angle, vec3 axis) {
|
|||||||
/*!
|
/*!
|
||||||
* @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
|
* @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
|
||||||
*
|
*
|
||||||
|
* this is POST transform, applies to existing transform as last transfrom
|
||||||
|
*
|
||||||
* @param[in, out] m affine transfrom
|
* @param[in, out] m affine transfrom
|
||||||
* @param[in] angle angle (radians)
|
* @param[in] angle angle (radians)
|
||||||
* @param[in] axis axis
|
* @param[in] axis axis
|
||||||
|
|||||||
@@ -5,12 +5,6 @@
|
|||||||
* Full license can be found in the LICENSE file
|
* Full license can be found in the LICENSE file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
Functions:
|
|
||||||
CGLM_INLINE void glm_mul(mat4 m1, mat4 m2, mat4 dest);
|
|
||||||
CGLM_INLINE void glm_inv_tr(mat4 mat);
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef cglm_affine_pre_h
|
#ifndef cglm_affine_pre_h
|
||||||
#define cglm_affine_pre_h
|
#define cglm_affine_pre_h
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user