#include <cmath>
#include <iostream>
Go to the source code of this file.
|
static Vector3D | abs (const Vector3D &other) |
|
bool | operator< (const Vector3D &a, float scalar) |
|
float | Dot (const Vector3D &a, const Vector3D &b) |
|
Vector3D | operator* (const Vector3D &v, float s) |
|
Vector3D | operator* (const Vector3D &v, const Vector3D &s) |
|
Vector3D | operator/ (const Vector3D &v, float s) |
|
Vector3D | operator- (const Vector3D &v) |
|
float | Magnitude (const Vector3D &v) |
|
Vector3D | operator+ (const Vector3D &a, const Vector3D &b) |
|
Vector3D | operator- (const Vector3D &a, const Vector3D &b) |
|
Vector3D | Project (const Vector3D &a, const Vector3D &b) |
|
Vector3D | Normalize (const Vector3D &v) |
|
Vector3D | CrossProduct (const Vector3D &a, const Vector3D &b) |
|
Matrix3D | operator* (const Matrix3D &A, const Matrix3D &B) |
|
Vector3D | operator* (const Matrix3D &M, const Vector3D &v) |
|
std::ostream & | operator<< (std::ostream &os, const Vector3D &v) |
|
std::ostream & | operator<< (std::ostream &os, const Matrix3D &m) |
|
Returns the absolute value of the given vector.
- Parameters
-
a x b Produces a new vector perpendicular to a and b. (So long as a and b are not parallel which returns zero vector)
- Parameters
-
Compute the dot product of two Vector3D
- Parameters
-
Return the magnitude of a vector
- Parameters
-
Set a vectors magnitude to 1 Note: This is NOT generating a normal vector
- Parameters
-
Matrix Multiplication
- Parameters
-
Matrix multiply by a vector
- Parameters
-
Multiplication of a vector by a vector storing scalar values. Allows for element-wise multiplication.
- Parameters
-
v | vector1 |
s | the scalar vector |
Multiplication of a vector by a scalar values
- Parameters
-
Add two vectors together
- Parameters
-
Subtract two vectors, component-wise.
- Parameters
-
a - b
Negation of a vector Use Case: Sometimes it is handy to apply a force in an opposite direction
- Parameters
-
Division of a vector by a scalar value.
- Parameters
-
v | the vector |
s | scalar value |
bool operator< |
( |
const Vector3D & |
a, |
|
|
float |
scalar |
|
) |
| |
|
inline |
Checks if a given vectors components are all less than a scalar value. A more useful way to use this function may be to take the absolute value of the vector first.
- Parameters
-
a | the given |
scalar | the comparable scalar |
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Matrix3D & |
m |
|
) |
| |
|
inline |
Print a matrix to the given stream.
- Parameters
-
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Vector3D & |
v |
|
) |
| |
|
inline |
Print a vector to the given stream.
- Parameters
-
Vector Projection projects b onto a: proj_a_(b)
- Parameters
-