|
struct vec3 | Vec3Init (float x, float y, float z) |
|
void | Vec3Debug (struct vec3 v, char *name) |
|
void | TriangleDebug (struct triangle t, char *name) |
|
float | Vec3DotProduct (struct vec3 left, struct vec3 right) |
|
struct vec3 | Vec3CrossProduct (struct vec3 left, struct vec3 right) |
|
struct vec3 | Vec3Normalize (struct vec3 vec3) |
|
struct vec3 | Vec3Add (struct vec3 left, struct vec3 right) |
|
struct vec3 | Vec3Subtract (struct vec3 minuend, struct vec3 subtrahend) |
|
struct vec3 | Vec3Multiply (struct vec3 vec3, float f) |
|
struct vec3 | Vec3Divide (struct vec3 vec3, float f) |
|
struct vec3 | Vec3IntersectPlane (struct vec3 point, struct vec3 normal, struct vec3 lineStart, struct vec3 lineEnd, float *t) |
| Return the 3d point where a line intersects a plane. More...
|
|
float | ShortestDistToPlane (struct vec3 point, struct vec3 planePoint, struct vec3 planeNormal) |
| Return shortest distance from point to plan given a normalized normal.
|
|
struct triangle | TriangleInit (float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2, float x3, float y3, float z3, float u3, float v3) |
| Create a new triangle with the given params.
|
|
int | TriangleClipAgainstPlane (struct vec3 plane, struct vec3 normal, struct triangle in, struct triangle *out1, struct triangle *out2) |
| Clip a triangle against a plane. More...
|
|
struct mesh * | MeshInit (int numTris) |
| Initialize a new mesh object. More...
|
|
struct mesh * | MeshInitFromObj (char *objFile) |
| Initialize a new mesh object from an obj file. More...
|
|
void | MeshDeinit (struct mesh *mesh) |
| De-initializes the mesh object. More...
|
|
struct vec3 | Mat4x4MultiplyVec3 (struct mat4x4 mat, struct vec3 vec) |
|
struct mat4x4 | Mat4x4Identity () |
|
struct mat4x4 | Mat4x4RotateX (float rad) |
|
struct mat4x4 | Mat4x4RotateY (float rad) |
|
struct mat4x4 | Mat4x4RotateZ (float rad) |
|
struct mat4x4 | Mat4x4Translate (float x, float y, float z) |
|
struct mat4x4 | Mat4x4Project (float fovDegrees, float aspect, float near, float far) |
|
struct mat4x4 | Mat4x4Multiply (struct mat4x4 left, struct mat4x4 right) |
|
struct mat4x4 | Mat4x4InvertFast (struct mat4x4 matrix) |
| Fast matrix inverse. Doesn't work if matrix does scaling.
|
|
struct mat4x4 | Mat4x4PointAt (struct vec3 pos, struct vec3 target, struct vec3 up) |
|
void | Mat4x4Debug (struct mat4x4 mat, char *name) |
| Prints debug information about the 4x4 matrix.
|
|