![]() |
Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
|
1 x 3 vector to be used for math. More...
#include <vec3.h>
Public Member Functions | |
| Vec3 (double newX=0, double newY=0, double newZ=0) | |
| Constructor that sets up a new zero vector. More... | |
| Vec3 (rune::Vec2) | |
| Construct a Vec3 from a Vec2 by dropping the z coordinate. More... | |
| Vec3 | operator- (const Vec3 &right) |
| Overload of subtraction operator. More... | |
| Vec3 | operator- () |
| Overload of negation operator. More... | |
| Vec3 | operator+ (const Vec3 &right) |
| Overload of addition operator. More... | |
| Vec3 | operator* (const Vec3 &right) |
| Overload of multiplication operator. More... | |
| Vec3 | operator/ (const Vec3 &right) |
| Overload of division operator. More... | |
| Vec3 | operator/ (double scalar) |
| Overload of division operator for a scalar on the right. More... | |
| Vec3 & | operator-= (const Vec3 &right) |
| Overload of -= operator. More... | |
| Vec3 & | operator+= (const Vec3 &right) |
| Overload of += operator. More... | |
| Vec3 & | operator*= (const Vec3 &right) |
| Overload of *= operator. More... | |
| Vec3 & | operator*= (const double right) |
| Overload of *= operator for a scalar multiplier. More... | |
| Vec3 | operator* (double scalar) |
| Overload of multiplication operator for a scalar on the right. More... | |
| bool | operator== (const Vec3 &right) |
| Overload of comparator operator. More... | |
| bool | operator!= (const Vec3 &right) |
| Overload of != operator. More... | |
| double | magnitude (void) |
| Determine the magnitude of the vector. More... | |
| std::ostream & | operator<< (std::ostream &os, const rune::Vec3 &vector) |
| double | dotProduct (const rune::Vec3 &vector1, const rune::Vec3 &vector2) |
| rune::Vec3 | normalize (const rune::Vec3 &vector) |
| rune::Vec3 | crossProduct (const rune::Vec3 &vec1, const rune::Vec3 &vec2) |
| rune::Vec3 | operator* (double scalar, const rune::Vec3 &vec) |
Public Attributes | |
| double | x |
| X coordinate of the vector. | |
| double | y |
| Y coordinate of the vector. | |
| double | z |
| Z coordinate of the vector. | |
1 x 3 vector to be used for math.
| rune::Vec3::Vec3 | ( | double | newX = 0, |
| double | newY = 0, |
||
| double | newZ = 0 |
||
| ) |
Constructor that sets up a new zero vector.
| newX | The new X coordinate for the vector. |
| newY | The new Y coordinate for the vector. |
| newZ | The new Z coordinate for the vector. |
| rune::Vec3::Vec3 | ( | rune::Vec2 | castedVector | ) |
Construct a Vec3 from a Vec2 by dropping the z coordinate.
| castedVector | The vector to be converted to a rune::Vec2 |
| rune::Vec3 crossProduct | ( | const rune::Vec3 & | vec1, |
| const rune::Vec3 & | vec2 | ||
| ) |
| vec1 | The first vector to be used in the cross product. |
| vec2 | The second vector to be used in the cross product. |
| double dotProduct | ( | const rune::Vec3 & | vector1, |
| const rune::Vec3 & | vector2 | ||
| ) |
| vector1 | The first vector of the dot product. |
| vector2 | The second vector of the dot product. |
| double rune::Vec3::magnitude | ( | void | ) |
Determine the magnitude of the vector.
| rune::Vec3 normalize | ( | const rune::Vec3 & | vector | ) |
| vector | The vector to be normalized. |
| bool rune::Vec3::operator!= | ( | const Vec3 & | right | ) |
Overload of != operator.
| right | The vector to compare to. |
| rune::Vec3 rune::Vec3::operator* | ( | const Vec3 & | right | ) |
Overload of multiplication operator.
| right | The vector to be multiplied by. |
| rune::Vec3 rune::Vec3::operator* | ( | double | scalar | ) |
Overload of multiplication operator for a scalar on the right.
| scalar | The scalar to be multiplied by. |
| rune::Vec3 operator* | ( | double | scalar, |
| const rune::Vec3 & | vec | ||
| ) |
| scalar | The scalar to be multiplied by. |
| vec | The matrix being multiplied with. |
| rune::Vec3 & rune::Vec3::operator*= | ( | const double | right | ) |
Overload of *= operator for a scalar multiplier.
| right | The scalar to be multiplied by. |
| rune::Vec3 & rune::Vec3::operator*= | ( | const Vec3 & | right | ) |
Overload of *= operator.
| right | The vector to be multiplied by. |
| rune::Vec3 rune::Vec3::operator+ | ( | const Vec3 & | right | ) |
Overload of addition operator.
| right | The vector to be added. |
| rune::Vec3 & rune::Vec3::operator+= | ( | const Vec3 & | right | ) |
Overload of += operator.
| right | The vector to be added. |
| rune::Vec3 rune::Vec3::operator- | ( | ) |
Overload of negation operator.
| rune::Vec3 rune::Vec3::operator- | ( | const Vec3 & | right | ) |
Overload of subtraction operator.
| right | The vector to be subtracted. |
| rune::Vec3 & rune::Vec3::operator-= | ( | const Vec3 & | right | ) |
Overload of -= operator.
| right | The vector to be subtracted by. |
| rune::Vec3 rune::Vec3::operator/ | ( | const Vec3 & | right | ) |
Overload of division operator.
| right | The vector to be divided by. |
| rune::Vec3 rune::Vec3::operator/ | ( | double | scalar | ) |
Overload of division operator for a scalar on the right.
| scalar | The scalar to be divided by. |
| std::ostream & operator<< | ( | std::ostream & | os, |
| const rune::Vec3 & | vector | ||
| ) |
| os | Output stream that the vector should be printed to. |
| vector | Vector to be printed. |
| bool rune::Vec3::operator== | ( | const Vec3 & | right | ) |
Overload of comparator operator.
| right | The vector to compare to. |