mirror of
https://github.com/recp/cglm.git
synced 2026-02-17 03:39:05 +00:00
Merge branch 'master' into feature/glm_vec2_make
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
CGLM_INLINE mat4s glms_quat_rotate(mat4s m, versors q)
|
||||
CGLM_INLINE mat4s glms_quat_rotate_at(mat4s m, versors q, vec3s pivot)
|
||||
CGLM_INLINE mat4s glms_quat_rotate_atm(versors q, vec3s pivot)
|
||||
CGLM_INLINE void glms_quat_make(float * restrict src)
|
||||
CGLM_INLINE versors glms_quat_make(float * restrict src)
|
||||
*/
|
||||
|
||||
#ifndef cglms_quat_h
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
CGLM_INLINE vec3s glms_vec3_smoothinterp(vec3s from, vec3s to, float t);
|
||||
CGLM_INLINE vec3s glms_vec3_smoothinterpc(vec3s from, vec3s to, float t);
|
||||
CGLM_INLINE vec3s glms_vec3_swizzle(vec3s v, int mask);
|
||||
CGLM_INLINE vec3s glms_vec3_make(float * restrict src);
|
||||
|
||||
Convenient:
|
||||
CGLM_INLINE vec3s glms_cross(vec3s a, vec3s b);
|
||||
@@ -967,4 +968,18 @@ glms_vec3_(swizzle)(vec3s v, int mask) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Create three dimensional vector from pointer
|
||||
*
|
||||
* @param[in] src pointer to an array of floats
|
||||
* @returns constructed 3D vector from raw pointer
|
||||
*/
|
||||
CGLM_INLINE
|
||||
vec3s
|
||||
glms_vec3_(make)(float * __restrict src) {
|
||||
vec3s dest;
|
||||
glm_vec3_make(src, dest.raw);
|
||||
return dest;
|
||||
}
|
||||
|
||||
#endif /* cglms_vec3s_h */
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
CGLM_INLINE vec4s glms_vec4_smoothinterpc(vec4s from, vec4s to, float t);
|
||||
CGLM_INLINE vec4s glms_vec4_cubic(float s);
|
||||
CGLM_INLINE vec4s glms_vec4_swizzle(vec4s v, int mask);
|
||||
CGLM_INLINE vec4s glms_vec4_make(float * restrict src);
|
||||
*/
|
||||
|
||||
#ifndef cglms_vec4s_h
|
||||
@@ -811,4 +812,18 @@ glms_vec4_(swizzle)(vec4s v, int mask) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
/*!
|
||||
* @brief Create four dimensional vector from pointer
|
||||
*
|
||||
* @param[in] src pointer to an array of floats
|
||||
* @returns constructed 4D vector from raw pointer
|
||||
*/
|
||||
CGLM_INLINE
|
||||
vec4s
|
||||
glms_vec4_(make)(float * __restrict src) {
|
||||
vec4s dest;
|
||||
glm_vec4_make(src, dest.raw);
|
||||
return dest;
|
||||
}
|
||||
|
||||
#endif /* cglms_vec4s_h */
|
||||
|
||||
Reference in New Issue
Block a user