se_core::Point3 Class Reference

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

#include <Point3.hpp>

Inheritance diagram for se_core::Point3:

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

Public Types

enum  { DIMENSION = 3 }
 dimension More...

Public Member Functions

 Point3 (coor_t x, coor_t y, coor_t z)
 Constructs and initializes a Point3 from the specified xyz coordinates.
 Point3 (const coor_t p[])
 Constructs and initializes a Point3 from the specified array.
 Point3 (const Tuple3 &t1)
 Point3 ()
 Constructs and initializes a Point3 to (0,0,0).
coor_double_t distanceSquared (const Point3 &p1) const
 Computes the square of the distance between this point and point p1.
coor_t distance (const Point3 &p1) const
 Returns the distance between this point and point p1.
coor_t distanceL1 (const Point3 &p1) const
 Computes the L-1 (Manhattan) distance between this point and point p1.
coor_t distanceLinf (const Point3 &p1) const
 Computes the L-infinite distance between this point and point p1.
void project (const Point4 &p1)
 Multiplies each of the x,y,z components of the Point4 parameter by 1/w and places the projected values into this point.
coor_double_t xzDistanceSquared (const Point3 &c) const
 Get the distance between the coordinates to the second power.
coor_t xzDistanceLinf (const Point3 &c) const
 Gets the distance between two coordinates along the x or the z axis, whichever is longest.
coor_t yDistance (const Point3 &c) const
 Gets the distance between two coordinates along the y axis.
coor_tile_t xTile () const
 Get the area terrain tile x coordinate.
coor_tile_t zTile () const
 Get the area terrain tile z coordinate.
coor_in_t xInsideTile () const
 Get the x coordinate inside the terrain tile.
coor_in_t zInsideTile () const
 Get the z coordinate inside the terrain tile.
bray_t yawTowards (const Point3 &c) const
 Calc angle between two coordinates in the xz-plane.
void eulerTowards (const Point3 &c, Euler3 &dest) const
void nearestPoint (const Point3 &pt1, const Point3 &pt2, const Point3 &testPoint)
Point3operator= (const Tuple3 &t)
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 rotate (const Euler3 &a)
void rotate (const Vector3 &v, const Euler3 &a)
void rotateInverse (const Quat4 &q)
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)
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 point that is represented by x,y,z coordinates.

Author:
Kenji Hiranabe, Rune Myrland

Definition at line 33 of file Point3.hpp.


Member Enumeration Documentation

anonymous enum [inherited]
 

dimension

Enumeration values:
DIMENSION 

Definition at line 40 of file Tuple3.hpp.


Constructor & Destructor Documentation

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

Constructs and initializes a Point3 from the specified xyz coordinates.

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

Definition at line 41 of file Point3.hpp.

se_core::Point3::Point3 const coor_t  p[]  )  [inline]
 

Constructs and initializes a Point3 from the specified array.

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

Definition at line 47 of file Point3.hpp.

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

Definition at line 53 of file Point3.hpp.

se_core::Point3::Point3  )  [inline]
 

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

Definition at line 58 of file Point3.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 [inherited]
 

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, se_core::Vector3::cross(), and se_core::Vector3::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, inherited]
 

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 se_core::Vector3::angle(), and se_core::Vector3::rotate().

coor_t se_core::Point3::distance const Point3 p1  )  const
 

Returns the distance between this point and point p1.

Parameters:
p1 the other point
Returns:
the distance between these two points as a float

Definition at line 10 of file Point3.cpp.

coor_t se_core::Point3::distanceL1 const Point3 p1  )  const
 

Computes the L-1 (Manhattan) distance between this point and point p1.

The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).

Parameters:
p1 the other point

Definition at line 16 of file Point3.cpp.

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

coor_t se_core::Point3::distanceLinf const Point3 p1  )  const
 

Computes the L-infinite distance between this point and point p1.

The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].

Parameters:
p1 the other point

Definition at line 22 of file Point3.cpp.

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

coor_double_t se_core::Point3::distanceSquared const Point3 p1  )  const [inline]
 

Computes the square of the distance between this point and point p1.

Parameters:
p1 the other point
Returns:
the square of distance between these two points as a float

Definition at line 65 of file Point3.hpp.

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

Referenced by se_basic::NavMesh::doesTouchVoid(), se_basic::NavMesh::findNearest(), se_core::Area::findTarget(), and se_ogre::ThingMO::move().

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

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(), 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::Point3::eulerTowards const Point3 c,
Euler3 dest
const
 

Definition at line 60 of file Point3.cpp.

References coor_t, se_core::Euler3::pitch_, se_core::Tuple3::x_, se_core::Tuple3::y_, se_core::Euler3::yaw_, and se_core::Tuple3::z_.

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

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 [inherited]
 

Returns the length of this vector.

Returns:
the length of this vector

Definition at line 13 of file Vector3.cpp.

Referenced by se_core::Vector3::angle(), se_basic::PhCirclingCamera::calcNext(), se_basic::NavMeshArea::farthestLineOfSight(), and nearestPoint().

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

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::Point3::nearestPoint const Point3 pt1,
const Point3 pt2,
const Point3 testPoint
 

Definition at line 72 of file Point3.cpp.

References coor_t, se_core::Vector3::dot(), se_core::Vector3::length(), se_core::Tuple3::scale(), scale_t, and se_core::Tuple3::sub().

Referenced by se_core::CollisionComponent::bouncePoint(), se_core::CollisionComponent::bouncePoints(), se_basic::NavMesh::doesTouchVoid(), and se_basic::NavMesh::findNearest().

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, inherited]
 

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, inherited]
 

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.

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

Reimplemented from se_core::Vector3.

Definition at line 179 of file Point3.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::Point3::project const Point4 p1  ) 
 

Multiplies each of the x,y,z components of the Point4 parameter by 1/w and places the projected values into this point.

Parameters:
p1 the source Point4, which is not modified

Definition at line 27 of file Point3.cpp.

References se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_.

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
[inherited]
 

Definition at line 155 of file Vector3.cpp.

void se_core::Vector3::rotate const Euler3 a  )  [inherited]
 

Definition at line 124 of file Vector3.cpp.

void se_core::Vector3::rotate const Vector3 v,
const Quat4 q
[inherited]
 

Definition at line 139 of file Vector3.cpp.

References se_core::Vector3::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  )  [inherited]
 

Definition at line 101 of file Vector3.cpp.

References se_core::Vector3::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  )  [inherited]
 

Definition at line 130 of file Vector3.cpp.

void se_core::Vector3::rotateInverse const Quat4 q  )  [inherited]
 

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(), nearestPoint(), se_core::DefaultTC::rebound(), se_core::CoDefault::rebound(), and se_core::Vector3::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(), se_core::Vector3::cross(), se_basic::NavMesh::findNearest(), se_basic::SimpleArea::force(), se_basic::NavMeshArea::force(), se_core::Vector3::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
[inherited]
 

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
[inherited]
 

Definition at line 50 of file Vector3.cpp.

void se_core::Vector3::setForward const coor_t  len,
const bray_t  yaw
[inherited]
 

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(), 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_in_t se_core::Point3::xInsideTile  )  const [inline]
 

Get the x coordinate inside the terrain tile.

Use this when you have already gotten the correct terrain tile from Area, and wants to know where you are inside the tile. The value is between 0 (left) and (COOR_RES - 1) (right).

Returns:
z coordinate inside the terrain tile.

Definition at line 151 of file Point3.hpp.

References coor_in_t.

coor_tile_t se_core::Point3::xTile  )  const [inline]
 

Get the area terrain tile x coordinate.

Use this to get the terrain tile from Area.

Returns:
the area terrain tile x coordinate

Definition at line 132 of file Point3.hpp.

References coor_tile_t.

Referenced by se_core::CollisionGrid::insert(), se_core::Area::isLegalLocalCoor(), se_core::Area::isLegalWorldCoor(), se_core::CollisionGrid::move(), se_core::CollisionGrid::remove(), se_core::CollisionGrid::setOffset(), se_basic::SimpleArea::terrainStyle(), and se_core::Area::touchedTerrain().

coor_t se_core::Point3::xzDistanceLinf const Point3 c  )  const
 

Gets the distance between two coordinates along the x or the z axis, whichever is longest.

Definition at line 36 of file Point3.cpp.

References abs, coor_t, se_core::Tuple3::x_, and se_core::Tuple3::z_.

coor_double_t se_core::Point3::xzDistanceSquared const Point3 c  )  const [inline]
 

Get the distance between the coordinates to the second power.

Used for fast collision detecion between objects. The distance is in the format described int setXInt and setZInt (before it is squared).

Returns:
The squared distance between two coordinates.

Definition at line 109 of file Point3.hpp.

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

Referenced by se_core::CollisionComponent::didGeometryCollide(), se_core::CollisionComponent::doesGeometryCollide(), se_core::CollisionAreaComponent::farthestLineOfSight(), se_basic::NavMeshArea::farthestLineOfSight(), se_core::ThingCollide::isGuilty(), se_core::CollisionComponent::penetration(), se_core::DefaultTC::slide(), se_core::CoDefault::slide(), and se_core::CollisionComponent::whenDoesGeometryCollide().

coor_t se_core::Vector3::xzLength  )  const [inherited]
 

Definition at line 18 of file Vector3.cpp.

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

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 [inherited]
 

Definition at line 37 of file Vector3.cpp.

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

bray_t se_core::Point3::yawTowards const Point3 c  )  const
 

Calc angle between two coordinates in the xz-plane.

Returns:
angle in braybrookians (0 - 255).

Definition at line 52 of file Point3.cpp.

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

Referenced by se_basic::NavMesh::slideAngle(), and se_basic::NavMesh::wallAngle().

coor_t se_core::Point3::yDistance const Point3 c  )  const
 

Gets the distance between two coordinates along the y axis.

Definition at line 45 of file Point3.cpp.

References abs, coor_t, and se_core::Tuple3::y_.

coor_in_t se_core::Point3::zInsideTile  )  const [inline]
 

Get the z coordinate inside the terrain tile.

Use this when you have already gotten the correct terrain tile from Area, and wants to know where you are inside the tile. The value is between 0 (top) and (COOR_RES - 1) (bottom).

Returns:
z coordinate inside the terrain tile.

Definition at line 162 of file Point3.hpp.

References coor_in_t.

coor_tile_t se_core::Point3::zTile  )  const [inline]
 

Get the area terrain tile z coordinate.

Use this to get the terrain tile from Area.

Returns:
the area terrain tile z coordinate

Definition at line 140 of file Point3.hpp.

References coor_tile_t.

Referenced by se_core::CollisionGrid::insert(), se_core::Area::isLegalLocalCoor(), se_core::Area::isLegalWorldCoor(), se_core::CollisionGrid::move(), se_core::CollisionGrid::remove(), se_core::CollisionGrid::setOffset(), se_basic::SimpleArea::terrainStyle(), and se_core::Area::touchedTerrain().


Member Data Documentation

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

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(), se_core::Vector3::cross(), distanceL1(), distanceLinf(), distanceSquared(), se_core::Vector3::dot(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), se_core::Tuple3::epsilonEquals(), se_core::Tuple3::equals(), 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(), xzDistanceLinf(), xzDistanceSquared(), and 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(), se_core::Vector3::cross(), distanceL1(), distanceLinf(), distanceSquared(), se_core::Vector3::dot(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), se_core::Tuple3::epsilonEquals(), se_core::Tuple3::equals(), 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 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(), se_core::Vector3::cross(), distanceL1(), distanceLinf(), distanceSquared(), se_core::Vector3::dot(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), se_core::Tuple3::epsilonEquals(), se_core::Tuple3::equals(), 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(), xzDistanceLinf(), xzDistanceSquared(), and yawTowards().

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


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

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

SourceForge.net Logo