se_core::Vector3 Class Reference

A 3 element vector that is represented by x,y,z coordinates. More...

#include <Vector3.hpp>

Inheritance diagram for se_core::Vector3:

se_core::Tuple3 se_core::Point3 List of all members.

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)
Vector3operator= (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_toperator[] (short index)
Tuple3operator+= (const Tuple3 &t1)
Tuple3operator-= (const Tuple3 &t1)
Tuple3operator *= (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

Detailed Description

A 3 element vector that is represented by x,y,z coordinates.

If this value represents a normal, then it should be normalized.

Author:
Kenji hiranabe, Rune Myrland

Definition at line 35 of file Vector3.hpp.


Member Enumeration Documentation

anonymous enum [inherited]
 

dimension

Enumeration values:
DIMENSION 

Definition at line 40 of file Tuple3.hpp.


Constructor & Destructor Documentation

se_core::Vector3::Vector3 coor_t  x,
coor_t  y,
coor_t  z
[inline]
 

Constructs and initializes a Vector3 from the specified xyz coordinates.

Parameters:
x the x coordinate
y the y coordinate
z the z coordinate

Definition at line 43 of file Vector3.hpp.

se_core::Vector3::Vector3 const coor_t  v[]  )  [inline]
 

Constructs and initializes a Vector3 from the specified array of length 3.

Parameters:
v the array of length 3 containing xyz in order

Definition at line 49 of file Vector3.hpp.

se_core::Vector3::Vector3 const Tuple3 t1  )  [inline]
 

Constructs and initializes a Vector3 from the specified Tuple3d.

Parameters:
t1 the Tuple3d containing the initialization x y z data

Definition at line 55 of file Vector3.hpp.

se_core::Vector3::Vector3  )  [inline]
 

Constructs and initializes a Vector3 to (0,0,0).

Definition at line 60 of file Vector3.hpp.


Member Function Documentation

void se_core::Tuple3::absolute  )  [inline, inherited]
 

Sets each component of this tuple to its absolute value.

Definition at line 298 of file Tuple3.hpp.

void se_core::Tuple3::absolute const Tuple3 t  )  [inline, inherited]
 

Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.

Parameters:
t the source tuple, which will not be modified

Definition at line 290 of file Tuple3.hpp.

void se_core::Tuple3::add const coor_t  dx,
const coor_t  dy,
const coor_t  dz
[inline, inherited]
 

Add deltas to coordinate.

Parameters:
dx Delta for x coordinate
dy Delta for y coordinate
dz Delta for z coordinate

Definition at line 180 of file Tuple3.hpp.

void se_core::Tuple3::add const Tuple3 t1  )  [inline, inherited]
 

Sets the value of this tuple to the vector sum of itself and tuple t1.

Parameters:
t1 the other tuple

Definition at line 166 of file Tuple3.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

void se_core::Tuple3::add const Tuple3 t1,
const Tuple3 t2
[inline, inherited]
 

Sets the value of this tuple to the vector sum of tuples t1 and t2.

Parameters:
t1 the first tuple
t2 the second tuple

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().

bray_t se_core::Vector3::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].

Parameters:
v1 the other vector
Returns:
the angle in radians in the range [0,PI]

Definition at line 23 of file Vector3.cpp.

References abs, coor_t, cross(), and length().

void se_core::Tuple3::clamp coor_t  min,
coor_t  max,
const Tuple3 t
[inline, inherited]
 

Clamps the tuple parameter to the range [low, high] and places the values into this tuple.

Parameters:
min the lowest value in the tuple after clamping
max the highest value in the tuple after clamping
t the source tuple, which will not be modified

Definition at line 324 of file Tuple3.hpp.

void se_core::Tuple3::clamp coor_t  min,
coor_t  max
[inline, inherited]
 

Clamps this tuple to the range [low, high].

Parameters:
min the lowest value in this tuple after clamping
max the highest value in this tuple after clamping

Definition at line 312 of file Tuple3.hpp.

void se_core::Tuple3::clampMax coor_t  max  )  [inline, inherited]
 

Clamps the maximum value of this tuple to the max parameter.

Parameters:
max the highest value in the tuple after clamping

Definition at line 368 of file Tuple3.hpp.

void se_core::Tuple3::clampMax coor_t  max,
const Tuple3 t
[inline, inherited]
 

Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.

Parameters:
max the highest value in the tuple after clamping
t the source tuple, which will not be modified

Definition at line 359 of file Tuple3.hpp.

void se_core::Tuple3::clampMin coor_t  min,
const Tuple3 t
[inline, inherited]
 

Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.

Parameters:
min the lowest value in the tuple after clamping
t the source tuple, which will not be modified

Definition at line 348 of file Tuple3.hpp.

void se_core::Tuple3::clampMin coor_t  min  )  [inline, inherited]
 

Clamps the minimum value of this tuple to the min parameter.

Parameters:
min the lowest value in this tuple after clamping

Definition at line 333 of file Tuple3.hpp.

void se_core::Vector3::cross const Vector3 v1,
const Vector3 v2
[inline]
 

Sets this vector to be the vector cross product of vectors v1 and v2.

Parameters:
v1 the first vector
v2 the second vector

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_.

Referenced by angle(), and rotate().

coor_t se_core::Vector3::dot const Vector3 v1  )  const [inline]
 

Computes the dot product of the this vector and vector v1.

Parameters:
v1 the other vector

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().

bool se_core::Tuple3::epsilonEquals const Tuple3 t1,
coor_t  epsilon
const [inherited]
 

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)].

Parameters:
t1 the tuple to be compared to this tuple
epsilon the threshold value

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().

bool se_core::Tuple3::equals const Tuple3 t1  )  const [inline, inherited]
 

Returns true if all of the data members of Tuple3 t1 are equal to the corresponding data members in this.

Parameters:
t1 the vector with which the comparison is made.

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().

void se_core::Tuple3::get Tuple3 t  )  const [inline, inherited]
 

Gets the value of this tuple and copies the values into the Tuple3.

Parameters:
t Tuple3 object into which that values of this object are copied

Definition at line 144 of file Tuple3.hpp.

References Assert, se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

void se_core::Tuple3::get coor_t  t[]  )  const [inline, inherited]
 

Copies the value of the elements of this tuple into the array t[].

Parameters:
t the array that will contain the values of the vector

Definition at line 134 of file Tuple3.hpp.

void se_core::Tuple3::interpolate const Tuple3 t1,
scale_t  alpha
[inline, inherited]
 

Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.

Parameters:
t1 the first tuple
alpha the alpha interpolation parameter

Definition at line 395 of file Tuple3.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

void se_core::Tuple3::interpolate const Tuple3 t1,
const Tuple3 t2,
scale_t  alpha
[inline, inherited]
 

Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.

Parameters:
t1 the first tuple
t2 the second tuple
alpha the alpha interpolation parameter

Definition at line 384 of file Tuple3.hpp.

Referenced by se_core::PosComponent::worldCoor(), and se_core::PosComponent::worldViewPoint().

bool se_core::Tuple3::isNan  )  const [inherited]
 

Definition at line 56 of file Tuple3.cpp.

bool se_core::Tuple3::isZero  )  const [inline, inherited]
 

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().

coor_t se_core::Vector3::length  )  const
 

Returns the length of this vector.

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().

coor_double_t se_core::Vector3::lengthSquared  )  const [inline]
 

Returns the squared length of this vector.

Returns:
the squared length of this vector

Definition at line 113 of file Vector3.hpp.

References coor_double_t.

void se_core::Tuple3::negate  )  [inline, inherited]
 

Negates the value of this vector in place.

Definition at line 221 of file Tuple3.hpp.

void se_core::Tuple3::negate const Tuple3 t1  )  [inline, inherited]
 

Sets the value of this tuple to the negation of tuple t1.

Parameters:
t1 the source vector

Definition at line 212 of file Tuple3.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

void se_core::Vector3::normalize  )  [inline]
 

Normalizes this vector in place.

Definition at line 89 of file Vector3.hpp.

References coor_t.

void se_core::Vector3::normalize const Vector3 v1  )  [inline]
 

Sets the value of this vector to the normalization of vector v1.

Parameters:
v1 the un-normalized vector

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().

Tuple3 se_core::Tuple3::operator * coor_t  s  )  const [inline, inherited]
 

Definition at line 466 of file Tuple3.hpp.

Tuple3& se_core::Tuple3::operator *= scale_t  s  )  [inline, inherited]
 

Definition at line 456 of file Tuple3.hpp.

Tuple3 se_core::Tuple3::operator+ const Tuple3 t1  )  const [inline, inherited]
 

Definition at line 460 of file Tuple3.hpp.

Tuple3& se_core::Tuple3::operator+= const Tuple3 t1  )  [inline, inherited]
 

Definition at line 448 of file Tuple3.hpp.

Tuple3 se_core::Tuple3::operator- const Tuple3 t1  )  const [inline, inherited]
 

Definition at line 463 of file Tuple3.hpp.

Tuple3& se_core::Tuple3::operator-= const Tuple3 t1  )  [inline, inherited]
 

Definition at line 452 of file Tuple3.hpp.

Vector3& se_core::Vector3::operator= const Tuple3 t  )  [inline]
 

Reimplemented from se_core::Tuple3.

Reimplemented in se_core::Point3.

Definition at line 166 of file Vector3.hpp.

bool se_core::Tuple3::operator== const Tuple3 t1  )  const [inline, inherited]
 

Definition at line 410 of file Tuple3.hpp.

coor_t& se_core::Tuple3::operator[] short  index  )  [inline, inherited]
 

Definition at line 428 of file Tuple3.hpp.

References Assert, and coor_t.

coor_t se_core::Tuple3::operator[] short  index  )  const [inline, inherited]
 

Definition at line 414 of file Tuple3.hpp.

References Assert, and coor_t.

void se_core::Tuple3::reset  )  [inline, inherited]
 

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().

void se_core::Vector3::rotate const Vector3 v,
const Euler3 a
 

Definition at line 155 of file Vector3.cpp.

void se_core::Vector3::rotate const Euler3 a  ) 
 

Definition at line 124 of file Vector3.cpp.

void se_core::Vector3::rotate const Vector3 v,
const Quat4 q
 

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_.

void se_core::Vector3::rotate const Quat4 q  ) 
 

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_.

void se_core::Vector3::rotateInverse const Euler3 a  ) 
 

Definition at line 130 of file Vector3.cpp.

void se_core::Vector3::rotateInverse const Quat4 q  ) 
 

Definition at line 116 of file Vector3.cpp.

References se_core::Quat4::inverse().

void se_core::Tuple3::scale scale_t  s  )  [inherited]
 

Sets the value of this tuple to the scalar multiplication of itself.

Parameters:
s the scalar value

Definition at line 40 of file Tuple3.cpp.

void se_core::Tuple3::scale scale_t  s,
const Tuple3 t1
[inherited]
 

Sets the value of this tuple to the scalar multiplication of tuple t1.

Parameters:
s the scalar value
t1 the source tuple

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().

void se_core::Tuple3::scaleAdd scale_t  s,
const Tuple3 t1,
const Tuple3 t2
[inline, inherited]
 

Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*t1 + t2).

Parameters:
s the scalar value
t1 the tuple to be multipled
t2 the tuple to be added

Definition at line 259 of file Tuple3.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

void se_core::Tuple3::scaleAdd scale_t  s,
const Tuple3 t1
[inline, inherited]
 

Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).

Parameters:
s the scalar value
t1 the tuple to be added

Definition at line 246 of file Tuple3.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

void se_core::Tuple3::set const Tuple3 t1  )  [inline, inherited]
 

Sets the value of this tuple to the value of the Tuple3 argument.

Parameters:
t1 the tuple to be copied

Definition at line 112 of file Tuple3.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

void se_core::Tuple3::set const coor_t  t[]  )  [inline, inherited]
 

Sets the value of this tuple from the 3 values specified in the array.

Parameters:
t the array of length 3 containing xyz in order

Definition at line 102 of file Tuple3.hpp.

void se_core::Tuple3::set coor_t  xvalue,
coor_t  yvalue,
coor_t  zvalue
[inline, inherited]
 

Sets the value of this tuple to the specified xyz coordinates.

Parameters:
xvalue the x coordinate
yvalue the y coordinate
zvalue the z coordinate

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().

void se_core::Vector3::setForward const coor_t  len,
const Euler3 a1
 

Definition at line 60 of file Vector3.cpp.

References se_core::Euler3::pitch_, and se_core::Euler3::yaw_.

void se_core::Vector3::setForward const coor_t  len,
const bray_t  yaw,
const bray_t  pitch
 

Definition at line 50 of file Vector3.cpp.

void se_core::Vector3::setForward const coor_t  len,
const bray_t  yaw
 

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().

void se_core::Tuple3::sub const Tuple3 t1  )  [inline, inherited]
 

Sets the value of this tuple to the vector difference of itself and tuple t1 (this = this - t1).

Parameters:
t1 the other tuple

Definition at line 202 of file Tuple3.hpp.

References se_core::Tuple3::x_, se_core::Tuple3::y_, and se_core::Tuple3::z_.

void se_core::Tuple3::sub const Tuple3 t1,
const Tuple3 t2
[inline, inherited]
 

Sets the value of this tuple to the vector difference of tuple t1 and t2 (this = t1 - t2).

Parameters:
t1 the first tuple
t2 the second tuple

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().

const char * se_core::Tuple3::toLog  )  const [inherited]
 

Definition at line 48 of file Tuple3.cpp.

References log_msg().

char * se_core::Tuple3::toString char *  buffer  )  const [inherited]
 

Returns a string that contains the values of this Tuple3.

The form is (x,y,z).

Returns:
the String representation

Definition at line 21 of file Tuple3.cpp.

coor_t se_core::Vector3::xzLength  )  const
 

Definition at line 18 of file Vector3.cpp.

coor_double_t se_core::Vector3::xzLengthSquared  )  const [inline]
 

Returns the squared length of this vector.

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().

bray_t se_core::Vector3::yaw  )  const
 

Definition at line 37 of file Vector3.cpp.

Referenced by se_basic::PhCirclingCamera::calcNext().


Member Data Documentation

const Vector3 se_core::Vector3::UNIT_FORWARD [static]
 

coor_t se_core::Tuple3::x_ [inherited]
 

The x coordinate The x part of the coordinate.

The (x_ >> COOR_SHIFT) will give the x coordinate of an terrain tile in an Area. (x & COOR_INSIDE_TILE_MASK) will give the x coordinate inside the the terrain tile, ranging from 0 (left) to (COOR_RES - 1) (right).

Definition at line 49 of file Tuple3.hpp.

Referenced by se_core::Tuple3::add(), se_ogre::ThingStaticGeometry::addToStaticGeometry(), se_ogre::ThingDebug::animate(), se_core::PhDefault::applyFriction(), se_ogre::O3dAreaComponent::areaOffset(), se_basic::NavMesh::barycentric(), se_core::DefaultTC::bounce(), se_core::CoDefault::bounce(), se_core::BoundingCylinder::center(), se_core::BoundingBox::center(), se_basic::NavMesh::center(), se_core::CollisionGrid::collisionCandidates(), se_ogre::O3dAreaComponent::compileStaticGeometry(), cross(), se_core::Point3::distanceL1(), se_core::Point3::distanceLinf(), se_core::Point3::distanceSquared(), dot(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), se_core::Tuple3::epsilonEquals(), se_core::Tuple3::equals(), se_core::Point3::eulerTowards(), se_basic::NavMeshArea::farthestLineOfSight(), se_basic::NavMesh::farthestLineOfSightXZ(), se_basic::NavMesh::find(), se_core::Tuple3::get(), se_basic::NavMeshArea::groundHeight(), se_core::BoundingCylinder::hasInside(), se_core::BoundingBox::hasInside(), se_basic::NavMesh::height(), se_core::PhysicsUtil::heightXZScaler(), se_basic::NavMeshArea::index(), se_core::Tuple3::interpolate(), se_basic::NavMesh::isInsideTriangle(), se_core::Area::isLegalLocalCoor(), se_core::Area::isLegalWorldCoor(), se_core::BoundingCylinder::isTouching(), se_core::BoundingBox::isTouching(), se_core::BoundingBox::isTouchingXZ(), se_basic::left(), se_core::Point2::lineIntersect(), se_core::Tuple3::negate(), se_core::Area::neighbour(), se_core::Perlin::noise(), se_core::ZoneAreaComponent::offset(), se_core::operator<<(), se_core::Point2::projectIsometric(), se_core::Point2::projectTopDown(), se_core::PhDefault::revertXZ(), se_core::Tuple3::scale(), se_core::Tuple3::scaleAdd(), se_core::Tuple3::set(), se_core::AxisAngle4::set(), se_core::Vector4::set3(), se_core::Point4::set3(), se_core::Pos::setXZ(), se_core::Tuple3::sub(), se_basic::NavMeshArea::terrainStyle(), se_ogre::O3dManager::updateStats(), se_basic::NavMesh::walls(), se_core::Point2::willAIntersectB(), se_core::Point3::xzDistanceLinf(), se_core::Point3::xzDistanceSquared(), and se_core::Point3::yawTowards().

coor_t se_core::Tuple3::y_ [inherited]
 

The y coordinate.

The height above the area. The units of the y coordinate is equal to the units of the x and z coordinates in 3D space.

Definition at line 56 of file Tuple3.hpp.

Referenced by se_core::CollisionAreaComponent::_testCollisionCandidates(), se_core::CollisionAreaComponent::_testCollisionCandidates2(), se_core::Tuple3::add(), se_ogre::ThingStaticGeometry::addToStaticGeometry(), se_core::PhDefault::applyFriction(), se_ogre::O3dAreaComponent::areaOffset(), se_basic::NavMesh::barycentric(), se_core::DefaultTC::bounce(), se_core::CoDefault::bounce(), se_core::CollisionComponent::bouncePoints(), se_basic::PhCirclingCamera::calcNext(), se_core::BoundingCylinder::center(), se_core::BoundingBox::center(), se_basic::NavMesh::center(), se_core::PhDefault::clampToGround(), se_ogre::O3dAreaComponent::compileStaticGeometry(), cross(), se_core::Point3::distanceL1(), se_core::Point3::distanceLinf(), se_core::Point3::distanceSquared(), dot(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), se_core::Tuple3::epsilonEquals(), se_core::Tuple3::equals(), se_core::Point3::eulerTowards(), se_basic::NavMeshArea::farthestLineOfSight(), se_basic::NavMesh::find(), se_core::Tuple3::get(), se_core::BoundingCylinder::hasInside(), se_core::BoundingBox::hasInside(), se_basic::NavMesh::height(), se_core::Tuple3::interpolate(), se_basic::NavMesh::isInsideTriangle(), se_core::BoundingCylinder::isTouching(), se_core::BoundingBox::isTouching(), se_core::Tuple3::negate(), se_core::Perlin::noise(), se_core::ZoneAreaComponent::offset(), se_core::operator<<(), se_core::Point2::projectIsometric(), se_core::DefaultTC::rebound(), se_core::CoDefault::rebound(), se_core::Tuple3::scale(), se_core::Tuple3::scaleAdd(), se_core::Tuple3::set(), se_core::AxisAngle4::set(), se_core::Vector4::set3(), se_core::Point4::set3(), se_core::Tuple3::sub(), se_ogre::O3dManager::updateStats(), and se_core::Point3::yDistance().

coor_t se_core::Tuple3::z_ [inherited]
 

The z coordinate.

The z part of the coordinate. The (z_ >> COOR_SHIFT) will give the y coordinate of an terrain tile in an Area. (y & COOR_INSIDE_TILE_MASK) will give the y coordinate inside the the terrain tile, ranging from 0 (top) to (COOR_RES - 1) (bottom).

Definition at line 65 of file Tuple3.hpp.

Referenced by se_core::Tuple3::add(), se_ogre::ThingStaticGeometry::addToStaticGeometry(), se_ogre::ThingDebug::animate(), se_core::PhDefault::applyFriction(), se_ogre::O3dAreaComponent::areaOffset(), se_basic::NavMesh::barycentric(), se_core::BoundingCylinder::center(), se_core::BoundingBox::center(), se_basic::NavMesh::center(), se_core::CollisionGrid::collisionCandidates(), se_ogre::O3dAreaComponent::compileStaticGeometry(), cross(), se_core::Point3::distanceL1(), se_core::Point3::distanceLinf(), se_core::Point3::distanceSquared(), dot(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), se_core::Tuple3::epsilonEquals(), se_core::Tuple3::equals(), se_core::Point3::eulerTowards(), se_basic::NavMeshArea::farthestLineOfSight(), se_basic::NavMesh::farthestLineOfSightXZ(), se_basic::NavMesh::find(), se_core::Tuple3::get(), se_basic::NavMeshArea::groundHeight(), se_core::BoundingCylinder::hasInside(), se_core::BoundingBox::hasInside(), se_basic::NavMesh::height(), se_core::PhysicsUtil::heightXZScaler(), se_basic::NavMeshArea::index(), se_core::Tuple3::interpolate(), se_basic::NavMesh::isInsideTriangle(), se_core::Area::isLegalLocalCoor(), se_core::Area::isLegalWorldCoor(), se_core::BoundingCylinder::isTouching(), se_core::BoundingBox::isTouching(), se_core::BoundingBox::isTouchingXZ(), se_basic::left(), se_core::Point2::lineIntersect(), se_core::Tuple3::negate(), se_core::Area::neighbour(), se_core::Perlin::noise(), se_core::ZoneAreaComponent::offset(), se_core::operator<<(), se_core::Point2::projectIsometric(), se_core::Point2::projectTopDown(), se_core::PhDefault::revertXZ(), se_core::Tuple3::scale(), se_core::Tuple3::scaleAdd(), se_core::Tuple3::set(), se_core::AxisAngle4::set(), se_core::Vector4::set3(), se_core::Point4::set3(), se_core::Pos::setXZ(), se_core::Tuple3::sub(), se_basic::NavMeshArea::terrainStyle(), se_ogre::O3dManager::updateStats(), se_basic::NavMesh::walls(), se_core::Point2::willAIntersectB(), se_core::Point3::xzDistanceLinf(), se_core::Point3::xzDistanceSquared(), and se_core::Point3::yawTowards().

const Vector3 se_core::Vector3::ZERO [static]
 


The documentation for this class was generated from the following files:

Home Page | SagaEngine trunk (updated nightly) reference generated Sun Dec 2 20:06:32 2007 by Doxygen version 1.3.9.1.

SourceForge.net Logo