#include <Vector3.hpp>
Inheritance diagram for se_core::Vector3:
Public Types | |
enum | { DIMENSION = 3 } |
dimension More... | |
Public Member Functions | |
Vector3 (coor_t x, coor_t y, coor_t z) | |
Constructs and initializes a Vector3 from the specified xyz coordinates. | |
Vector3 (const coor_t v[]) | |
Constructs and initializes a Vector3 from the specified array of length 3. | |
Vector3 (const Tuple3 &t1) | |
Constructs and initializes a Vector3 from the specified Tuple3d. | |
Vector3 () | |
Constructs and initializes a Vector3 to (0,0,0). | |
void | cross (const Vector3 &v1, const Vector3 &v2) |
Sets this vector to be the vector cross product of vectors v1 and v2. | |
void | normalize (const Vector3 &v1) |
Sets the value of this vector to the normalization of vector v1. | |
void | normalize () |
Normalizes this vector in place. | |
coor_t | dot (const Vector3 &v1) const |
Computes the dot product of the this vector and vector v1. | |
coor_double_t | lengthSquared () const |
Returns the squared length of this vector. | |
coor_double_t | xzLengthSquared () const |
Returns the squared length of this vector. | |
coor_t | xzLength () const |
coor_t | length () const |
Returns the length of this vector. | |
bray_t | angle (const Vector3 &v1) const |
Returns the angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI]. | |
bray_t | yaw () const |
void | rotate (const Quat4 &q) |
void | rotate (const Vector3 &v, const Quat4 &q) |
void | rotateInverse (const Quat4 &q) |
void | rotate (const Euler3 &a) |
void | rotate (const Vector3 &v, const Euler3 &a) |
void | rotateInverse (const Euler3 &a) |
void | setForward (const coor_t len, const bray_t yaw) |
void | setForward (const coor_t len, const bray_t yaw, const bray_t pitch) |
void | setForward (const coor_t len, const Euler3 &a1) |
Vector3 & | operator= (const Tuple3 &t) |
void | set (coor_t xvalue, coor_t yvalue, coor_t zvalue) |
Sets the value of this tuple to the specified xyz coordinates. | |
void | set (const coor_t t[]) |
Sets the value of this tuple from the 3 values specified in the array. | |
void | set (const Tuple3 &t1) |
Sets the value of this tuple to the value of the Tuple3 argument. | |
void | reset () |
Resets all vector values to zero. | |
bool | isZero () const |
void | get (coor_t t[]) const |
Copies the value of the elements of this tuple into the array t[]. | |
void | get (Tuple3 *t) const |
Gets the value of this tuple and copies the values into the Tuple3. | |
void | add (const Tuple3 &t1, const Tuple3 &t2) |
Sets the value of this tuple to the vector sum of tuples t1 and t2. | |
void | add (const Tuple3 &t1) |
Sets the value of this tuple to the vector sum of itself and tuple t1. | |
void | add (const coor_t dx, const coor_t dy, const coor_t dz) |
Add deltas to coordinate. | |
void | sub (const Tuple3 &t1, const Tuple3 &t2) |
Sets the value of this tuple to the vector difference of tuple t1 and t2 (this = t1 - t2). | |
void | sub (const Tuple3 &t1) |
Sets the value of this tuple to the vector difference of itself and tuple t1 (this = this - t1). | |
void | negate (const Tuple3 &t1) |
Sets the value of this tuple to the negation of tuple t1. | |
void | negate () |
Negates the value of this vector in place. | |
void | scale (scale_t s, const Tuple3 &t1) |
Sets the value of this tuple to the scalar multiplication of tuple t1. | |
void | scale (scale_t s) |
Sets the value of this tuple to the scalar multiplication of itself. | |
void | scaleAdd (scale_t s, const Tuple3 &t1) |
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1). | |
void | scaleAdd (scale_t s, const Tuple3 &t1, const Tuple3 &t2) |
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*t1 + t2). | |
bool | equals (const Tuple3 &t1) const |
Returns true if all of the data members of Tuple3 t1 are equal to the corresponding data members in this. | |
bool | isNan () const |
bool | epsilonEquals (const Tuple3 &t1, coor_t epsilon) const |
Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false. | |
void | absolute (const Tuple3 &t) |
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple. | |
void | absolute () |
Sets each component of this tuple to its absolute value. | |
void | clamp (coor_t min, coor_t max) |
Clamps this tuple to the range [low, high]. | |
void | clamp (coor_t min, coor_t max, const Tuple3 &t) |
Clamps the tuple parameter to the range [low, high] and places the values into this tuple. | |
void | clampMin (coor_t min) |
Clamps the minimum value of this tuple to the min parameter. | |
void | clampMin (coor_t min, const Tuple3 &t) |
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple. | |
void | clampMax (coor_t max, const Tuple3 &t) |
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple. | |
void | clampMax (coor_t max) |
Clamps the maximum value of this tuple to the max parameter. | |
void | interpolate (const Tuple3 &t1, const Tuple3 &t2, scale_t alpha) |
Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2. | |
void | interpolate (const Tuple3 &t1, scale_t alpha) |
Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1. | |
char * | toString (char *buffer) const |
Returns a string that contains the values of this Tuple3. | |
const char * | toLog () const |
bool | operator== (const Tuple3 &t1) const |
coor_t | operator[] (short index) const |
coor_t & | operator[] (short index) |
Tuple3 & | operator+= (const Tuple3 &t1) |
Tuple3 & | operator-= (const Tuple3 &t1) |
Tuple3 & | operator *= (scale_t s) |
Tuple3 | operator+ (const Tuple3 &t1) const |
Tuple3 | operator- (const Tuple3 &t1) const |
Tuple3 | operator * (coor_t s) const |
Public Attributes | |
coor_t | x_ |
The x coordinate The x part of the coordinate. | |
coor_t | y_ |
The y coordinate. | |
coor_t | z_ |
The z coordinate. | |
Static Public Attributes | |
const Vector3 | ZERO |
const Vector3 | UNIT_FORWARD |
If this value represents a normal, then it should be normalized.
Definition at line 35 of file Vector3.hpp.
|
dimension
Definition at line 40 of file Tuple3.hpp. |
|
Constructs and initializes a Vector3 from the specified xyz coordinates.
Definition at line 43 of file Vector3.hpp. |
|
Constructs and initializes a Vector3 from the specified array of length 3.
Definition at line 49 of file Vector3.hpp. |
|
Constructs and initializes a Vector3 from the specified Tuple3d.
Definition at line 55 of file Vector3.hpp. |
|
Constructs and initializes a Vector3 to (0,0,0).
Definition at line 60 of file Vector3.hpp. |
|
Sets each component of this tuple to its absolute value.
Definition at line 298 of file Tuple3.hpp. |
|
Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
Definition at line 290 of file Tuple3.hpp. |
|
Add deltas to coordinate.
Definition at line 180 of file Tuple3.hpp. |
|
Sets the value of this tuple to the vector sum of itself and tuple t1.
Definition at line 166 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Sets the value of this tuple to the vector sum of tuples t1 and t2.
Definition at line 156 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. Referenced by se_core::PhDefault::applyForces(), se_core::PhDefault::applyFriction(), se_core::CollisionComponent::bouncePoint(), se_core::CollisionComponent::bouncePoints(), se_basic::PhCirclingCamera::calcNext(), se_core::CollisionAreaComponent::farthestLineOfSight(), se_basic::NavMeshArea::farthestLineOfSight(), se_basic::NavMesh::findExit(), se_core::CollisionGrid::insert(), se_core::CollisionGrid::move(), se_core::Area::touchedTerrain(), se_core::CollisionComponent::updateAreaCovered(), and se_core::PhDefault::updateForces(). |
|
Returns the angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI].
Definition at line 23 of file Vector3.cpp. |
|
Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
Definition at line 324 of file Tuple3.hpp. |
|
Clamps this tuple to the range [low, high].
Definition at line 312 of file Tuple3.hpp. |
|
Clamps the maximum value of this tuple to the max parameter.
Definition at line 368 of file Tuple3.hpp. |
|
Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
Definition at line 359 of file Tuple3.hpp. |
|
Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
Definition at line 348 of file Tuple3.hpp. |
|
Clamps the minimum value of this tuple to the min parameter.
Definition at line 333 of file Tuple3.hpp. |
|
Sets this vector to be the vector cross product of vectors v1 and v2.
Definition at line 67 of file Vector3.hpp. References se_core::Tuple3::set(), se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Computes the dot product of the this vector and vector v1.
Definition at line 102 of file Vector3.hpp. References coor_t, se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. Referenced by se_core::DefaultTC::bounce(), se_core::CoDefault::bounce(), se_core::Point3::nearestPoint(), se_core::DefaultTC::rebound(), and se_core::CoDefault::rebound(). |
|
Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].
Definition at line 9 of file Tuple3.cpp. References abs, se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. Referenced by se_core::ViewPoint::viewPointEquals(). |
|
Returns true if all of the data members of Tuple3 t1 are equal to the corresponding data members in this.
Definition at line 270 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. Referenced by se_core::ViewPoint::viewPointEquals(). |
|
Gets the value of this tuple and copies the values into the Tuple3.
Definition at line 144 of file Tuple3.hpp. References Assert, se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Copies the value of the elements of this tuple into the array t[].
Definition at line 134 of file Tuple3.hpp. |
|
Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.
Definition at line 395 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.
Definition at line 384 of file Tuple3.hpp. Referenced by se_core::PosComponent::worldCoor(), and se_core::PosComponent::worldViewPoint(). |
|
Definition at line 56 of file Tuple3.cpp. |
|
Definition at line 126 of file Tuple3.hpp. Referenced by se_core::PhDefault::applyFriction(), se_core::DefaultTC::bounce(), se_core::CoDefault::bounce(), se_core::DefaultTC::rebound(), and se_core::CoDefault::rebound(). |
|
Returns the length of this vector.
Definition at line 13 of file Vector3.cpp. Referenced by angle(), se_basic::PhCirclingCamera::calcNext(), se_basic::NavMeshArea::farthestLineOfSight(), and se_core::Point3::nearestPoint(). |
|
Returns the squared length of this vector.
Definition at line 113 of file Vector3.hpp. References coor_double_t. |
|
Negates the value of this vector in place.
Definition at line 221 of file Tuple3.hpp. |
|
Sets the value of this tuple to the negation of tuple t1.
Definition at line 212 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Normalizes this vector in place.
Definition at line 89 of file Vector3.hpp. References coor_t. |
|
Sets the value of this vector to the normalization of vector v1.
Definition at line 81 of file Vector3.hpp. References se_core::Tuple3::set(). Referenced by se_core::PhDefault::applyFriction(), se_core::DefaultTC::bounce(), se_core::CoDefault::bounce(), se_core::DefaultTC::rebound(), and se_core::CoDefault::rebound(). |
|
Definition at line 466 of file Tuple3.hpp. |
|
Definition at line 456 of file Tuple3.hpp. |
|
Definition at line 460 of file Tuple3.hpp. |
|
Definition at line 448 of file Tuple3.hpp. |
|
Definition at line 463 of file Tuple3.hpp. |
|
Definition at line 452 of file Tuple3.hpp. |
|
Reimplemented from se_core::Tuple3. Reimplemented in se_core::Point3. Definition at line 166 of file Vector3.hpp. |
|
Definition at line 410 of file Tuple3.hpp. |
|
Definition at line 428 of file Tuple3.hpp. |
|
Definition at line 414 of file Tuple3.hpp. |
|
Resets all vector values to zero.
Definition at line 122 of file Tuple3.hpp. Referenced by se_basic::NavMesh::findExit(), se_core::SpawnComponentParser::readSpawnPoint(), se_basic::SimpleActorParser::readSpawnPoint(), and se_core::Move::resetForces(). |
|
Definition at line 155 of file Vector3.cpp. |
|
Definition at line 124 of file Vector3.cpp. |
|
Definition at line 139 of file Vector3.cpp. References cross(), se_core::Tuple3::scale(), se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Definition at line 101 of file Vector3.cpp. References cross(), se_core::Tuple3::scale(), se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_. |
|
Definition at line 130 of file Vector3.cpp. |
|
Definition at line 116 of file Vector3.cpp. References se_core::Quat4::inverse(). |
|
Sets the value of this tuple to the scalar multiplication of itself.
Definition at line 40 of file Tuple3.cpp. |
|
Sets the value of this tuple to the scalar multiplication of tuple t1.
Definition at line 32 of file Tuple3.cpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. Referenced by se_core::PhDefault::applyFriction(), se_core::DefaultTC::bounce(), se_core::CoDefault::bounce(), se_core::CollisionAreaComponent::farthestLineOfSight(), se_basic::NavMesh::findExit(), se_core::Point3::nearestPoint(), se_core::DefaultTC::rebound(), se_core::CoDefault::rebound(), and rotate(). |
|
Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*t1 + t2).
Definition at line 259 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).
Definition at line 246 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Sets the value of this tuple to the value of the Tuple3 argument.
Definition at line 112 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Sets the value of this tuple from the 3 values specified in the array.
Definition at line 102 of file Tuple3.hpp. |
|
Sets the value of this tuple to the specified xyz coordinates.
Definition at line 92 of file Tuple3.hpp. Referenced by se_core::Pos::areaCoor(), se_core::CollisionComponent::bouncePoint(), se_basic::PhCirclingCamera::calcNext(), cross(), se_basic::NavMesh::findNearest(), se_basic::SimpleArea::force(), se_basic::NavMeshArea::force(), normalize(), se_basic::NavMeshArea::path(), se_core::SpawnComponentParser::readSpawnPoint(), se_basic::SimpleActorParser::readSpawnPoint(), se_core::Area::touchedTerrain(), and se_core::PosComponent::worldCoor(). |
|
Definition at line 60 of file Vector3.cpp. References se_core::Euler3::pitch_, and se_core::Euler3::yaw_. |
|
Definition at line 50 of file Vector3.cpp. |
|
Definition at line 43 of file Vector3.cpp. Referenced by se_basic::PhCirclingCamera::calcNext(), se_core::Move::changeMovement(), se_core::Move::changeSpeed(), se_core::Move::changeYaw(), se_basic::NavMeshArea::farthestLineOfSight(), and se_core::PhysicsUtil::heightXZScaler(). |
|
Sets the value of this tuple to the vector difference of itself and tuple t1 (this = this - t1).
Definition at line 202 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. |
|
Sets the value of this tuple to the vector difference of tuple t1 and t2 (this = t1 - t2).
Definition at line 192 of file Tuple3.hpp. References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_. Referenced by se_core::Pos::areaCoor(), se_core::DefaultTC::bounce(), se_core::CoDefault::bounce(), se_basic::PhCirclingCamera::calcNext(), se_basic::NavMeshArea::doesTouchVoid(), se_basic::NavMeshArea::farthestLineOfSight(), se_basic::NavMeshArea::findNearest(), se_basic::NavMeshArea::isLineOfSight(), se_core::Point3::nearestPoint(), se_basic::NavMeshArea::path(), se_core::DefaultTC::rebound(), se_core::CoDefault::rebound(), se_basic::NavMeshArea::slideAngle(), and se_basic::NavMeshArea::wallAngle(). |
|
Definition at line 48 of file Tuple3.cpp. References log_msg(). |
|
Returns a string that contains the values of this Tuple3. The form is (x,y,z).
Definition at line 21 of file Tuple3.cpp. |
|
Definition at line 18 of file Vector3.cpp. |
|
Returns the squared length of this vector.
Definition at line 124 of file Vector3.hpp. References coor_double_t. Referenced by se_core::PhDefault::applyFriction(). |
|
Definition at line 37 of file Vector3.cpp. Referenced by se_basic::PhCirclingCamera::calcNext(). |
|
|
|
|
|
|
|
Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:32 2007 by Doxygen version 1.3.9.1.