Module caper::utils [] [src]

Utility functions and macros

Functions

build_fp_view_matrix

Returns the model view matrix for a first person view given cam position and rotation

build_persp_proj_mat

Returns perspective projection matrix given fov, aspect ratio, z near and far

calc_normal

returns the normal calculated from the three vectors supplied

create_skydome

Returns a RenderItem for the skydome

crossp

returns the cross product of two vectors

dotp

Returns the dot product of two vectors

load_wavefront

Returns a Vec that should be converted to buffer and rendered as TrianglesList.

sub_vec3

returns the resultant vector of a - b

to_euler

returns a quaternion from a euler angle

to_quaternion

returns a euler angle as a quaternion