mirror of
https://github.com/recp/cglm.git
synced 2025-12-25 04:44:58 +00:00
* create helpers macro which defines corner index * func for get bounding box frustum * add missing source to make file * add more desc to glm_frustum_corners
81 lines
1.5 KiB
C
81 lines
1.5 KiB
C
/*
|
|
* Copyright (c), Recep Aslantas.
|
|
*
|
|
* MIT License (MIT), http://opensource.org/licenses/MIT
|
|
* Full license can be found in the LICENSE file
|
|
*/
|
|
|
|
#include "../include/cglm/cglm.h"
|
|
#include "../include/cglm/call.h"
|
|
|
|
CGLM_EXPORT
|
|
void
|
|
glmc_frustum(float left,
|
|
float right,
|
|
float bottom,
|
|
float top,
|
|
float nearVal,
|
|
float farVal,
|
|
mat4 dest) {
|
|
glm_frustum(left,
|
|
right,
|
|
bottom,
|
|
top,
|
|
nearVal,
|
|
farVal,
|
|
dest);
|
|
}
|
|
|
|
CGLM_EXPORT
|
|
void
|
|
glmc_ortho(float left,
|
|
float right,
|
|
float bottom,
|
|
float top,
|
|
float nearVal,
|
|
float farVal,
|
|
mat4 dest) {
|
|
glm_ortho(left,
|
|
right,
|
|
bottom,
|
|
top,
|
|
nearVal,
|
|
farVal,
|
|
dest);
|
|
}
|
|
|
|
CGLM_EXPORT
|
|
void
|
|
glmc_perspective(float fovy,
|
|
float aspect,
|
|
float nearVal,
|
|
float farVal,
|
|
mat4 dest) {
|
|
glm_perspective(fovy,
|
|
aspect,
|
|
nearVal,
|
|
farVal,
|
|
dest);
|
|
}
|
|
|
|
CGLM_EXPORT
|
|
void
|
|
glmc_lookat(vec3 eye,
|
|
vec3 center,
|
|
vec3 up,
|
|
mat4 dest) {
|
|
glm_lookat(eye, center, up, dest);
|
|
}
|
|
|
|
CGLM_EXPORT
|
|
void
|
|
glmc_look(vec3 eye, vec3 dir, vec3 up, mat4 dest) {
|
|
glm_look(eye, dir, up, dest);
|
|
}
|
|
|
|
CGLM_EXPORT
|
|
void
|
|
glmc_look_anyup(vec3 eye, vec3 dir, mat4 dest) {
|
|
glm_look_anyup(eye, dir, dest);
|
|
}
|