#include <v3.h>
Public Methods | |
Constructors | |
| V3 (float x=0.f, float y=0.f, float z=0.f) | |
| . | |
| V3 (const V3 &v) | |
| . | |
Initializers | |
| void | Set (float x, float y, float z) |
| . | |
| void | Set (const V3 &v) |
| . | |
| void | SetLess (const V3 &v) |
| . | |
| void | SetGreater (const V3 &v) |
| . | |
Overloaded Operators | |
| V3 | operator- () const |
| . | |
| V3 | operator+ (float d) const |
| . | |
| V3 | operator+ (const V3 &v) const |
| . | |
| V3 | operator- (float d) const |
| . | |
| V3 | operator- (const V3 &v) const |
| . | |
| V3 | operator * (float d) const |
| . | |
| V3 | operator * (const V3 &v) const |
| . | |
| V3 | operator/ (float d) const |
| . | |
| V3 | operator/ (const V3 &v) const |
| . | |
| void | operator+= (const V3 &v) |
| . | |
| void | operator-= (const V3 &v) |
| . | |
| void | operator *= (float d) |
| . | |
| void | operator *= (const V3 &v) |
| . | |
| void | operator *= (const Mat44 &m) |
| . | |
| void | operator *= (const Mat33 &m) |
| . | |
| void | operator/= (float d) |
| . | |
Operations | |
| float | Dot (const V3 &v) const |
| Dot product (inner product). | |
| V3 | Cross (const V3 &v) const |
| Cross product. | |
| float | Mag () const |
| Magnitude of vector. | |
| float | MagSquared () const |
| Squared magnitude of vector. | |
| V3 | GetNorm () const |
| Returns the vector normalized. | |
| V3 & | Normalize () |
| Normalizes the vector in place. | |
| V3 | GetReflect (const V3 &normal) const |
| Returns the vector reflected around the normal. | |
| V3 & | Reflect (const V3 &normal) |
| Reflects the vector around the normal in place. | |
| V3 | GetOProjectPerp (int c) const |
| Removes the indexed component and returns the perpendicular vector. | |
| V3 & | OProjectPerp (int c) |
| Removes the indexed component and returns the perpendicular vector in place. | |
| V3 | GetOProject (int c) const |
| Returns a vector with the indexed component removed. | |
| bool | Equals (const V3 &v, float eps=constants::Eps3) const |
| Checks vector equality given a threshold. | |
Static Public Attributes | |
| V3 | Axes [3] |
| Cardinal vectors X, Y, and Z. | |
| V3 | O |
| Zero vector. | |
| V3 | Inf |
| Inifinite vector. | |
Union members: float x, y, z; float xyz [3];
|
|
Initial value: Cardinal vectors X, Y, and Z.
|
1.2.17