mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
add new matrix mat4x3
Initial function being glm_mat4x3_make Signed-off-by: Vincent Davis Jr <vince@underview.tech>
This commit is contained in:
46
include/cglm/struct/mat4x3.h
Normal file
46
include/cglm/struct/mat4x3.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c), Recep Aslantas.
|
||||
*
|
||||
* MIT License (MIT), http://opensource.org/licenses/MIT
|
||||
* Full license can be found in the LICENSE file
|
||||
*/
|
||||
|
||||
/*
|
||||
Macros:
|
||||
GLMS_MAT4X3_ZERO_INIT
|
||||
GLMS_MAT4X3_ZERO
|
||||
|
||||
Functions:
|
||||
CGLM_INLINE mat4x3s glms_mat4x3_make(float * __restrict src);
|
||||
*/
|
||||
|
||||
#ifndef cglms_mat4x3_h
|
||||
#define cglms_mat4x3_h
|
||||
|
||||
#include "../common.h"
|
||||
#include "../types-struct.h"
|
||||
#include "../mat4x3.h"
|
||||
|
||||
/* api definition */
|
||||
#define glms_mat4x3_(NAME) CGLM_STRUCTAPI(mat4x3, NAME)
|
||||
|
||||
#define GLMS_MAT4X3_ZERO_INIT {GLM_MAT4X3_ZERO_INIT}
|
||||
|
||||
/* for C only */
|
||||
#define GLMS_MAT4X3_ZERO ((mat4x3s)GLMS_MAT4X3_ZERO_INIT)
|
||||
|
||||
/*!
|
||||
* @brief Create mat4x3 matrix from pointer
|
||||
*
|
||||
* @param[in] src pointer to an array of floats
|
||||
* @return constructed matrix from raw pointer
|
||||
*/
|
||||
CGLM_INLINE
|
||||
mat4x3s
|
||||
glms_mat4x3_(make)(float * __restrict src) {
|
||||
mat4x3s r;
|
||||
glm_mat4x3_make(src, r.raw);
|
||||
return r;
|
||||
}
|
||||
|
||||
#endif /* cglms_mat4x3_h */
|
||||
Reference in New Issue
Block a user