KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
vec3f.h File Reference

Basic matrix operations. More...

#include <sys/cdefs.h>
#include <math.h>
#include <dc/fmath.h>

Go to the source code of this file.

Data Structures

struct  vec3f_t
 3D floating-point vector More...
 

Functions

static float vec_fipr (vec3f_t vec)
 
static float vec_dot (vec3f_t vec1, vec3f_t vec2)
 Function to return the scalar dot product of two 3d vectors.
 
static float vec_length (vec3f_t vec)
 Macro to return scalar Euclidean length of a 3d vector.
 
static float vec_distance (vec3f_t vec1, vec3f_t vec2)
 Function to return the Euclidean distance between two 3d vectors.
 
static vec3f_t vec_normalize (vec3f_t vec)
 Function to return the normalized version of a vector.
 
static vec3f_t vec_sub_normalize (vec3f_t vec1, vec3f_t vec2)
 Function to return the normalized version of a vector minus another vector.
 
static vec3f_t vec_rotr_xy (vec3f_t vec, vec3f_t origin, float angle)
 Macro to rotate a vector about its origin on the x, y plane.
 
static vec3f_t vec_rotr_xz (vec3f_t vec, vec3f_t origin, float angle)
 Macro to rotate a vector about its origin on the x, z plane.
 
static vec3f_t vec_rotr_yz (vec3f_t vec, vec3f_t origin, float angle)
 Macro to rotate a vector about its origin on the y, z plane.
 
static vec3f_t vec_rotd_xy (vec3f_t vec, vec3f_t origin, float angle)
 Macro to rotate a vector about its origin on the x, y plane.
 
static vec3f_t vec_rotd_xz (vec3f_t vec, vec3f_t origin, float angle)
 Macro to rotate a vector about its origin on the x, z plane.
 
static vec3f_t vec_rotd_yz (vec3f_t vec, vec3f_t origin, float angle)
 Macro to rotate a vector about its origin on the y, z plane.
 

Detailed Description

Basic matrix operations.

This file contains various basic vector math functionality for using the SH4's vector instructions. Higher level functionality in KGL is built off of these.

Author
Josh "PH3NOM" Pearson
See also
dc/matrix.h