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

frustrum_test

Test whether an object is in the view frustrum

get_frustum_planes

Helper function that converts viewing matrix into frustum planes

handle_fp_inputs

This method is where data transforms take place due to inputs for a first person camera

load_wavefront

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

mul_mat4

returns the two matrices multiplied together

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