#include <RmMath.h>
Public Member Functions | |
| RmVector3D () | |
| Constructor. | |
| RmVector3D (float x, float y, float z) | |
| Constructor. | |
| float | DotProduct (const RmVector3D &v) const |
| Dot product. | |
| RmVector3D | CrossProduct (const RmVector3D &v) const |
| Cross product. | |
| float | Magnitude () const |
| Magnitude of vector. | |
| float | Normalize () |
| Normalize this vector. | |
| void | operator= (const RmVector3D &src) |
| operator = | |
| RmVector3D | operator+ (const RmVector3D &src) const |
| operator + | |
| RmVector3D | operator- (const RmVector3D &src) const |
| operator - | |
| void | operator+= (const RmVector3D &src) |
| operator += | |
| void | operator-= (const RmVector3D &src) |
| operator -= | |
| RmVector3D | operator * (const RmMatrix4x4 &mat) const |
| operator * | |
| void | operator *= (const RmMatrix4x4 &mat) |
| operator *= | |
| RmVector3D | operator * (float val) const |
| operator * | |
| RmVector3D | operator/ (float val) const |
| operator / | |
| void | operator *= (float val) |
| operator *= | |
| void | operator/= (float val) |
| operator /= | |
Public Attributes | |
| float | x |
| x component | |
| float | y |
| y component | |
| float | z |
| z component | |
3D Vector Class
|
|
Constructor. Constructor |
|
||||||||||||||||
|
Constructor. Constructor
|
|
|
Cross product.
Cross product vector = { v1.y * v2.z - v1.z * v2.y,
|
|
|
Dot product. Dot product = v1.x * v2.x + v1.y * v2.y + v1.z * v2.z
|
|
|
Magnitude of vector. Magnitude of vector is sqrt(x*x+y*y+z*z)
|
|
|
Normalize this vector. Normalize vector
x = x / Magnitude of vector
|
|
|
operator * Multiplied by single float value All component of vector is multiplied by this value.
|
|
|
operator * Multiplied by matrix Result vector = v * mat
|
|
|
operator *= Multiplied by single float value All component of vector is multiplied by this value. Result is put to this vector.
|
|
|
operator *= Multiplied by matrix Result vector = v * mat. And result is put to this vector.
|
|
|
operator + Addition operator.
|
|
|
operator += Addition operator. Result is put to this vector.
|
|
|
operator - Subtraction operator.
|
|
|
operator -= Subtraction operator. Result is put to this vector.
|
|
|
operator / Divide by single float value All component of vector is divided by this value.
|
|
|
operator /= Divide by single float value All component of vector is divided by this value. Result is put to this vector.
|
|
|
operator = Assignment operator
|
1.3.6