|
libHSPlasma
|
Stores a vector in 3D space. More...
#include <hsGeometry3.h>
Public Member Functions | |
| hsVector3 () | |
| hsVector3 (float _x, float _y, float _z) | |
| void | Zero () |
| float | magnitude () const |
| bool | operator== (const hsVector3 &other) const |
| bool | operator!= (const hsVector3 &other) const |
| void | read (hsStream *S) |
| void | write (hsStream *S) |
| void | prcWrite (pfPrcHelper *prc) |
| void | prcParse (const pfPrcTag *tag) |
| hsVector3 | operator+ (const hsVector3 &other) const |
| hsVector3 | operator- (const hsVector3 &other) const |
| hsVector3 | operator* (const float mult) const |
| float | dotP (const hsVector3 &other) const |
| hsVector3 | crossP (const hsVector3 &other) const |
Public Attributes | |
| float | X |
| float | Y |
| float | Z |
Stores a vector in 3D space.
| hsVector3::hsVector3 | ( | ) |
Construct a vector at the origin [0,0,0]
| hsVector3::hsVector3 | ( | float | _x, |
| float | _y, | ||
| float | _z | ||
| ) |
Construct a vector at [x,y,z]
Multiplies two vectors using the Cross Product:
| float hsVector3::dotP | ( | const hsVector3 & | other | ) | const |
Multiplies two vectors using the Dot Product:
| float hsVector3::magnitude | ( | ) | const |
Returns the magnitude of the vector:
| bool hsVector3::operator!= | ( | const hsVector3 & | other | ) | const |
Returns true if the values of the vectors are non-identical
| hsVector3 hsVector3::operator* | ( | const float | mult | ) | const |
Multiplies the vector by the scalar factor mult:
Adds the vectors using vector addition:
Subtracts the vectors using vector addition:
| bool hsVector3::operator== | ( | const hsVector3 & | other | ) | const |
Returns true if the values of the vectors are identical
| void hsVector3::prcParse | ( | const pfPrcTag * | tag | ) |
Parse a vector from PRC source
| void hsVector3::prcWrite | ( | pfPrcHelper * | prc | ) |
Write the vector to PRC source
| void hsVector3::read | ( | hsStream * | S | ) |
Reads the vector from a stream
| void hsVector3::write | ( | hsStream * | S | ) |
Writes the vector to a stream
| void hsVector3::Zero | ( | ) |
Zeros the vector; that is, put it at the origin [0,0,0]
| float hsVector3::X |
| float hsVector3::Y |
| float hsVector3::Z |
1.8.1.2