mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
Compare commits
21 Commits
new-affine
...
v0.8.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3894ea32fb | ||
|
|
a430408ec4 | ||
|
|
3815e18fea | ||
|
|
8b5eaa5301 | ||
|
|
6037618942 | ||
|
|
c6d198d780 | ||
|
|
d001593f9c | ||
|
|
ac9461778c | ||
|
|
0b3d227568 | ||
|
|
78236d24a1 | ||
|
|
b41858f184 | ||
|
|
60bf21ba43 | ||
|
|
2386cdcc19 | ||
|
|
a0f01c5ed1 | ||
|
|
8cfc98d283 | ||
|
|
074189163f | ||
|
|
bfbd9ba1dc | ||
|
|
89cee7912a | ||
|
|
da5c66d735 | ||
|
|
c4b45a0917 | ||
|
|
8034073965 |
@@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.8.2)
|
cmake_minimum_required(VERSION 3.8.2)
|
||||||
project(cglm
|
project(cglm
|
||||||
VERSION 0.8.6
|
VERSION 0.8.8
|
||||||
HOMEPAGE_URL https://github.com/recp/cglm
|
HOMEPAGE_URL https://github.com/recp/cglm
|
||||||
DESCRIPTION "OpenGL Mathematics (glm) for C"
|
DESCRIPTION "OpenGL Mathematics (glm) for C"
|
||||||
LANGUAGES C
|
LANGUAGES C
|
||||||
@@ -159,5 +159,5 @@ install(EXPORT ${PROJECT_NAME}
|
|||||||
|
|
||||||
configure_file(cglm.pc.in cglm.pc @ONLY)
|
configure_file(cglm.pc.in cglm.pc @ONLY)
|
||||||
|
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/cglm.pc
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cglm.pc
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ cglm_HEADERS = include/cglm/version.h \
|
|||||||
include/cglm/mat4.h \
|
include/cglm/mat4.h \
|
||||||
include/cglm/mat3.h \
|
include/cglm/mat3.h \
|
||||||
include/cglm/mat2.h \
|
include/cglm/mat2.h \
|
||||||
|
include/cglm/affine-pre.h \
|
||||||
|
include/cglm/affine-post.h \
|
||||||
include/cglm/affine.h \
|
include/cglm/affine.h \
|
||||||
include/cglm/affine-mat.h \
|
include/cglm/affine-mat.h \
|
||||||
include/cglm/vec2.h \
|
include/cglm/vec2.h \
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Pod::Spec.new do |s|
|
|||||||
|
|
||||||
# Description
|
# Description
|
||||||
s.name = "cglm"
|
s.name = "cglm"
|
||||||
s.version = "0.8.4"
|
s.version = "0.8.7"
|
||||||
s.summary = "📽 Highly Optimized Graphics Math (glm) for C"
|
s.summary = "📽 Highly Optimized Graphics Math (glm) for C"
|
||||||
s.description = <<-DESC
|
s.description = <<-DESC
|
||||||
cglm is math library for graphics programming for C. See the documentation or README for all features.
|
cglm is math library for graphics programming for C. See the documentation or README for all features.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
|
|
||||||
AC_PREREQ([2.69])
|
AC_PREREQ([2.69])
|
||||||
AC_INIT([cglm], [0.8.6], [info@recp.me])
|
AC_INIT([cglm], [0.8.8], [info@recp.me])
|
||||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects serial-tests])
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects serial-tests])
|
||||||
|
|
||||||
# Don't use the default cflags (-O2 -g), we set ours manually in Makefile.am.
|
# Don't use the default cflags (-O2 -g), we set ours manually in Makefile.am.
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ author = u'Recep Aslantas'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = u'0.8.6'
|
version = u'0.8.8'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = u'0.8.6'
|
release = u'0.8.8'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ Functions:
|
|||||||
#. :c:func:`glm_ivec2_maxv`
|
#. :c:func:`glm_ivec2_maxv`
|
||||||
#. :c:func:`glm_ivec2_minv`
|
#. :c:func:`glm_ivec2_minv`
|
||||||
#. :c:func:`glm_ivec2_clamp`
|
#. :c:func:`glm_ivec2_clamp`
|
||||||
|
#. :c:func:`glm_ivec2_abs`
|
||||||
|
|
||||||
Functions documentation
|
Functions documentation
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@@ -161,3 +162,11 @@ Functions documentation
|
|||||||
| *[in, out]* **v** vector
|
| *[in, out]* **v** vector
|
||||||
| *[in]* **minVal** minimum value
|
| *[in]* **minVal** minimum value
|
||||||
| *[in]* **maxVal** maximum value
|
| *[in]* **maxVal** maximum value
|
||||||
|
|
||||||
|
.. c:function:: void glm_ivec2_abs(ivec2 v, ivec2 dest)
|
||||||
|
|
||||||
|
absolute value of each vector item
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
| *[out]* **dest** destination vector
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ Functions:
|
|||||||
#. :c:func:`glm_ivec3_maxv`
|
#. :c:func:`glm_ivec3_maxv`
|
||||||
#. :c:func:`glm_ivec3_minv`
|
#. :c:func:`glm_ivec3_minv`
|
||||||
#. :c:func:`glm_ivec3_clamp`
|
#. :c:func:`glm_ivec3_clamp`
|
||||||
|
#. :c:func:`glm_ivec2_abs`
|
||||||
|
|
||||||
Functions documentation
|
Functions documentation
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@@ -161,3 +162,11 @@ Functions documentation
|
|||||||
| *[in, out]* **v** vector
|
| *[in, out]* **v** vector
|
||||||
| *[in]* **minVal** minimum value
|
| *[in]* **minVal** minimum value
|
||||||
| *[in]* **maxVal** maximum value
|
| *[in]* **maxVal** maximum value
|
||||||
|
|
||||||
|
.. c:function:: void glm_ivec3_abs(ivec3 v, ivec3 dest)
|
||||||
|
|
||||||
|
absolute value of each vector item
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
| *[out]* **dest** destination vector
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ Functions:
|
|||||||
#. :c:func:`glm_ivec4_maxv`
|
#. :c:func:`glm_ivec4_maxv`
|
||||||
#. :c:func:`glm_ivec4_minv`
|
#. :c:func:`glm_ivec4_minv`
|
||||||
#. :c:func:`glm_ivec4_clamp`
|
#. :c:func:`glm_ivec4_clamp`
|
||||||
|
#. :c:func:`glm_ivec4_abs`
|
||||||
|
|
||||||
Functions documentation
|
Functions documentation
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@@ -161,3 +162,11 @@ Functions documentation
|
|||||||
| *[in, out]* **v** vector
|
| *[in, out]* **v** vector
|
||||||
| *[in]* **minVal** minimum value
|
| *[in]* **minVal** minimum value
|
||||||
| *[in]* **maxVal** maximum value
|
| *[in]* **maxVal** maximum value
|
||||||
|
|
||||||
|
.. c:function:: void glm_ivec4_abs(ivec4 v, ivec4 dest)
|
||||||
|
|
||||||
|
absolute value of each vector item
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
| *[out]* **dest** destination vector
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ Functions:
|
|||||||
#. :c:func:`glm_vec2_isinf`
|
#. :c:func:`glm_vec2_isinf`
|
||||||
#. :c:func:`glm_vec2_isvalid`
|
#. :c:func:`glm_vec2_isvalid`
|
||||||
#. :c:func:`glm_vec2_sign`
|
#. :c:func:`glm_vec2_sign`
|
||||||
|
#. :c:func:`glm_vec2_abs`
|
||||||
#. :c:func:`glm_vec2_sqrt`
|
#. :c:func:`glm_vec2_sqrt`
|
||||||
|
|
||||||
Functions documentation
|
Functions documentation
|
||||||
@@ -125,6 +126,14 @@ Functions documentation
|
|||||||
| *[in]* **v** vector
|
| *[in]* **v** vector
|
||||||
| *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
|
| *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
|
||||||
|
|
||||||
|
.. c:function:: void glm_vec2_abs(vec2 v, vec2 dest)
|
||||||
|
|
||||||
|
absolute value of each vector item
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
| *[out]* **dest** destination vector
|
||||||
|
|
||||||
.. c:function:: void glm_vec2_sqrt(vec2 v, vec2 dest)
|
.. c:function:: void glm_vec2_sqrt(vec2 v, vec2 dest)
|
||||||
|
|
||||||
square root of each vector item
|
square root of each vector item
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ Functions:
|
|||||||
#. :c:func:`glm_vec3_isinf`
|
#. :c:func:`glm_vec3_isinf`
|
||||||
#. :c:func:`glm_vec3_isvalid`
|
#. :c:func:`glm_vec3_isvalid`
|
||||||
#. :c:func:`glm_vec3_sign`
|
#. :c:func:`glm_vec3_sign`
|
||||||
|
#. :c:func:`glm_vec3_abs`
|
||||||
#. :c:func:`glm_vec3_sqrt`
|
#. :c:func:`glm_vec3_sqrt`
|
||||||
|
|
||||||
Functions documentation
|
Functions documentation
|
||||||
@@ -134,6 +135,14 @@ Functions documentation
|
|||||||
| *[in]* **v** vector
|
| *[in]* **v** vector
|
||||||
| *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
|
| *[out]* **dest** sign vector (only keeps signs as -1, 0, -1)
|
||||||
|
|
||||||
|
.. c:function:: void glm_vec3_abs(vec3 v, vec3 dest)
|
||||||
|
|
||||||
|
absolute value of each vector item
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
| *[in]* **v** vector
|
||||||
|
| *[out]* **dest** destination vector
|
||||||
|
|
||||||
.. c:function:: void glm_vec3_sqrt(vec3 v, vec3 dest)
|
.. c:function:: void glm_vec3_sqrt(vec3 v, vec3 dest)
|
||||||
|
|
||||||
square root of each vector item
|
square root of each vector item
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ CGLM_EXPORT
|
|||||||
void
|
void
|
||||||
glmc_ivec2_clamp(ivec2 v, int minVal, int maxVal);
|
glmc_ivec2_clamp(ivec2 v, int minVal, int maxVal);
|
||||||
|
|
||||||
|
CGLM_EXPORT
|
||||||
|
void
|
||||||
|
glmc_ivec2_abs(ivec2 v, ivec2 dest);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ CGLM_EXPORT
|
|||||||
void
|
void
|
||||||
glmc_ivec3_clamp(ivec3 v, int minVal, int maxVal);
|
glmc_ivec3_clamp(ivec3 v, int minVal, int maxVal);
|
||||||
|
|
||||||
|
CGLM_EXPORT
|
||||||
|
void
|
||||||
|
glmc_ivec3_abs(ivec3 v, ivec3 dest);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ CGLM_EXPORT
|
|||||||
void
|
void
|
||||||
glmc_ivec4_clamp(ivec4 v, int minVal, int maxVal);
|
glmc_ivec4_clamp(ivec4 v, int minVal, int maxVal);
|
||||||
|
|
||||||
|
CGLM_EXPORT
|
||||||
|
void
|
||||||
|
glmc_ivec4_abs(ivec4 v, ivec4 dest);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -145,6 +145,10 @@ CGLM_EXPORT
|
|||||||
void
|
void
|
||||||
glmc_vec2_clamp(vec2 v, float minval, float maxval);
|
glmc_vec2_clamp(vec2 v, float minval, float maxval);
|
||||||
|
|
||||||
|
CGLM_EXPORT
|
||||||
|
void
|
||||||
|
glmc_vec2_abs(vec2 v, vec2 dest);
|
||||||
|
|
||||||
CGLM_EXPORT
|
CGLM_EXPORT
|
||||||
void
|
void
|
||||||
glmc_vec2_lerp(vec2 from, vec2 to, float t, vec2 dest);
|
glmc_vec2_lerp(vec2 from, vec2 to, float t, vec2 dest);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ FUNCTIONS:
|
|||||||
CGLM_INLINE void glm_ivec2_maxv(ivec2 a, ivec2 b, ivec2 dest)
|
CGLM_INLINE void glm_ivec2_maxv(ivec2 a, ivec2 b, ivec2 dest)
|
||||||
CGLM_INLINE void glm_ivec2_minv(ivec2 a, ivec2 b, ivec2 dest)
|
CGLM_INLINE void glm_ivec2_minv(ivec2 a, ivec2 b, ivec2 dest)
|
||||||
CGLM_INLINE void glm_ivec2_clamp(ivec2 v, int minVal, int maxVal)
|
CGLM_INLINE void glm_ivec2_clamp(ivec2 v, int minVal, int maxVal)
|
||||||
|
CGLM_INLINE void glm_ivec2_abs(ivec2 v, ivec2 dest)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef cglm_ivec2_h
|
#ifndef cglm_ivec2_h
|
||||||
@@ -239,4 +240,17 @@ glm_ivec2_clamp(ivec2 v, int minVal, int maxVal) {
|
|||||||
v[1] = maxVal;
|
v[1] = maxVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief absolute value of v
|
||||||
|
*
|
||||||
|
* @param[in] v vector
|
||||||
|
* @param[out] dest destination
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
void
|
||||||
|
glm_ivec2_abs(ivec2 v, ivec2 dest) {
|
||||||
|
dest[0] = abs(v[0]);
|
||||||
|
dest[1] = abs(v[1]);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* cglm_ivec2_h */
|
#endif /* cglm_ivec2_h */
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ FUNCTIONS:
|
|||||||
CGLM_INLINE void glm_ivec3_maxv(ivec3 a, ivec3 b, ivec3 dest)
|
CGLM_INLINE void glm_ivec3_maxv(ivec3 a, ivec3 b, ivec3 dest)
|
||||||
CGLM_INLINE void glm_ivec3_minv(ivec3 a, ivec3 b, ivec3 dest)
|
CGLM_INLINE void glm_ivec3_minv(ivec3 a, ivec3 b, ivec3 dest)
|
||||||
CGLM_INLINE void glm_ivec3_clamp(ivec3 v, int minVal, int maxVal)
|
CGLM_INLINE void glm_ivec3_clamp(ivec3 v, int minVal, int maxVal)
|
||||||
|
CGLM_INLINE void glm_ivec3_abs(ivec3 v, ivec3 dest)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef cglm_ivec3_h
|
#ifndef cglm_ivec3_h
|
||||||
@@ -255,4 +256,18 @@ glm_ivec3_clamp(ivec3 v, int minVal, int maxVal) {
|
|||||||
v[2] = maxVal;
|
v[2] = maxVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief absolute value of v
|
||||||
|
*
|
||||||
|
* @param[in] v vector
|
||||||
|
* @param[out] dest destination
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
void
|
||||||
|
glm_ivec3_abs(ivec3 v, ivec3 dest) {
|
||||||
|
dest[0] = abs(v[0]);
|
||||||
|
dest[1] = abs(v[1]);
|
||||||
|
dest[2] = abs(v[2]);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* cglm_ivec3_h */
|
#endif /* cglm_ivec3_h */
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ FUNCTIONS:
|
|||||||
CGLM_INLINE void glm_ivec4_maxv(ivec4 a, ivec4 b, ivec4 dest)
|
CGLM_INLINE void glm_ivec4_maxv(ivec4 a, ivec4 b, ivec4 dest)
|
||||||
CGLM_INLINE void glm_ivec4_minv(ivec4 a, ivec4 b, ivec4 dest)
|
CGLM_INLINE void glm_ivec4_minv(ivec4 a, ivec4 b, ivec4 dest)
|
||||||
CGLM_INLINE void glm_ivec4_clamp(ivec4 v, int minVal, int maxVal)
|
CGLM_INLINE void glm_ivec4_clamp(ivec4 v, int minVal, int maxVal)
|
||||||
|
CGLM_INLINE void glm_ivec4_abs(ivec4 v, ivec4 dest)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef cglm_ivec4_h
|
#ifndef cglm_ivec4_h
|
||||||
@@ -272,4 +273,19 @@ glm_ivec4_clamp(ivec4 v, int minVal, int maxVal) {
|
|||||||
v[3] = maxVal;
|
v[3] = maxVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief absolute value of v
|
||||||
|
*
|
||||||
|
* @param[in] v vector
|
||||||
|
* @param[out] dest destination
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
void
|
||||||
|
glm_ivec4_abs(ivec4 v, ivec4 dest) {
|
||||||
|
dest[0] = abs(v[0]);
|
||||||
|
dest[1] = abs(v[1]);
|
||||||
|
dest[2] = abs(v[2]);
|
||||||
|
dest[3] = abs(v[3]);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* cglm_ivec4_h */
|
#endif /* cglm_ivec4_h */
|
||||||
|
|||||||
184
include/cglm/struct/affine-post.h
Normal file
184
include/cglm/struct/affine-post.h
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c), Recep Aslantas.
|
||||||
|
*
|
||||||
|
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||||
|
* Full license can be found in the LICENSE file
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Functions:
|
||||||
|
CGLM_INLINE mat4s glms_translated(mat4s m, vec3s v);
|
||||||
|
CGLM_INLINE mat4s glms_translated_x(mat4s m, float x);
|
||||||
|
CGLM_INLINE mat4s glms_translated_y(mat4s m, float y);
|
||||||
|
CGLM_INLINE mat4s glms_translated_z(mat4s m, float z);
|
||||||
|
CGLM_INLINE mat4s glms_rotated_x(mat4s m, float angle);
|
||||||
|
CGLM_INLINE mat4s glms_rotated_y(mat4s m, float angle);
|
||||||
|
CGLM_INLINE mat4s glms_rotated_z(mat4s m, float angle);
|
||||||
|
CGLM_INLINE mat4s glms_rotated(mat4s m, float angle, vec3s axis);
|
||||||
|
CGLM_INLINE mat4s glms_rotated_at(mat4s m, vec3s pivot, float angle, vec3s axis);
|
||||||
|
CGLM_INLINE mat4s glms_spinned(mat4s m, float angle, vec3s axis);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef cglms_affines_post_h
|
||||||
|
#define cglms_affines_post_h
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
|
#include "../types-struct.h"
|
||||||
|
#include "../affine.h"
|
||||||
|
#include "vec3.h"
|
||||||
|
#include "vec4.h"
|
||||||
|
#include "mat4.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief translate existing transform matrix by v vector
|
||||||
|
* and stores result in same matrix
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] v translate vector [x, y, z]
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_translated(mat4s m, vec3s v) {
|
||||||
|
glm_translated(m.raw, v.raw);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief translate existing transform matrix by x factor
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] x x factor
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_translated_x(mat4s m, float x) {
|
||||||
|
glm_translated_x(m.raw, x);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief translate existing transform matrix by y factor
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] y y factor
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_translated_y(mat4s m, float y) {
|
||||||
|
glm_translated_y(m.raw, y);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief translate existing transform matrix by z factor
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] z z factor
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_translated_z(mat4s m, float z) {
|
||||||
|
glm_translated_z(m.raw, z);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around X axis by angle
|
||||||
|
* and store result in dest
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @returns rotated matrix
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotated_x(mat4s m, float angle) {
|
||||||
|
mat4s r;
|
||||||
|
glm_rotated_x(m.raw, angle, r.raw);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around Y axis by angle
|
||||||
|
* and store result in dest
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @returns rotated matrix
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotated_y(mat4s m, float angle) {
|
||||||
|
mat4s r;
|
||||||
|
glm_rotated_y(m.raw, angle, r.raw);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around Z axis by angle
|
||||||
|
* and store result in dest
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @returns rotated matrix
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotated_z(mat4s m, float angle) {
|
||||||
|
mat4s r;
|
||||||
|
glm_rotated_z(m.raw, angle, r.raw);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around given axis by angle
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @param[in] axis axis
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotated(mat4s m, float angle, vec3s axis) {
|
||||||
|
glm_rotated(m.raw, angle, axis.raw);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform
|
||||||
|
* around given axis by angle at given pivot point (rotation center)
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] pivot rotation center
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @param[in] axis axis
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotated_at(mat4s m, vec3s pivot, float angle, vec3s axis) {
|
||||||
|
glm_rotated_at(m.raw, pivot.raw, angle, axis.raw);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @param[in] axis axis
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_spinned(mat4s m, float angle, vec3s axis) {
|
||||||
|
glm_spinned(m.raw, angle, axis.raw);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* cglms_affines_post_h */
|
||||||
184
include/cglm/struct/affine-pre.h
Normal file
184
include/cglm/struct/affine-pre.h
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c), Recep Aslantas.
|
||||||
|
*
|
||||||
|
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||||
|
* Full license can be found in the LICENSE file
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Functions:
|
||||||
|
CGLM_INLINE mat4s glms_translate(mat4s m, vec3s v);
|
||||||
|
CGLM_INLINE mat4s glms_translate_x(mat4s m, float x);
|
||||||
|
CGLM_INLINE mat4s glms_translate_y(mat4s m, float y);
|
||||||
|
CGLM_INLINE mat4s glms_translate_z(mat4s m, float z);
|
||||||
|
CGLM_INLINE mat4s glms_rotate_x(mat4s m, float angle);
|
||||||
|
CGLM_INLINE mat4s glms_rotate_y(mat4s m, float angle);
|
||||||
|
CGLM_INLINE mat4s glms_rotate_z(mat4s m, float angle);
|
||||||
|
CGLM_INLINE mat4s glms_rotate(mat4s m, float angle, vec3s axis);
|
||||||
|
CGLM_INLINE mat4s glms_rotate_at(mat4s m, vec3s pivot, float angle, vec3s axis);
|
||||||
|
CGLM_INLINE mat4s glms_spin(mat4s m, float angle, vec3s axis);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef cglms_affines_pre_h
|
||||||
|
#define cglms_affines_pre_h
|
||||||
|
|
||||||
|
#include "../common.h"
|
||||||
|
#include "../types-struct.h"
|
||||||
|
#include "../affine.h"
|
||||||
|
#include "vec3.h"
|
||||||
|
#include "vec4.h"
|
||||||
|
#include "mat4.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief translate existing transform matrix by v vector
|
||||||
|
* and stores result in same matrix
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] v translate vector [x, y, z]
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_translate(mat4s m, vec3s v) {
|
||||||
|
glm_translate(m.raw, v.raw);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief translate existing transform matrix by x factor
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] x x factor
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_translate_x(mat4s m, float x) {
|
||||||
|
glm_translate_x(m.raw, x);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief translate existing transform matrix by y factor
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] y y factor
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_translate_y(mat4s m, float y) {
|
||||||
|
glm_translate_y(m.raw, y);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief translate existing transform matrix by z factor
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] z z factor
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_translate_z(mat4s m, float z) {
|
||||||
|
glm_translate_z(m.raw, z);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around X axis by angle
|
||||||
|
* and store result in dest
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @returns rotated matrix
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotate_x(mat4s m, float angle) {
|
||||||
|
mat4s r;
|
||||||
|
glm_rotate_x(m.raw, angle, r.raw);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around Y axis by angle
|
||||||
|
* and store result in dest
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @returns rotated matrix
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotate_y(mat4s m, float angle) {
|
||||||
|
mat4s r;
|
||||||
|
glm_rotate_y(m.raw, angle, r.raw);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around Z axis by angle
|
||||||
|
* and store result in dest
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @returns rotated matrix
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotate_z(mat4s m, float angle) {
|
||||||
|
mat4s r;
|
||||||
|
glm_rotate_z(m.raw, angle, r.raw);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around given axis by angle
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @param[in] axis axis
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotate(mat4s m, float angle, vec3s axis) {
|
||||||
|
glm_rotate(m.raw, angle, axis.raw);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform
|
||||||
|
* around given axis by angle at given pivot point (rotation center)
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] pivot rotation center
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @param[in] axis axis
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_rotate_at(mat4s m, vec3s pivot, float angle, vec3s axis) {
|
||||||
|
glm_rotate_at(m.raw, pivot.raw, angle, axis.raw);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
|
||||||
|
*
|
||||||
|
* @param[in] m affine transfrom
|
||||||
|
* @param[in] angle angle (radians)
|
||||||
|
* @param[in] axis axis
|
||||||
|
* @returns affine transfrom
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
mat4s
|
||||||
|
glms_spin(mat4s m, float angle, vec3s axis) {
|
||||||
|
glm_spin(m.raw, angle, axis.raw);
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* cglms_affines_pre_h */
|
||||||
@@ -40,63 +40,6 @@
|
|||||||
#include "vec4.h"
|
#include "vec4.h"
|
||||||
#include "mat4.h"
|
#include "mat4.h"
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief translate existing transform matrix by v vector
|
|
||||||
* and stores result in same matrix
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] v translate vector [x, y, z]
|
|
||||||
* @returns affine transfrom
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_translate(mat4s m, vec3s v) {
|
|
||||||
glm_translate(m.raw, v.raw);
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief translate existing transform matrix by x factor
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] x x factor
|
|
||||||
* @returns affine transfrom
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_translate_x(mat4s m, float x) {
|
|
||||||
glm_translate_x(m.raw, x);
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief translate existing transform matrix by y factor
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] y y factor
|
|
||||||
* @returns affine transfrom
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_translate_y(mat4s m, float y) {
|
|
||||||
glm_translate_y(m.raw, y);
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief translate existing transform matrix by z factor
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] z z factor
|
|
||||||
* @returns affine transfrom
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_translate_z(mat4s m, float z) {
|
|
||||||
glm_translate_z(m.raw, z);
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief creates NEW translate transform matrix by v vector
|
* @brief creates NEW translate transform matrix by v vector
|
||||||
*
|
*
|
||||||
@@ -156,54 +99,6 @@ glms_scale_uni(mat4s m, float s) {
|
|||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief rotate existing transform matrix around X axis by angle
|
|
||||||
* and store result in dest
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] angle angle (radians)
|
|
||||||
* @returns rotated matrix
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_rotate_x(mat4s m, float angle) {
|
|
||||||
mat4s r;
|
|
||||||
glm_rotate_x(m.raw, angle, r.raw);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief rotate existing transform matrix around Y axis by angle
|
|
||||||
* and store result in dest
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] angle angle (radians)
|
|
||||||
* @returns rotated matrix
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_rotate_y(mat4s m, float angle) {
|
|
||||||
mat4s r;
|
|
||||||
glm_rotate_y(m.raw, angle, r.raw);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief rotate existing transform matrix around Z axis by angle
|
|
||||||
* and store result in dest
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] angle angle (radians)
|
|
||||||
* @returns rotated matrix
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_rotate_z(mat4s m, float angle) {
|
|
||||||
mat4s r;
|
|
||||||
glm_rotate_z(m.raw, angle, r.raw);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief creates NEW rotation matrix by angle and axis
|
* @brief creates NEW rotation matrix by angle and axis
|
||||||
*
|
*
|
||||||
@@ -221,38 +116,6 @@ glms_rotate_make(float angle, vec3s axis) {
|
|||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief rotate existing transform matrix around given axis by angle
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] angle angle (radians)
|
|
||||||
* @param[in] axis axis
|
|
||||||
* @returns affine transfrom
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_rotate(mat4s m, float angle, vec3s axis) {
|
|
||||||
glm_rotate(m.raw, angle, axis.raw);
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief rotate existing transform
|
|
||||||
* around given axis by angle at given pivot point (rotation center)
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] pivot rotation center
|
|
||||||
* @param[in] angle angle (radians)
|
|
||||||
* @param[in] axis axis
|
|
||||||
* @returns affine transfrom
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_rotate_at(mat4s m, vec3s pivot, float angle, vec3s axis) {
|
|
||||||
glm_rotate_at(m.raw, pivot.raw, angle, axis.raw);
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief creates NEW rotation matrix by angle and axis at given point
|
* @brief creates NEW rotation matrix by angle and axis at given point
|
||||||
*
|
*
|
||||||
@@ -274,21 +137,6 @@ glms_rotate_atm(mat4s m, vec3s pivot, float angle, vec3s axis) {
|
|||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
* @brief rotate existing transform matrix around given axis by angle around self (doesn't affected by position)
|
|
||||||
*
|
|
||||||
* @param[in] m affine transfrom
|
|
||||||
* @param[in] angle angle (radians)
|
|
||||||
* @param[in] axis axis
|
|
||||||
* @returns affine transfrom
|
|
||||||
*/
|
|
||||||
CGLM_INLINE
|
|
||||||
mat4s
|
|
||||||
glms_spin(mat4s m, float angle, vec3s axis) {
|
|
||||||
glm_spin(m.raw, angle, axis.raw);
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief decompose scale vector
|
* @brief decompose scale vector
|
||||||
*
|
*
|
||||||
@@ -346,4 +194,7 @@ glms_decompose(mat4s m, vec4s * __restrict t, mat4s * __restrict r, vec3s * __re
|
|||||||
glm_decompose(m.raw, t->raw, r->raw, s->raw);
|
glm_decompose(m.raw, t->raw, r->raw, s->raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "affine-pre.h"
|
||||||
|
#include "affine-post.h"
|
||||||
|
|
||||||
#endif /* cglms_affines_h */
|
#endif /* cglms_affines_h */
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
CGLM_INLINE bool glm_vec2_isinf(vec2 v);
|
CGLM_INLINE bool glm_vec2_isinf(vec2 v);
|
||||||
CGLM_INLINE bool glm_vec2_isvalid(vec2 v);
|
CGLM_INLINE bool glm_vec2_isvalid(vec2 v);
|
||||||
CGLM_INLINE void glm_vec2_sign(vec2 v, vec2 dest);
|
CGLM_INLINE void glm_vec2_sign(vec2 v, vec2 dest);
|
||||||
|
CGLM_INLINE void glm_vec2_abs(vec2 v, vec2 dest);
|
||||||
CGLM_INLINE void glm_vec2_sqrt(vec2 v, vec2 dest);
|
CGLM_INLINE void glm_vec2_sqrt(vec2 v, vec2 dest);
|
||||||
CGLM_INLINE void glm_vec2_complex_mul(vec2 a, vec2 b, vec2 dest)
|
CGLM_INLINE void glm_vec2_complex_mul(vec2 a, vec2 b, vec2 dest)
|
||||||
CGLM_INLINE void glm_vec2_complex_div(vec2 a, vec2 b, vec2 dest)
|
CGLM_INLINE void glm_vec2_complex_div(vec2 a, vec2 b, vec2 dest)
|
||||||
@@ -176,6 +177,19 @@ glm_vec2_sign(vec2 v, vec2 dest) {
|
|||||||
dest[1] = glm_signf(v[1]);
|
dest[1] = glm_signf(v[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief absolute value of v
|
||||||
|
*
|
||||||
|
* @param[in] v vector
|
||||||
|
* @param[out] dest destination
|
||||||
|
*/
|
||||||
|
CGLM_INLINE
|
||||||
|
void
|
||||||
|
glm_vec2_abs(vec2 v, vec2 dest) {
|
||||||
|
dest[0] = fabsf(v[0]);
|
||||||
|
dest[1] = fabsf(v[1]);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief square root of each vector item
|
* @brief square root of each vector item
|
||||||
*
|
*
|
||||||
@@ -237,5 +251,4 @@ glm_vec2_complex_conjugate(vec2 a, vec2 dest) {
|
|||||||
dest[1] = -a[1];
|
dest[1] = -a[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* cglm_vec2_ext_h */
|
#endif /* cglm_vec2_ext_h */
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
#define CGLM_VERSION_MAJOR 0
|
#define CGLM_VERSION_MAJOR 0
|
||||||
#define CGLM_VERSION_MINOR 8
|
#define CGLM_VERSION_MINOR 8
|
||||||
#define CGLM_VERSION_PATCH 6
|
#define CGLM_VERSION_PATCH 8
|
||||||
|
|
||||||
#endif /* cglm_version_h */
|
#endif /* cglm_version_h */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
project('cglm', 'c',
|
project('cglm', 'c',
|
||||||
version : '0.8.6',
|
version : '0.8.8',
|
||||||
license : 'mit',
|
license : 'mit',
|
||||||
default_options : [
|
default_options : [
|
||||||
'c_std=c11',
|
'c_std=c11',
|
||||||
|
|||||||
@@ -97,3 +97,10 @@ void
|
|||||||
glmc_ivec2_clamp(ivec2 v, int minVal, int maxVal) {
|
glmc_ivec2_clamp(ivec2 v, int minVal, int maxVal) {
|
||||||
glm_ivec2_clamp(v, minVal, maxVal);
|
glm_ivec2_clamp(v, minVal, maxVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGLM_EXPORT
|
||||||
|
void
|
||||||
|
glmc_ivec2_abs(ivec2 v, ivec2 dest) {
|
||||||
|
glm_ivec2_abs(v, dest);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,3 +97,10 @@ void
|
|||||||
glmc_ivec3_clamp(ivec3 v, int minVal, int maxVal) {
|
glmc_ivec3_clamp(ivec3 v, int minVal, int maxVal) {
|
||||||
glm_ivec3_clamp(v, minVal, maxVal);
|
glm_ivec3_clamp(v, minVal, maxVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGLM_EXPORT
|
||||||
|
void
|
||||||
|
glmc_ivec3_abs(ivec3 v, ivec3 dest) {
|
||||||
|
glm_ivec3_abs(v, dest);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,3 +97,10 @@ void
|
|||||||
glmc_ivec4_clamp(ivec4 v, int minVal, int maxVal) {
|
glmc_ivec4_clamp(ivec4 v, int minVal, int maxVal) {
|
||||||
glm_ivec4_clamp(v, minVal, maxVal);
|
glm_ivec4_clamp(v, minVal, maxVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGLM_EXPORT
|
||||||
|
void
|
||||||
|
glmc_ivec4_abs(ivec4 v, ivec4 dest) {
|
||||||
|
glm_ivec4_abs(v, dest);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -206,6 +206,12 @@ glmc_vec2_clamp(vec2 v, float minval, float maxval) {
|
|||||||
glm_vec2_clamp(v, minval, maxval);
|
glm_vec2_clamp(v, minval, maxval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGLM_EXPORT
|
||||||
|
void
|
||||||
|
glmc_vec2_abs(vec2 v, vec2 dest) {
|
||||||
|
glm_vec2_abs(v, dest);
|
||||||
|
}
|
||||||
|
|
||||||
CGLM_EXPORT
|
CGLM_EXPORT
|
||||||
void
|
void
|
||||||
glmc_vec2_lerp(vec2 from, vec2 to, float t, vec2 dest) {
|
glmc_vec2_lerp(vec2 from, vec2 to, float t, vec2 dest) {
|
||||||
|
|||||||
@@ -11,21 +11,21 @@ TEST_IMPL(clamp) {
|
|||||||
vec3 v3 = {15.07f, 0.4f, 17.3f};
|
vec3 v3 = {15.07f, 0.4f, 17.3f};
|
||||||
vec4 v4 = {5.07f, 2.3f, 1.3f, 1.4f};
|
vec4 v4 = {5.07f, 2.3f, 1.3f, 1.4f};
|
||||||
|
|
||||||
ASSERT(glm_clamp(1.6f, 0.0f, 1.0f) == 1.0f)
|
ASSERT(glm_eq(glm_clamp(1.6f, 0.0f, 1.0f), 1.0f))
|
||||||
ASSERT(glm_clamp(-1.6f, 0.0f, 1.0f) == 0.0f)
|
ASSERT(glm_eq(glm_clamp(-1.6f, 0.0f, 1.0f), 0.0f))
|
||||||
ASSERT(glm_clamp(0.6f, 0.0f, 1.0f) == 0.6f)
|
ASSERT(glm_eq(glm_clamp(0.6f, 0.0f, 1.0f), 0.6f))
|
||||||
|
|
||||||
glm_vec3_clamp(v3, 0.0, 1.0);
|
glm_vec3_clamp(v3, 0.0, 1.0);
|
||||||
glm_vec4_clamp(v4, 1.5, 3.0);
|
glm_vec4_clamp(v4, 1.5, 3.0);
|
||||||
|
|
||||||
ASSERT(v3[0] == 1.0f)
|
ASSERT(glm_eq(v3[0], 1.0f))
|
||||||
ASSERT(v3[1] == 0.4f)
|
ASSERT(glm_eq(v3[1], 0.4f))
|
||||||
ASSERT(v3[2] == 1.0f)
|
ASSERT(glm_eq(v3[2], 1.0f))
|
||||||
|
|
||||||
ASSERT(v4[0] == 3.0f)
|
ASSERT(glm_eq(v4[0], 3.0f))
|
||||||
ASSERT(v4[1] == 2.3f)
|
ASSERT(glm_eq(v4[1], 2.3f))
|
||||||
ASSERT(v4[2] == 1.5f)
|
ASSERT(glm_eq(v4[2], 1.5f))
|
||||||
ASSERT(v4[3] == 1.5f)
|
ASSERT(glm_eq(v4[3], 1.5f))
|
||||||
|
|
||||||
TEST_SUCCESS
|
TEST_SUCCESS
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,3 +187,18 @@ TEST_IMPL(GLM_PREFIX, ivec2_clamp) {
|
|||||||
|
|
||||||
TEST_SUCCESS
|
TEST_SUCCESS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_IMPL(GLM_PREFIX, ivec2_abs) {
|
||||||
|
ivec2 v1 = {2, -3}, v2 = {-12, -31};
|
||||||
|
ivec2 v3, v4;
|
||||||
|
|
||||||
|
GLM(ivec2_abs)(v1, v3);
|
||||||
|
GLM(ivec2_abs)(v2, v4);
|
||||||
|
|
||||||
|
ASSERT(v3[0] == 2)
|
||||||
|
ASSERT(v3[1] == 3)
|
||||||
|
ASSERT(v4[0] == 12)
|
||||||
|
ASSERT(v4[1] == 31)
|
||||||
|
|
||||||
|
TEST_SUCCESS
|
||||||
|
}
|
||||||
|
|||||||
@@ -197,3 +197,20 @@ TEST_IMPL(GLM_PREFIX, ivec3_clamp) {
|
|||||||
|
|
||||||
TEST_SUCCESS
|
TEST_SUCCESS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_IMPL(GLM_PREFIX, ivec3_abs) {
|
||||||
|
ivec3 v1 = {2, -3, 4}, v2 = {-12, -31, -42};
|
||||||
|
ivec3 v3, v4;
|
||||||
|
|
||||||
|
GLM(ivec3_abs)(v1, v3);
|
||||||
|
GLM(ivec3_abs)(v2, v4);
|
||||||
|
|
||||||
|
ASSERT(v3[0] == 2)
|
||||||
|
ASSERT(v3[1] == 3)
|
||||||
|
ASSERT(v3[2] == 4)
|
||||||
|
ASSERT(v4[0] == 12)
|
||||||
|
ASSERT(v4[1] == 31)
|
||||||
|
ASSERT(v4[2] == 42)
|
||||||
|
|
||||||
|
TEST_SUCCESS
|
||||||
|
}
|
||||||
|
|||||||
@@ -212,3 +212,22 @@ TEST_IMPL(GLM_PREFIX, ivec4_clamp) {
|
|||||||
|
|
||||||
TEST_SUCCESS
|
TEST_SUCCESS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_IMPL(GLM_PREFIX, ivec4_abs) {
|
||||||
|
ivec4 v1 = {2, -3, 4, -5}, v2 = {-12, -31, -42, -50};
|
||||||
|
ivec4 v3, v4;
|
||||||
|
|
||||||
|
GLM(ivec4_abs)(v1, v3);
|
||||||
|
GLM(ivec4_abs)(v2, v4);
|
||||||
|
|
||||||
|
ASSERT(v3[0] == 2)
|
||||||
|
ASSERT(v3[1] == 3)
|
||||||
|
ASSERT(v3[2] == 4)
|
||||||
|
ASSERT(v3[3] == 5)
|
||||||
|
ASSERT(v4[0] == 12)
|
||||||
|
ASSERT(v4[1] == 31)
|
||||||
|
ASSERT(v4[2] == 42)
|
||||||
|
ASSERT(v4[3] == 50)
|
||||||
|
|
||||||
|
TEST_SUCCESS
|
||||||
|
}
|
||||||
|
|||||||
@@ -579,6 +579,20 @@ TEST_IMPL(GLM_PREFIX, vec2_clamp) {
|
|||||||
TEST_SUCCESS
|
TEST_SUCCESS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_IMPL(GLM_PREFIX, vec2_abs) {
|
||||||
|
vec2 v1 = {2, -3}, v2 = {-12, -31};
|
||||||
|
vec2 v3, v4;
|
||||||
|
vec2 v5 = {2, 3}, v6 = {12, 31};
|
||||||
|
|
||||||
|
GLM(vec2_abs)(v1, v3);
|
||||||
|
GLM(vec2_abs)(v2, v4);
|
||||||
|
|
||||||
|
ASSERTIFY(test_assert_vec2_eq(v3, v5))
|
||||||
|
ASSERTIFY(test_assert_vec2_eq(v4, v6))
|
||||||
|
|
||||||
|
TEST_SUCCESS
|
||||||
|
}
|
||||||
|
|
||||||
TEST_IMPL(GLM_PREFIX, vec2_lerp) {
|
TEST_IMPL(GLM_PREFIX, vec2_lerp) {
|
||||||
vec2 v1 = {-100.0f, -200.0f};
|
vec2 v1 = {-100.0f, -200.0f};
|
||||||
vec2 v2 = {100.0f, 200.0f};
|
vec2 v2 = {100.0f, 200.0f};
|
||||||
|
|||||||
10
test/tests.h
10
test/tests.h
@@ -379,6 +379,7 @@ TEST_DECLARE(glm_vec2_distance)
|
|||||||
TEST_DECLARE(glm_vec2_maxv)
|
TEST_DECLARE(glm_vec2_maxv)
|
||||||
TEST_DECLARE(glm_vec2_minv)
|
TEST_DECLARE(glm_vec2_minv)
|
||||||
TEST_DECLARE(glm_vec2_clamp)
|
TEST_DECLARE(glm_vec2_clamp)
|
||||||
|
TEST_DECLARE(glm_vec2_abs)
|
||||||
TEST_DECLARE(glm_vec2_lerp)
|
TEST_DECLARE(glm_vec2_lerp)
|
||||||
TEST_DECLARE(glm_vec2_complex_mul)
|
TEST_DECLARE(glm_vec2_complex_mul)
|
||||||
TEST_DECLARE(glm_vec2_complex_div)
|
TEST_DECLARE(glm_vec2_complex_div)
|
||||||
@@ -416,6 +417,7 @@ TEST_DECLARE(glmc_vec2_distance)
|
|||||||
TEST_DECLARE(glmc_vec2_maxv)
|
TEST_DECLARE(glmc_vec2_maxv)
|
||||||
TEST_DECLARE(glmc_vec2_minv)
|
TEST_DECLARE(glmc_vec2_minv)
|
||||||
TEST_DECLARE(glmc_vec2_clamp)
|
TEST_DECLARE(glmc_vec2_clamp)
|
||||||
|
TEST_DECLARE(glmc_vec2_abs)
|
||||||
TEST_DECLARE(glmc_vec2_lerp)
|
TEST_DECLARE(glmc_vec2_lerp)
|
||||||
TEST_DECLARE(glmc_vec2_complex_mul)
|
TEST_DECLARE(glmc_vec2_complex_mul)
|
||||||
TEST_DECLARE(glmc_vec2_complex_div)
|
TEST_DECLARE(glmc_vec2_complex_div)
|
||||||
@@ -746,6 +748,7 @@ TEST_DECLARE(glm_ivec2_distance)
|
|||||||
TEST_DECLARE(glm_ivec2_maxv)
|
TEST_DECLARE(glm_ivec2_maxv)
|
||||||
TEST_DECLARE(glm_ivec2_minv)
|
TEST_DECLARE(glm_ivec2_minv)
|
||||||
TEST_DECLARE(glm_ivec2_clamp)
|
TEST_DECLARE(glm_ivec2_clamp)
|
||||||
|
TEST_DECLARE(glm_ivec2_abs)
|
||||||
|
|
||||||
TEST_DECLARE(glmc_ivec2)
|
TEST_DECLARE(glmc_ivec2)
|
||||||
TEST_DECLARE(glmc_ivec2_copy)
|
TEST_DECLARE(glmc_ivec2_copy)
|
||||||
@@ -762,6 +765,7 @@ TEST_DECLARE(glmc_ivec2_distance)
|
|||||||
TEST_DECLARE(glmc_ivec2_maxv)
|
TEST_DECLARE(glmc_ivec2_maxv)
|
||||||
TEST_DECLARE(glmc_ivec2_minv)
|
TEST_DECLARE(glmc_ivec2_minv)
|
||||||
TEST_DECLARE(glmc_ivec2_clamp)
|
TEST_DECLARE(glmc_ivec2_clamp)
|
||||||
|
TEST_DECLARE(glmc_ivec2_abs)
|
||||||
|
|
||||||
/* ivec3 */
|
/* ivec3 */
|
||||||
TEST_DECLARE(glm_ivec3)
|
TEST_DECLARE(glm_ivec3)
|
||||||
@@ -812,6 +816,7 @@ TEST_DECLARE(glm_ivec4_distance)
|
|||||||
TEST_DECLARE(glm_ivec4_maxv)
|
TEST_DECLARE(glm_ivec4_maxv)
|
||||||
TEST_DECLARE(glm_ivec4_minv)
|
TEST_DECLARE(glm_ivec4_minv)
|
||||||
TEST_DECLARE(glm_ivec4_clamp)
|
TEST_DECLARE(glm_ivec4_clamp)
|
||||||
|
TEST_DECLARE(glm_ivec4_abs)
|
||||||
|
|
||||||
TEST_DECLARE(glmc_ivec4)
|
TEST_DECLARE(glmc_ivec4)
|
||||||
TEST_DECLARE(glmc_ivec4_copy)
|
TEST_DECLARE(glmc_ivec4_copy)
|
||||||
@@ -828,6 +833,7 @@ TEST_DECLARE(glmc_ivec4_distance)
|
|||||||
TEST_DECLARE(glmc_ivec4_maxv)
|
TEST_DECLARE(glmc_ivec4_maxv)
|
||||||
TEST_DECLARE(glmc_ivec4_minv)
|
TEST_DECLARE(glmc_ivec4_minv)
|
||||||
TEST_DECLARE(glmc_ivec4_clamp)
|
TEST_DECLARE(glmc_ivec4_clamp)
|
||||||
|
TEST_DECLARE(glmc_ivec4_abs)
|
||||||
|
|
||||||
/* structs */
|
/* structs */
|
||||||
TEST_DECLARE(mat3s_identity_init)
|
TEST_DECLARE(mat3s_identity_init)
|
||||||
@@ -1244,6 +1250,7 @@ TEST_LIST {
|
|||||||
TEST_ENTRY(glmc_vec2_maxv)
|
TEST_ENTRY(glmc_vec2_maxv)
|
||||||
TEST_ENTRY(glmc_vec2_minv)
|
TEST_ENTRY(glmc_vec2_minv)
|
||||||
TEST_ENTRY(glmc_vec2_clamp)
|
TEST_ENTRY(glmc_vec2_clamp)
|
||||||
|
TEST_ENTRY(glmc_vec2_abs)
|
||||||
TEST_ENTRY(glmc_vec2_lerp)
|
TEST_ENTRY(glmc_vec2_lerp)
|
||||||
TEST_ENTRY(glmc_vec2_complex_mul)
|
TEST_ENTRY(glmc_vec2_complex_mul)
|
||||||
TEST_ENTRY(glmc_vec2_complex_div)
|
TEST_ENTRY(glmc_vec2_complex_div)
|
||||||
@@ -1573,6 +1580,7 @@ TEST_LIST {
|
|||||||
TEST_ENTRY(glm_ivec2_maxv)
|
TEST_ENTRY(glm_ivec2_maxv)
|
||||||
TEST_ENTRY(glm_ivec2_minv)
|
TEST_ENTRY(glm_ivec2_minv)
|
||||||
TEST_ENTRY(glm_ivec2_clamp)
|
TEST_ENTRY(glm_ivec2_clamp)
|
||||||
|
TEST_ENTRY(glm_ivec2_abs)
|
||||||
|
|
||||||
TEST_ENTRY(glmc_ivec2)
|
TEST_ENTRY(glmc_ivec2)
|
||||||
TEST_ENTRY(glmc_ivec2_copy)
|
TEST_ENTRY(glmc_ivec2_copy)
|
||||||
@@ -1589,6 +1597,7 @@ TEST_LIST {
|
|||||||
TEST_ENTRY(glmc_ivec2_maxv)
|
TEST_ENTRY(glmc_ivec2_maxv)
|
||||||
TEST_ENTRY(glmc_ivec2_minv)
|
TEST_ENTRY(glmc_ivec2_minv)
|
||||||
TEST_ENTRY(glmc_ivec2_clamp)
|
TEST_ENTRY(glmc_ivec2_clamp)
|
||||||
|
TEST_ENTRY(glmc_ivec2_abs)
|
||||||
|
|
||||||
/* ivec3 */
|
/* ivec3 */
|
||||||
TEST_ENTRY(glm_ivec3)
|
TEST_ENTRY(glm_ivec3)
|
||||||
@@ -1655,6 +1664,7 @@ TEST_LIST {
|
|||||||
TEST_ENTRY(glmc_ivec4_maxv)
|
TEST_ENTRY(glmc_ivec4_maxv)
|
||||||
TEST_ENTRY(glmc_ivec4_minv)
|
TEST_ENTRY(glmc_ivec4_minv)
|
||||||
TEST_ENTRY(glmc_ivec4_clamp)
|
TEST_ENTRY(glmc_ivec4_clamp)
|
||||||
|
TEST_ENTRY(glmc_ivec4_abs)
|
||||||
|
|
||||||
/* structs */
|
/* structs */
|
||||||
TEST_ENTRY(mat3s_identity_init)
|
TEST_ENTRY(mat3s_identity_init)
|
||||||
|
|||||||
@@ -158,6 +158,8 @@
|
|||||||
<ClInclude Include="..\include\cglm\simd\x86.h" />
|
<ClInclude Include="..\include\cglm\simd\x86.h" />
|
||||||
<ClInclude Include="..\include\cglm\sphere.h" />
|
<ClInclude Include="..\include\cglm\sphere.h" />
|
||||||
<ClInclude Include="..\include\cglm\struct.h" />
|
<ClInclude Include="..\include\cglm\struct.h" />
|
||||||
|
<ClInclude Include="..\include\cglm\struct\affine-post.h" />
|
||||||
|
<ClInclude Include="..\include\cglm\struct\affine-pre.h" />
|
||||||
<ClInclude Include="..\include\cglm\struct\affine.h" />
|
<ClInclude Include="..\include\cglm\struct\affine.h" />
|
||||||
<ClInclude Include="..\include\cglm\struct\affine2d.h" />
|
<ClInclude Include="..\include\cglm\struct\affine2d.h" />
|
||||||
<ClInclude Include="..\include\cglm\struct\box.h" />
|
<ClInclude Include="..\include\cglm\struct\box.h" />
|
||||||
|
|||||||
@@ -597,5 +597,11 @@
|
|||||||
<ClInclude Include="..\include\cglm\affine-pre.h">
|
<ClInclude Include="..\include\cglm\affine-pre.h">
|
||||||
<Filter>include\cglm</Filter>
|
<Filter>include\cglm</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\cglm\struct\affine-post.h">
|
||||||
|
<Filter>include\cglm\struct</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\cglm\struct\affine-pre.h">
|
||||||
|
<Filter>include\cglm\struct</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user