mirror of
https://github.com/recp/cglm.git
synced 2026-01-02 13:49:59 +00:00
implement call version for mat2
This commit is contained in:
@@ -12,10 +12,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cglm.h"
|
||||
#include "call/vec2.h"
|
||||
#include "call/vec3.h"
|
||||
#include "call/vec4.h"
|
||||
#include "call/mat4.h"
|
||||
#include "call/mat2.h"
|
||||
#include "call/mat3.h"
|
||||
#include "call/mat4.h"
|
||||
#include "call/affine.h"
|
||||
#include "call/cam.h"
|
||||
#include "call/quat.h"
|
||||
|
||||
79
include/cglm/call/mat2.h
Normal file
79
include/cglm/call/mat2.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
#ifndef cglmc_mat2_h
|
||||
#define cglmc_mat2_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "../cglm.h"
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_copy(mat2 mat, mat2 dest);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_identity(mat2 mat);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_identity_array(mat2 * __restrict mat, size_t count);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_zero(mat2 mat);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_mul(mat2 m1, mat2 m2, mat2 dest);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_transpose_to(mat2 m, mat2 dest);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_transpose(mat2 m);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_mulv(mat2 m, vec2 v, vec2 dest);
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_mat2_trace(mat2 m);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_scale(mat2 m, float s);
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_mat2_det(mat2 mat);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_inv(mat2 mat, mat2 dest);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_swap_col(mat2 mat, int col1, int col2);
|
||||
|
||||
CGLM_EXPORT
|
||||
void
|
||||
glmc_mat2_swap_row(mat2 mat, int row1, int row2);
|
||||
|
||||
CGLM_EXPORT
|
||||
float
|
||||
glmc_mat2_rmc(vec2 r, mat2 m, vec2 c);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* cglmc_mat2_h */
|
||||
@@ -6,7 +6,28 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
Macros:
|
||||
GLM_MAT2_IDENTITY_INIT
|
||||
GLM_MAT2_ZERO_INIT
|
||||
GLM_MAT2_IDENTITY
|
||||
GLM_MAT2_ZERO
|
||||
|
||||
Functions:
|
||||
CGLM_INLINE void glm_mat2_copy(mat2 mat, mat2 dest)
|
||||
CGLM_INLINE void glm_mat2_identity(mat2 mat)
|
||||
CGLM_INLINE void glm_mat2_identity_array(mat2 * restrict mat, size_t count)
|
||||
CGLM_INLINE void glm_mat2_zero(mat2 mat)
|
||||
CGLM_INLINE void glm_mat2_mul(mat2 m1, mat2 m2, mat2 dest)
|
||||
CGLM_INLINE void glm_mat2_transpose_to(mat2 m, mat2 dest)
|
||||
CGLM_INLINE void glm_mat2_transpose(mat2 m)
|
||||
CGLM_INLINE void glm_mat2_mulv(mat2 m, vec2 v, vec2 dest)
|
||||
CGLM_INLINE float glm_mat2_trace(mat2 m)
|
||||
CGLM_INLINE void glm_mat2_scale(mat2 m, float s)
|
||||
CGLM_INLINE float glm_mat2_det(mat2 mat)
|
||||
CGLM_INLINE void glm_mat2_inv(mat2 mat, mat2 dest)
|
||||
CGLM_INLINE void glm_mat2_swap_col(mat2 mat, int col1, int col2)
|
||||
CGLM_INLINE void glm_mat2_swap_row(mat2 mat, int row1, int row2)
|
||||
CGLM_INLINE float glm_mat2_rmc(vec2 r, mat2 m, vec2 c)
|
||||
*/
|
||||
|
||||
#ifndef cglm_mat2_h
|
||||
|
||||
Reference in New Issue
Block a user