#include <UtilityBox.h>
Public Member Functions | |
UtilityBox (void) | |
~UtilityBox (void) | |
float | nextFloatFromString (char *, int &) |
int | trimString (char *) |
read next numeric value from a string | |
int | trimStringRight (char *) |
remove all whitespaces, tabs, newlines, etc. from a string | |
int | firstWord (char *, int &, char *) |
remove all whitespaces, tabs, newlines, etc. from the end of a string | |
void | crossProduct (float[3], float[3], float[3]) |
get first word from a string with a specified offset | |
float | dotProduct (float[3], float[3]) |
write cross product of two vectors to third argument (result vector) | |
void | setRotateX (float m[4][4], float alpha) |
calculate dot product | |
void | setRotateY (float m[4][4], float alpha) |
set up rotation matrix (around x axis) | |
void | setRotateZ (float m[4][4], float alpha) |
set up rotation matrix (around y axis) | |
void | transformVector (float in[4], float m[4][4], float out[4]) |
set up rotation matrix (around z axis) | |
void | transformVector16 (float in[4], float m[16], float out[4]) |
transform a vector with a given transformation matrix | |
void | leftMultiply (float[4][4], float[4][4], float[4][4]) |
transform a vector with a given transformation matrix | |
void | rightMultiply (float[4][4], float[4][4], float[4][4]) |
void | setTranslate (float[4][4], float, float, float) |
void | copyMatrix (float[4][4], float[4][4]) |
void | transposeMatrix (float[4][4]) |
void | normalizeVector (float[4]) |
bool | testMatrix (void) |
void | setScale (float m[4][4], float sx, float sy, float sz) |
void | multMatrix (float[4][4], float[4][4]) |
void | setIdentity (float[4][4]) |
void | copyVector (float[4], float[4]) |
void | calculateNormal (float[3], float[3], float[3], float[3]) |
int | getpart (char *str, char *result, int &pos) |
calculate a vertex normal | |
int | countslash (char *str) |
get a part of a string | |
int | getval (char *str, char *res, int &pos) |
count number of slashes in a string | |
vec3f | transformVector (vec3f v3f, Matrix16 m16) |
int | trimleft (char *) |
transform a vector |
UtilityBox::UtilityBox | ( | void | ) |
UtilityBox::~UtilityBox | ( | void | ) |
void UtilityBox::calculateNormal | ( | float | result[3], | |
float | p1[3], | |||
float | p2[3], | |||
float | p3[3] | |||
) |
void UtilityBox::copyMatrix | ( | float | m1[4][4], | |
float | m2[4][4] | |||
) |
void UtilityBox::copyVector | ( | float | v1[4], | |
float | v2[4] | |||
) |
int UtilityBox::countslash | ( | char * | str | ) |
get a part of a string
void UtilityBox::crossProduct | ( | float | n[3], | |
float | v1[3], | |||
float | v2[3] | |||
) |
get first word from a string with a specified offset
float UtilityBox::dotProduct | ( | float | v1[3], | |
float | v2[3] | |||
) |
write cross product of two vectors to third argument (result vector)
int UtilityBox::firstWord | ( | char * | s, | |
int & | pos, | |||
char * | d | |||
) |
remove all whitespaces, tabs, newlines, etc. from the end of a string
int UtilityBox::getpart | ( | char * | str, | |
char * | result, | |||
int & | pos | |||
) |
calculate a vertex normal
int UtilityBox::getval | ( | char * | str, | |
char * | res, | |||
int & | pos | |||
) |
count number of slashes in a string
void UtilityBox::leftMultiply | ( | float | m1[4][4], | |
float | m2[4][4], | |||
float | result[4][4] | |||
) |
transform a vector with a given transformation matrix
void UtilityBox::multMatrix | ( | float | A[4][4], | |
float | B[4][4] | |||
) |
float UtilityBox::nextFloatFromString | ( | char * | string, | |
int & | pos | |||
) |
void UtilityBox::normalizeVector | ( | float | v[4] | ) |
void UtilityBox::rightMultiply | ( | float | m1[4][4], | |
float | m2[4][4], | |||
float | result[4][4] | |||
) |
void UtilityBox::setIdentity | ( | float | m[4][4] | ) |
void UtilityBox::setRotateX | ( | float | m[4][4], | |
float | alpha | |||
) |
calculate dot product
void UtilityBox::setRotateY | ( | float | m[4][4], | |
float | alpha | |||
) |
set up rotation matrix (around x axis)
void UtilityBox::setRotateZ | ( | float | m[4][4], | |
float | alpha | |||
) |
set up rotation matrix (around y axis)
void UtilityBox::setScale | ( | float | m[4][4], | |
float | sx, | |||
float | sy, | |||
float | sz | |||
) |
void UtilityBox::setTranslate | ( | float | m[4][4], | |
float | tx, | |||
float | ty, | |||
float | tz | |||
) |
bool UtilityBox::testMatrix | ( | void | ) |
void UtilityBox::transformVector | ( | float | in[4], | |
float | m[4][4], | |||
float | out[4] | |||
) |
set up rotation matrix (around z axis)
void UtilityBox::transformVector16 | ( | float | in[4], | |
float | m[16], | |||
float | out[4] | |||
) |
transform a vector with a given transformation matrix
void UtilityBox::transposeMatrix | ( | float | m[4][4] | ) |
int UtilityBox::trimleft | ( | char * | str | ) |
transform a vector
int UtilityBox::trimString | ( | char * | s | ) |
read next numeric value from a string
int UtilityBox::trimStringRight | ( | char * | s | ) |
remove all whitespaces, tabs, newlines, etc. from a string