- Rename structs folder to struct

- Include files in `cglms.h`
- Fix style issues (tabs to spaces, open brace without newline)
This commit is contained in:
acoto87
2019-05-21 16:45:34 -05:00
parent fd3b0634d2
commit ba2031d977
18 changed files with 447 additions and 457 deletions

View File

@@ -13,11 +13,19 @@ extern "C" {
#include "cglm.h"
#include "types-struct.h"
#include "structs/vec3.h"
#include "structs/vec4.h"
#include "structs/mat3.h"
#include "structs/mat4.h"
#include "structs/sphere.h"
#include "struct/vec3.h"
#include "struct/vec4.h"
#include "struct/mat3.h"
#include "struct/mat4.h"
#include "struct/affine.h"
#include "struct/frustum.h"
#include "struct/plane.h"
#include "struct/box.h"
#include "struct/color.h"
#include "struct/io.h"
#include "struct/project.h"
#include "struct/sphere.h"
#include "struct/curve.h"
#ifdef __cplusplus
}

View File

@@ -135,8 +135,6 @@ glms_aabb_frustum(vec3s box[2], vec4s planes[6]) {
CGLM_INLINE
void
glms_aabb_invalidate(vec3s box[2]) {
// FIX: Modify param
//
box[0] = glms_vec3_broadcast(FLT_MAX);
box[1] = glms_vec3_broadcast(-FLT_MAX);
}

View File

@@ -745,7 +745,6 @@ glms_cross(vec3s a, vec3s b) {
*
* @param[in] a vector1
* @param[in] b vector2
*
* @return dot product
*/
CGLM_INLINE

View File

@@ -53,11 +53,6 @@ typedef union mat3s {
float m10, m11, m12;
float m20, m21, m22;
};
struct {
vec3s col0;
vec3s col1;
vec3s col2;
};
#endif
vec3s col[3];
mat3 raw;
@@ -71,12 +66,6 @@ typedef union CGLM_ALIGN_MAT mat4s {
float m20, m21, m22, m23;
float m30, m31, m32, m33;
};
struct {
vec4s col0;
vec4s col1;
vec4s col2;
vec4s col3;
};
#endif
vec4s col[4];
mat4 raw;

View File

@@ -49,8 +49,7 @@ test_rand_vec3(vec3 dest) {
}
vec3s
test_rand_vec3s()
{
test_rand_vec3s() {
vec3s r;
test_rand_vec3(r.raw);
return r;
@@ -67,8 +66,7 @@ test_rand_vec4(vec4 dest) {
}
vec4s
test_rand_vec4s()
{
test_rand_vec4s() {
vec4s r;
test_rand_vec4(r.raw);
return r;
@@ -137,8 +135,7 @@ test_assert_vec3_eq(vec3 v1, vec3 v2) {
}
void
test_assert_vec3s_eq(vec3s v1, vec3s v2)
{
test_assert_vec3s_eq(vec3s v1, vec3s v2) {
test_assert_vec3_eq(v1.raw, v2.raw);
}
@@ -151,8 +148,7 @@ test_assert_vec4_eq(vec4 v1, vec4 v2) {
}
void
test_assert_vec4s_eq(vec4s v1, vec4s v2)
{
test_assert_vec4s_eq(vec4s v1, vec4s v2) {
test_assert_vec4_eq(v1.raw, v2.raw);
}