i6engine
1.0
|
Implements 3-dimensional vectors. More...
#include <D:/Projekte/i6engine/libs/i6engine-math/include/i6engine/math/i6eVector.h>
Public Member Functions | |
i6eVector () | |
Creates a new vector with all values set to 0. More... | |
i6eVector (const double x, const double y, const double z) | |
Creates a new vector with all values set to the given values. More... | |
i6eVector (const Ogre::Vector3 &ogre) | |
Copy constructor with vector from Ogre. More... | |
i6eVector (const btVector3 &bullet) | |
Copy constructor with vector from Bullet. More... | |
i6eVector (const std::string &s) | |
i6eVector (const std::map< std::string, std::string > ¶ms, const std::string &prefix) | |
~i6eVector () | |
destructor More... | |
double | getX () const |
getters for the values of the Vector More... | |
double | getY () const |
double | getZ () const |
void | setX (const double x) |
setters for the values of the Vector More... | |
void | setY (const double y) |
void | setZ (const double z) |
i6eVector | operator+ (const i6eVector &b) const |
Operator '+' for Vectors. More... | |
i6eVector | operator- (const i6eVector &b) const |
Operator '-' for Vectors. More... | |
i6eVector | operator* (const i6eVector &b) const |
operator '*' for vectors More... | |
i6eVector | operator* (const double b) const |
operator '*' for scalars More... | |
i6eVector | operator/ (const double b) const |
Operator '/' for Vectors with a scalar. More... | |
i6eVector | operator+= (const i6eVector &b) |
Operator '+=' for Vectors. More... | |
i6eVector | operator-= (const i6eVector &b) |
Operator '-=' for Vectors. More... | |
bool | operator== (const i6eVector &b) const |
Operator '==' for Vector. More... | |
bool | operator!= (const i6eVector &b) const |
Operator '!=' for Vector. More... | |
i6eVector | normalize () const |
returns the normalized Vector More... | |
void | insertInMap (const std::string &prefix, std::map< std::string, std::string > &map) const |
inserts this vector into an attributeMap using the given prefix More... | |
void | mulComponents (const i6eVector &b) |
muliplies two Vectors per component More... | |
bool | isValid () const |
determins whether the vector contains valid data This has to be set by the user. Operations resulting in components becoming NaN or Infinity will NOT change this flag More... | |
void | setValid (bool b) |
double | length () const |
length of the Vector More... | |
Ogre::Vector3 | toOgre () const |
Convert whole vector to Ogre. More... | |
Ogre::Vector2 | toOgre2 () const |
Convert x and z values to a 2-dimensional vector in Ogre. More... | |
btVector3 | toBullet () const |
Convert whole vector to Bullet. More... | |
std::string | toString () const |
converts Vector to std::string More... | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
serializer for the vector More... | |
Static Public Member Functions | |
static double | scalProd (const i6eVector &a, const i6eVector &b) |
operator '*' for vectors More... | |
static i6eVector | crossProd (const i6eVector &a, const i6eVector &b) |
Operator '*' for Vectors (cross product) More... | |
static double | crossAngle (const i6eVector &a, const i6eVector &b) |
angle between two vectors More... | |
static double | crossAngleSigned (const i6eVector &a, const i6eVector &b, const i6eVector &n) |
signed angle between two vectors More... | |
Static Public Attributes | |
static const i6eVector | ZERO |
Implements 3-dimensional vectors.
Implements 3-dimensional vectors. Conversion of vectors from Ogre and Bullet possible.
Definition at line 48 of file i6eVector.h.
|
inline |
Creates a new vector with all values set to 0.
Definition at line 57 of file i6eVector.h.
|
inline |
Creates a new vector with all values set to the given values.
Definition at line 63 of file i6eVector.h.
|
explicit |
Copy constructor with vector from Ogre.
[in] | ogre | Vector to copy |
|
explicit |
Copy constructor with vector from Bullet.
[in] | bullet | Vector to copy |
|
explicit |
i6e::math::i6eVector::i6eVector | ( | const std::map< std::string, std::string > & | params, |
const std::string & | prefix | ||
) |
|
inline |
destructor
Definition at line 98 of file i6eVector.h.
angle between two vectors
[in] | a | first vector |
[in] | b | second vector |
|
static |
signed angle between two vectors
[in] | a | starting vector |
[in] | b | end vector |
[in] | n | normal vector of plan containing a and b |
|
inlinestatic |
Operator '*' for Vectors (cross product)
Definition at line 209 of file i6eVector.h.
|
inline |
getters for the values of the Vector
Definition at line 104 of file i6eVector.h.
|
inline |
Definition at line 107 of file i6eVector.h.
|
inline |
Definition at line 110 of file i6eVector.h.
void i6e::math::i6eVector::insertInMap | ( | const std::string & | prefix, |
std::map< std::string, std::string > & | map | ||
) | const |
inserts this vector into an attributeMap using the given prefix
bool i6e::math::i6eVector::isValid | ( | ) | const |
determins whether the vector contains valid data This has to be set by the user. Operations resulting in components becoming NaN or Infinity will NOT change this flag
double i6e::math::i6eVector::length | ( | ) | const |
length of the Vector
|
inline |
i6eVector i6e::math::i6eVector::normalize | ( | ) | const |
returns the normalized Vector
|
inline |
Operator '!=' for Vector.
Definition at line 197 of file i6eVector.h.
operator '*' for vectors
Definition at line 144 of file i6eVector.h.
|
inline |
operator '*' for scalars
Definition at line 151 of file i6eVector.h.
Operator '+' for Vectors.
Definition at line 130 of file i6eVector.h.
Operator '+=' for Vectors.
Definition at line 172 of file i6eVector.h.
Operator '-' for Vectors.
Definition at line 137 of file i6eVector.h.
Operator '-=' for Vectors.
Definition at line 182 of file i6eVector.h.
|
inline |
Operator '/' for Vectors with a scalar.
Definition at line 165 of file i6eVector.h.
bool i6e::math::i6eVector::operator== | ( | const i6eVector & | b | ) | const |
Operator '==' for Vector.
|
inlinestatic |
operator '*' for vectors
Definition at line 158 of file i6eVector.h.
|
inline |
serializer for the vector
Definition at line 290 of file i6eVector.h.
void i6e::math::i6eVector::setValid | ( | bool | b | ) |
|
inline |
setters for the values of the Vector
Definition at line 117 of file i6eVector.h.
|
inline |
Definition at line 120 of file i6eVector.h.
|
inline |
Definition at line 123 of file i6eVector.h.
btVector3 i6e::math::i6eVector::toBullet | ( | ) | const |
Convert whole vector to Bullet.
Ogre::Vector3 i6e::math::i6eVector::toOgre | ( | ) | const |
Convert whole vector to Ogre.
Ogre::Vector2 i6e::math::i6eVector::toOgre2 | ( | ) | const |
Convert x and z values to a 2-dimensional vector in Ogre.
std::string i6e::math::i6eVector::toString | ( | ) | const |
converts Vector to std::string
converts the vector to a std::string using the Format "x y z"
|
static |
Definition at line 52 of file i6eVector.h.