#include <vector3d.h>
Public Methods | |
Vector3d (double _x, double _y, double _z) | |
Vector3d () | |
Vector3d | operator= (const Vector3d &v) |
Vector3d | operator-= (const Vector3d &v) |
Vector3d | operator+= (const Vector3d &v) |
Vector3d | operator *= (const Vector3d &v) |
Vector3d | operator/= (const Vector3d &v) |
Vector3d | operator *= (double) |
Vector3d | operator/= (double) |
Vector3d | operator= (const Quaternion &q) |
Vector3d | rotate (const Vector3d &v, double ang) |
Rotate in any given axis. | |
double | module (void) |
double | distToPlane (const Point3d &p, const Vector3d &n) |
Distance to a given plane. | |
double | distToLine (const Point3d &p, const Vector3d &d) |
Distance to a given line. | |
Vector3d | normalized (void) |
Returns the current vector, normalized. | |
void | normalize (void) |
Normalize current vector. | |
string | toString (void) |
Converts the Vector3d to a string. | |
Get components | |
double | X () |
double | Y () |
double | Z () |
Protected Attributes | |
double | x |
double | y |
double | z |
Friends | |
class | BoundingBox |
bool | operator== (const Vector3d &a, const Vector3d &b) |
Vector3d | operator^ (const Vector3d &a, const Vector3d &b) |
double | operator * (const Vector3d &a, const Vector3d &b) |
Vector3d | operator- (const Vector3d &a, const Vector3d &b) |
Vector3d | operator+ (const Vector3d &a, const Vector3d &b) |
Vector3d | operator/ (const Vector3d &a, double n) |
Vector3d | operator * (const Vector3d &a, double n) |
Vector3d | operator/ (double n, const Vector3d &a) |
Vector3d | operator * (double n, const Vector3d &a) |
Vector3d | operator- (const Vector3d &v) |
Vector3d | operator * (const Matrix3x3 &M, const Vector3d &v) |
Vector3d | operator * (const Vector3d &v, const Matrix3x3 &M) |
Quaternion | operator * (const Vector3d &v, const Quaternion &q) |
Quaternion | operator * (const Quaternion &q, const Vector3d &v) |
Point3d is an alias of Vector3d.
Definition at line 42 of file vector3d.h.
|
Definition at line 35 of file vector3d.cc. |
|
A convenience contructor, content is unknown Definition at line 49 of file vector3d.h. Referenced by normalized(), and rotate(). |
|
Distance to a given line.
Definition at line 143 of file vector3d.cc. |
|
Distance to a given plane.
Definition at line 135 of file vector3d.cc. |
|
Definition at line 79 of file vector3d.cc. Referenced by distToLine(), Cylinder::newCycle(), normalize(), normalized(), and Collision::resolveGroundCollision(). |
|
Normalize current vector.
Definition at line 88 of file vector3d.cc. References module(), x, y, and z. Referenced by Cylinder::applyVelocity(), Cylinder::Cylinder(), distToPlane(), Collision::resolveGroundCollision(), rotate(), and Cylinder::undoVelocity(). |
|
Returns the current vector, normalized.
Definition at line 83 of file vector3d.cc. References module(), Vector3d(), x, y, and z. Referenced by Quaternion::Quaternion(). |
|
Definition at line 67 of file vector3d.cc. |
|
|
|
Definition at line 57 of file vector3d.cc. |
|
Definition at line 62 of file vector3d.cc. |
|
Definition at line 72 of file vector3d.cc. |
|
|
|
Definition at line 195 of file vector3d.cc. References Quaternion::getAxis(). |
|
Definition at line 52 of file vector3d.cc. |
|
Rotate in any given axis. Rotates current vector over a given axis, a given ammount. The formula used is a solved version of quaternion rotations. Definition at line 99 of file vector3d.cc. References cos(), normalize(), sin(), Vector3d(), x, y, and z. |
|
Converts the Vector3d to a string.
Definition at line 41 of file vector3d.cc. Referenced by Collision::resolveGroundCollision(), GraphicClient::Run(), and BoundingBox::toString(). |
|
Definition at line 123 of file vector3d.cc. References x. Referenced by Cylinder::Cylinder(), Cylinder::newCycle(), Quaternion::operator=(), Quaternion::Quaternion(), and Collision::resolveGroundCollision(). |
|
Definition at line 127 of file vector3d.cc. References y. Referenced by Cylinder::Cylinder(), Cylinder::newCycle(), Quaternion::operator=(), Quaternion::Quaternion(), and Collision::resolveGroundCollision(). |
|
Definition at line 131 of file vector3d.cc. References z. Referenced by Cylinder::checkGroundCollision(), Cylinder::newCycle(), Quaternion::operator=(), Quaternion::Quaternion(), and Collision::resolveGroundCollision(). |
|
Definition at line 85 of file vector3d.h. |
|
Definition at line 117 of file quaternion.cc. |
|
Definition at line 124 of file quaternion.cc. |
|
Definition at line 137 of file matrix3x3.cc. |
|
Definition at line 131 of file matrix3x3.cc. |
|
Definition at line 186 of file vector3d.cc. |
|
Definition at line 179 of file vector3d.cc. |
|
Definition at line 157 of file vector3d.cc. |
|
Definition at line 167 of file vector3d.cc. |
|
Definition at line 175 of file vector3d.cc. |
|
Definition at line 171 of file vector3d.cc. |
|
Definition at line 190 of file vector3d.cc. |
|
Definition at line 183 of file vector3d.cc. |
|
Definition at line 152 of file vector3d.cc. |
|
Definition at line 161 of file vector3d.cc. |
|
The coordinate of the vector (or point) Definition at line 45 of file vector3d.h. Referenced by BoundingBox::contains(), module(), normalize(), normalized(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), operator^(), rotate(), toString(), Vector3d(), and X(). |
|
The coordinate of the vector (or point) Definition at line 45 of file vector3d.h. Referenced by BoundingBox::contains(), module(), normalize(), normalized(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), operator^(), rotate(), toString(), Vector3d(), and Y(). |
|
The coordinate of the vector (or point) Definition at line 45 of file vector3d.h. Referenced by BoundingBox::contains(), module(), normalize(), normalized(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), operator^(), rotate(), toString(), Vector3d(), and Z(). |