#include <spDimensionVector3D.hpp>
Public Member Functions | |
vector3d () | |
vector3d (const T &Size) | |
vector3d (const T &VecX, const T &VecY, const T &VecZ) | |
vector3d (const T &VecX, const T &VecY, const T &VecZ, const T &VecW) | |
vector3d (const vector3d< T > &Other) | |
vector3d (const vector4d< T > &Other) | |
vector3d (const point2d< T > &Other) | |
vector3d (const size2d< T > &Other) | |
~vector3d () | |
bool | operator== (const vector3d< T > &other) const |
bool | operator!= (const vector3d< T > &other) const |
bool | operator<= (const vector3d< T > &other) const |
bool | operator>= (const vector3d< T > &other) const |
bool | operator< (const vector3d< T > &other) const |
bool | operator> (const vector3d< T > &other) const |
vector3d< T > & | operator++ () |
Pre-increment operator. | |
vector3d< T > & | operator++ (int) |
Post-increment operator. | |
vector3d< T > & | operator-- () |
Pre-decrement operator. | |
vector3d< T > & | operator-- (int) |
Post-decrement operator. | |
vector3d< T > | operator+ (const vector3d< T > &other) const |
vector3d< T > & | operator+= (const vector3d< T > &other) |
vector3d< T > | operator- (const vector3d< T > &other) const |
vector3d< T > & | operator-= (const vector3d< T > &other) |
vector3d< T > | operator/ (const vector3d< T > &other) const |
vector3d< T > & | operator/= (const vector3d< T > &other) |
vector3d< T > | operator* (const vector3d< T > &other) const |
vector3d< T > & | operator*= (const vector3d< T > &other) |
vector3d< T > | operator* (const T &Size) const |
vector3d< T > & | operator*= (const T &Size) |
vector3d< T > | operator/ (const T &Size) const |
vector3d< T > & | operator/= (const T &Size) |
vector3d< T > | operator- () const |
const T | operator[] (u32 i) const |
T & | operator[] (u32 i) |
T | dot (const vector3d< T > &other) const |
Returns the dot (or rather scalar) product between this and the given vector. | |
vector3d< T > | cross (const vector3d< T > &other) const |
Returns the cross (or rather vector) product between this and the given vector. | |
T | getLength () const |
Returns the vector's length. | |
T | getLengthSq () const |
Returns the square of the vector's length (Can be used for faster comparision between two distances). | |
T | getAngle (const vector3d< T > &other) const |
Returns the angle (in degrees) between this and the given vector. | |
vector3d< T > & | setInvert () |
vector3d< T > | getInvert () const |
vector3d< T > & | setRound (s32 Precision) |
vector3d< T > | getRound (s32 Precision) const |
bool | equal (const vector3d< T > &other, f32 Tolerance=math::ROUNDING_ERROR) const |
bool | empty () const |
void | make2DProjection (s32 ScreenWidth, s32 ScreenHeight) |
void | make2DProjection (f32 FOV, s32 ScreenWidth, s32 ScreenHeight) |
vector3d< T > & | setAbs () |
vector3d< T > | getAbs () const |
vector3d< T > & | normalize () |
vector3d< T > & | sign () |
vector3d< T > & | setLength (const T &Length) |
T | getDistanceFromSq (const vector3d< T > &other) const |
bool | isBetweenPoints (const vector3d< T > &Begin, const vector3d< T > &End) const |
bool | isPointInsideSphere (const vector3d< T > &Center, const f32 Radius) const |
vector3d< T > | getInterpolatedQuadratic (const vector3d< T > &v2, const vector3d< T > &v3, const T d) const |
vector3d< T > | getRotatedAxis (const T &Angle, vector3d< T > Axis) const |
EAxisTypes | getAxisType () const |
Returns the direction type of the dominant axis. | |
vector3d< T > | getNormal () const |
Returns a normal vector to this vector. | |
T | getMin () const |
Returns the smalest vector component. | |
T | getMax () const |
Returns the greatest vector component. | |
T | getVolume () const |
Returns the volume of the bounding box clamped by this vector (X*Y*Z). | |
vector3d< T > | getCoord () const |
template<typename B > | |
vector3d< B > | cast () const |
Static Public Member Functions | |
static bool | isPointOnSameSide (const vector3d< T > &P1, const vector3d< T > &P2, const vector3d< T > &A, const vector3d< T > &B) |
Public Attributes | |
T | X |
T | Y |
T | Z |
Vector 3D class which has the three components X, Y and Z. This is the main class used for 3D scene directions, positions, scaling etc.
sp::dim::vector3d< T >::vector3d | ( | ) | [inline] |
sp::dim::vector3d< T >::vector3d | ( | const T & | Size | ) | [inline] |
sp::dim::vector3d< T >::vector3d | ( | const T & | VecX, | |
const T & | VecY, | |||
const T & | VecZ | |||
) | [inline] |
sp::dim::vector3d< T >::vector3d | ( | const T & | VecX, | |
const T & | VecY, | |||
const T & | VecZ, | |||
const T & | VecW | |||
) | [inline] |
sp::dim::vector3d< T >::vector3d | ( | const vector3d< T > & | Other | ) | [inline] |
sp::dim::vector3d< T >::vector3d | ( | const vector4d< T > & | Other | ) |
sp::dim::vector3d< T >::vector3d | ( | const point2d< T > & | Other | ) |
sp::dim::vector3d< T >::vector3d | ( | const size2d< T > & | Other | ) |
sp::dim::vector3d< T >::~vector3d | ( | ) | [inline] |
vector3d<B> sp::dim::vector3d< T >::cast | ( | ) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::cross | ( | const vector3d< T > & | other | ) | const [inline] |
Returns the cross (or rather vector) product between this and the given vector.
T sp::dim::vector3d< T >::dot | ( | const vector3d< T > & | other | ) | const [inline] |
Returns the dot (or rather scalar) product between this and the given vector.
bool sp::dim::vector3d< T >::empty | ( | ) | const [inline] |
bool sp::dim::vector3d< T >::equal | ( | const vector3d< T > & | other, | |
f32 | Tolerance = math::ROUNDING_ERROR | |||
) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::getAbs | ( | ) | const [inline] |
T sp::dim::vector3d< T >::getAngle | ( | const vector3d< T > & | other | ) | const [inline] |
Returns the angle (in degrees) between this and the given vector.
EAxisTypes sp::dim::vector3d< T >::getAxisType | ( | ) | const [inline] |
Returns the direction type of the dominant axis.
vector3d<T> sp::dim::vector3d< T >::getCoord | ( | ) | const [inline] |
Just returns this vector. This is only required that this call can be used for several templates. Write your own vertex class for example and add this function so that it can be used for polygon clipping as well. Some templates expect a class with this function (e.g. 'mathCollisionLibrary::clipPolygon').
T sp::dim::vector3d< T >::getDistanceFromSq | ( | const vector3d< T > & | other | ) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::getInterpolatedQuadratic | ( | const vector3d< T > & | v2, | |
const vector3d< T > & | v3, | |||
const T | d | |||
) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::getInvert | ( | ) | const [inline] |
T sp::dim::vector3d< T >::getLength | ( | ) | const [inline] |
Returns the vector's length.
T sp::dim::vector3d< T >::getLengthSq | ( | ) | const [inline] |
Returns the square of the vector's length (Can be used for faster comparision between two distances).
T sp::dim::vector3d< T >::getMax | ( | ) | const [inline] |
Returns the greatest vector component.
T sp::dim::vector3d< T >::getMin | ( | ) | const [inline] |
Returns the smalest vector component.
vector3d<T> sp::dim::vector3d< T >::getNormal | ( | ) | const [inline] |
Returns a normal vector to this vector.
vector3d<T> sp::dim::vector3d< T >::getRotatedAxis | ( | const T & | Angle, | |
vector3d< T > | Axis | |||
) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::getRound | ( | s32 | Precision | ) | const [inline] |
T sp::dim::vector3d< T >::getVolume | ( | ) | const [inline] |
Returns the volume of the bounding box clamped by this vector (X*Y*Z).
bool sp::dim::vector3d< T >::isBetweenPoints | ( | const vector3d< T > & | Begin, | |
const vector3d< T > & | End | |||
) | const [inline] |
bool sp::dim::vector3d< T >::isPointInsideSphere | ( | const vector3d< T > & | Center, | |
const f32 | Radius | |||
) | const [inline] |
static bool sp::dim::vector3d< T >::isPointOnSameSide | ( | const vector3d< T > & | P1, | |
const vector3d< T > & | P2, | |||
const vector3d< T > & | A, | |||
const vector3d< T > & | B | |||
) | [inline, static] |
void sp::dim::vector3d< T >::make2DProjection | ( | s32 | ScreenWidth, | |
s32 | ScreenHeight | |||
) | [inline] |
void sp::dim::vector3d< T >::make2DProjection | ( | f32 | FOV, | |
s32 | ScreenWidth, | |||
s32 | ScreenHeight | |||
) | [inline] |
vector3d<T>& sp::dim::vector3d< T >::normalize | ( | ) | [inline] |
bool sp::dim::vector3d< T >::operator!= | ( | const vector3d< T > & | other | ) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::operator* | ( | const vector3d< T > & | other | ) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::operator* | ( | const T & | Size | ) | const [inline] |
vector3d<T>& sp::dim::vector3d< T >::operator*= | ( | const vector3d< T > & | other | ) | [inline] |
vector3d<T>& sp::dim::vector3d< T >::operator*= | ( | const T & | Size | ) | [inline] |
vector3d<T> sp::dim::vector3d< T >::operator+ | ( | const vector3d< T > & | other | ) | const [inline] |
vector3d<T>& sp::dim::vector3d< T >::operator++ | ( | ) | [inline] |
Pre-increment operator.
vector3d<T>& sp::dim::vector3d< T >::operator++ | ( | int | ) | [inline] |
Post-increment operator.
vector3d<T>& sp::dim::vector3d< T >::operator+= | ( | const vector3d< T > & | other | ) | [inline] |
vector3d<T> sp::dim::vector3d< T >::operator- | ( | const vector3d< T > & | other | ) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::operator- | ( | ) | const [inline] |
vector3d<T>& sp::dim::vector3d< T >::operator-- | ( | ) | [inline] |
Pre-decrement operator.
vector3d<T>& sp::dim::vector3d< T >::operator-- | ( | int | ) | [inline] |
Post-decrement operator.
vector3d<T>& sp::dim::vector3d< T >::operator-= | ( | const vector3d< T > & | other | ) | [inline] |
vector3d<T> sp::dim::vector3d< T >::operator/ | ( | const T & | Size | ) | const [inline] |
vector3d<T> sp::dim::vector3d< T >::operator/ | ( | const vector3d< T > & | other | ) | const [inline] |
vector3d<T>& sp::dim::vector3d< T >::operator/= | ( | const vector3d< T > & | other | ) | [inline] |
vector3d<T>& sp::dim::vector3d< T >::operator/= | ( | const T & | Size | ) | [inline] |
bool sp::dim::vector3d< T >::operator< | ( | const vector3d< T > & | other | ) | const [inline] |
bool sp::dim::vector3d< T >::operator<= | ( | const vector3d< T > & | other | ) | const [inline] |
bool sp::dim::vector3d< T >::operator== | ( | const vector3d< T > & | other | ) | const [inline] |
bool sp::dim::vector3d< T >::operator> | ( | const vector3d< T > & | other | ) | const [inline] |
bool sp::dim::vector3d< T >::operator>= | ( | const vector3d< T > & | other | ) | const [inline] |
T& sp::dim::vector3d< T >::operator[] | ( | u32 | i | ) | [inline] |
const T sp::dim::vector3d< T >::operator[] | ( | u32 | i | ) | const [inline] |
vector3d<T>& sp::dim::vector3d< T >::setAbs | ( | ) | [inline] |
vector3d<T>& sp::dim::vector3d< T >::setInvert | ( | ) | [inline] |
vector3d<T>& sp::dim::vector3d< T >::setLength | ( | const T & | Length | ) | [inline] |
vector3d<T>& sp::dim::vector3d< T >::setRound | ( | s32 | Precision | ) | [inline] |
vector3d<T>& sp::dim::vector3d< T >::sign | ( | ) | [inline] |
T sp::dim::vector3d< T >::X |
T sp::dim::vector3d< T >::Y |
T sp::dim::vector3d< T >::Z |