se_core::Euler3 Class Reference

A generic 3 element angle that is represented by yaw_, pitch_ and roll_ angles. More...

#include <Euler3.hpp>

List of all members.

Public Types

typedef bray_t value_type
 the type for values
typedef short size_type
 the type for index
enum  { DIMENSION = 3 }
 dimension More...

Public Member Functions

 Euler3 (bray_t yaw, bray_t pitch, bray_t roll)
 Constructs and initializes a Euler3 from the specified xyzw coordinates.
 Euler3 (const bray_t t[])
 Constructs and initializes a Euler3 from the specified array.
 Euler3 ()
 Constructs an uninitialized a Euler3.
 Euler3 (const Quat4 &q)
 Constructs an uninitialized a Euler3.
 Euler3 (const Euler3 &a)
 Constructs an uninitialized a Euler3.
void set (bray_t yaw, bray_t pitch, bray_t roll)
 Sets the value of this angle to the specified xyzw coordinates.
void set (const bray_t t[])
 Sets the value of this angle from the 4 values specified in the array.
void set (const Quat4 &q1)
void set (const Euler3 &a1)
 Sets the value of this angle to the value of angle a1.
void setEuler (const Euler3 &a1)
void setYaw (bray_t yaw)
 Set yaw and reset pitch and roll.
void setPitch (bray_t yaw)
 Set pitch and reset yaw and roll.
void setRoll (bray_t roll)
 Set roll and reset yaw and pitch.
void setYawAndPitch (bray_t yaw, bray_t pitch)
 Set yaw and pitch, reset roll.
void setEuler (bray_t yaw, bray_t pitch, bray_t roll)
 Set yaw, pitch and roll.
void reset ()
void setIdentity ()
void get (bray_t t[]) const
 Copies the value of the elements of this angle into the array t[].
void get (Euler3 *t) const
 Gets the value of this angle and copies the values into the Euler3.
void add (const Euler3 &a1, const Euler3 &a2)
 Sets the value of this angle to the vector sum of angles a1 and a2.
void add (const Euler3 &a1)
 Sets the value of this angle to the vector sum of itself and angle a1.
void rotate (const Euler3 &a1)
 Same as add.
void rotateInverse (const Euler3 &a1)
void sub (const Euler3 &a1, const Euler3 &a2)
 Sets the value of this angle to the vector difference of angle a1 and a2 (this = a1 - a2).
void sub (const Euler3 &a1)
 Sets the value of this angle to the vector difference of itself and angle a1 (this = this - a1).
void invert (const Euler3 &a1)
 Sets the value of this angle to the negation of angle a1.
void invert ()
 Negates the value of this vector in place.
void scale (scale_t s, const Euler3 &a1)
 Sets the value of this angle to the scalar multiplication of angle a1.
void scale (scale_t s)
 Sets the value of this angle to the scalar multiplication of itself.
void normalize ()
void scaleAdd (scale_t s, const Euler3 &a1, const Euler3 &a2)
 Sets the value of this angle to the scalar multiplication of angle a1 and then adds angle a2 (this = s*a1 + a2).
void scaleAdd (scale_t s, const Euler3 &a1)
 Sets the value of this angle to the scalar multiplication of itself and then adds angle a1 (this = s*this + a1).
bool equals (const Euler3 &a1) const
 Returns true if all of the data members of Euler3 a1 are equal to the corresponding data members in this.
bool isIdentity () const
bool epsilonEquals (const Euler3 &a1, bray_t epsilon) const
 Returns true if the L-infinite distance between this angle and angle a1 is less than or equal to the epsilon parameter, otherwise returns false.
void interpolate (const Euler3 &a1, const Euler3 &a2, scale_t alpha)
 Linearly interpolates between angles a1 and a2 and places the result into this angle: this = (1-alpha)*a1 + alpha*a2.
void interpolate (const Euler3 &a1, scale_t alpha)
 Linearly interpolates between this angle and angle a1 and places the result into this angle: this = (1-alpha)*this + alpha*a1.
char * toString (char *buffer) const
 Returns a string that contains the values of this Euler3.
bool operator== (const Euler3 &a1) const
bray_t operator[] (size_type index) const
bray_toperator[] (size_type index)
Euler3operator= (const Euler3 &a1)
Euler3operator+= (const Euler3 &a1)
Euler3operator-= (const Euler3 &a1)
Euler3operator *= (scale_t s)
Euler3 operator+ (const Euler3 &a1) const
Euler3 operator- (const Euler3 &a1) const
Euler3 operator * (scale_t s) const
const char * toLog () const

Public Attributes

bray_t yaw_
 The angle turning left or right.
bray_t pitch_
 The angle leaning forward or backwards.
bray_t roll_
 The angle tilting left or right.


Detailed Description

A generic 3 element angle that is represented by yaw_, pitch_ and roll_ angles.

Author:
Rune Myrland

Definition at line 19 of file Euler3.hpp.


Member Typedef Documentation

typedef short se_core::Euler3::size_type
 

the type for index

Definition at line 28 of file Euler3.hpp.

typedef bray_t se_core::Euler3::value_type
 

the type for values

Definition at line 24 of file Euler3.hpp.


Member Enumeration Documentation

anonymous enum
 

dimension

Enumeration values:
DIMENSION 

Definition at line 32 of file Euler3.hpp.


Constructor & Destructor Documentation

se_core::Euler3::Euler3 bray_t  yaw,
bray_t  pitch,
bray_t  roll
[inline]
 

Constructs and initializes a Euler3 from the specified xyzw coordinates.

Parameters:
yaw the yaw angle
pitch the pitch angle
roll the roll angle

Definition at line 57 of file Euler3.hpp.

se_core::Euler3::Euler3 const bray_t  t[]  )  [inline]
 

Constructs and initializes a Euler3 from the specified array.

Parameters:
t the array of length 3 containing yaw, pitch, roll in order

Definition at line 66 of file Euler3.hpp.

se_core::Euler3::Euler3  )  [inline]
 

Constructs an uninitialized a Euler3.

Definition at line 71 of file Euler3.hpp.

se_core::Euler3::Euler3 const Quat4 q  )  [inline]
 

Constructs an uninitialized a Euler3.

Definition at line 78 of file Euler3.hpp.

se_core::Euler3::Euler3 const Euler3 a  )  [inline]
 

Constructs an uninitialized a Euler3.

Definition at line 85 of file Euler3.hpp.


Member Function Documentation

void se_core::Euler3::add const Euler3 a1  )  [inline]
 

Sets the value of this angle to the vector sum of itself and angle a1.

Parameters:
a1 the other angle

Definition at line 229 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

void se_core::Euler3::add const Euler3 a1,
const Euler3 a2
[inline]
 

Sets the value of this angle to the vector sum of angles a1 and a2.

Parameters:
a1 the first angle
a2 the second angle

Definition at line 219 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

bool se_core::Euler3::epsilonEquals const Euler3 a1,
bray_t  epsilon
const
 

Returns true if the L-infinite distance between this angle and angle a1 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), abs(z1-z2), abs(w1-w2)].

Parameters:
a1 the angle to be compared to this angle
epsilon the threshold value

Definition at line 29 of file Euler3.cpp.

References abs, pitch_, roll_, and yaw_.

Referenced by se_core::ViewPoint::viewPointEquals().

bool se_core::Euler3::equals const Euler3 a1  )  const [inline]
 

Returns true if all of the data members of Euler3 a1 are equal to the corresponding data members in this.

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

Definition at line 347 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

Referenced by se_core::ViewPoint::viewPointEquals().

void se_core::Euler3::get Euler3 t  )  const [inline]
 

Gets the value of this angle and copies the values into the Euler3.

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

Definition at line 207 of file Euler3.hpp.

References Assert, pitch_, roll_, and yaw_.

void se_core::Euler3::get bray_t  t[]  )  const [inline]
 

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

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

Definition at line 197 of file Euler3.hpp.

void se_core::Euler3::interpolate const Euler3 a1,
scale_t  alpha
 

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

Parameters:
a1 the first angle
alpha the alpha interpolation parameter

Definition at line 69 of file Euler3.cpp.

References pitch_, roll_, and yaw_.

void se_core::Euler3::interpolate const Euler3 a1,
const Euler3 a2,
scale_t  alpha
[inline]
 

Linearly interpolates between angles a1 and a2 and places the result into this angle: this = (1-alpha)*a1 + alpha*a2.

Parameters:
a1 the first angle
a2 the second angle
alpha the alpha interpolation parameter

Definition at line 371 of file Euler3.hpp.

Referenced by se_core::PosComponent::worldViewPoint().

void se_core::Euler3::invert  )  [inline]
 

Negates the value of this vector in place.

Definition at line 282 of file Euler3.hpp.

void se_core::Euler3::invert const Euler3 a1  )  [inline]
 

Sets the value of this angle to the negation of angle a1.

Parameters:
a1 the source vector

Definition at line 273 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

bool se_core::Euler3::isIdentity  )  const [inline]
 

Definition at line 351 of file Euler3.hpp.

Referenced by se_core::ViewPoint::add(), se_core::Pos::areaCoor(), se_core::Pos::areaFace(), se_core::ViewPoint::sub(), and se_core::CollisionComponent::updateAreaCovered().

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

Definition at line 310 of file Euler3.hpp.

Euler3 se_core::Euler3::operator * scale_t  s  )  const [inline]
 

Definition at line 450 of file Euler3.hpp.

Euler3& se_core::Euler3::operator *= scale_t  s  )  [inline]
 

Definition at line 440 of file Euler3.hpp.

Euler3 se_core::Euler3::operator+ const Euler3 a1  )  const [inline]
 

Definition at line 444 of file Euler3.hpp.

Euler3& se_core::Euler3::operator+= const Euler3 a1  )  [inline]
 

Definition at line 432 of file Euler3.hpp.

Euler3 se_core::Euler3::operator- const Euler3 a1  )  const [inline]
 

Definition at line 447 of file Euler3.hpp.

Euler3& se_core::Euler3::operator-= const Euler3 a1  )  [inline]
 

Definition at line 436 of file Euler3.hpp.

Euler3& se_core::Euler3::operator= const Euler3 a1  )  [inline]
 

Definition at line 427 of file Euler3.hpp.

bool se_core::Euler3::operator== const Euler3 a1  )  const [inline]
 

Definition at line 393 of file Euler3.hpp.

bray_t& se_core::Euler3::operator[] size_type  index  )  [inline]
 

Definition at line 411 of file Euler3.hpp.

References Assert, and bray_t.

bray_t se_core::Euler3::operator[] size_type  index  )  const [inline]
 

Definition at line 397 of file Euler3.hpp.

References Assert, and bray_t.

void se_core::Euler3::reset  )  [inline]
 

Definition at line 185 of file Euler3.hpp.

void se_core::Euler3::rotate const Euler3 a1  )  [inline]
 

Same as add.

Included for method compatibility with Quat4.

Definition at line 240 of file Euler3.hpp.

Referenced by se_core::PhDefault::applyForces(), and se_core::PhDefault::updateForces().

void se_core::Euler3::rotateInverse const Euler3 a1  )  [inline]
 

Definition at line 244 of file Euler3.hpp.

void se_core::Euler3::scale scale_t  s  )  [inline]
 

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

Parameters:
s the scalar value

Definition at line 304 of file Euler3.hpp.

void se_core::Euler3::scale scale_t  s,
const Euler3 a1
[inline]
 

Sets the value of this angle to the scalar multiplication of angle a1.

Parameters:
s the scalar value
a1 the source angle

Definition at line 294 of file Euler3.hpp.

References pitch_, and roll_.

Referenced by se_core::PhDefault::applyFriction().

void se_core::Euler3::scaleAdd scale_t  s,
const Euler3 a1
[inline]
 

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

Parameters:
s the scalar value
a1 the angle to be added

Definition at line 335 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

void se_core::Euler3::scaleAdd scale_t  s,
const Euler3 a1,
const Euler3 a2
[inline]
 

Sets the value of this angle to the scalar multiplication of angle a1 and then adds angle a2 (this = s*a1 + a2).

Parameters:
s the scalar value
a1 the angle to be multipled
a2 the angle to be added

Definition at line 323 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

void se_core::Euler3::set const Euler3 a1  )  [inline]
 

Sets the value of this angle to the value of angle a1.

Parameters:
a1 the angle to be copied

Definition at line 117 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

void se_core::Euler3::set const Quat4 q1  ) 
 

Definition at line 39 of file Euler3.cpp.

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

void se_core::Euler3::set const bray_t  t[]  )  [inline]
 

Sets the value of this angle from the 4 values specified in the array.

Parameters:
t the array of length 4 containing xyzw in order

Definition at line 105 of file Euler3.hpp.

void se_core::Euler3::set bray_t  yaw,
bray_t  pitch,
bray_t  roll
[inline]
 

Sets the value of this angle to the specified xyzw coordinates.

Parameters:
yaw the x coordinate
pitch the y coordinate
roll the z coordinate

Definition at line 95 of file Euler3.hpp.

Referenced by se_core::Pos::areaFace().

void se_core::Euler3::setEuler bray_t  yaw,
bray_t  pitch,
bray_t  roll
[inline]
 

Set yaw, pitch and roll.

Definition at line 177 of file Euler3.hpp.

void se_core::Euler3::setEuler const Euler3 a1  )  [inline]
 

Definition at line 124 of file Euler3.hpp.

Referenced by se_core::SpawnComponentParser::readSpawnPoint(), and se_basic::SimpleActorParser::readSpawnPoint().

void se_core::Euler3::setIdentity  )  [inline]
 

Definition at line 189 of file Euler3.hpp.

Referenced by se_core::SpawnComponentParser::readSpawnPoint(), and se_basic::SimpleActorParser::readSpawnPoint().

void se_core::Euler3::setPitch bray_t  yaw  )  [inline]
 

Set pitch and reset yaw and roll.

Included for method compatibility with Quat4. Access member variables directly if you want manipulate a yaw/pitch/roll indiviudally.

Definition at line 144 of file Euler3.hpp.

void se_core::Euler3::setRoll bray_t  roll  )  [inline]
 

Set roll and reset yaw and pitch.

Included for method compatibility with Quat4. Access member variables directly if you want manipulate a yaw/pitch/roll indiviudally.

Definition at line 156 of file Euler3.hpp.

void se_core::Euler3::setYaw bray_t  yaw  )  [inline]
 

Set yaw and reset pitch and roll.

Definition at line 132 of file Euler3.hpp.

void se_core::Euler3::setYawAndPitch bray_t  yaw,
bray_t  pitch
[inline]
 

Set yaw and pitch, reset roll.

Included for method compatibility with Quat4. Access member variables directly if you want manipulate a yaw/pitch/roll indiviudally.

Definition at line 168 of file Euler3.hpp.

void se_core::Euler3::sub const Euler3 a1  )  [inline]
 

Sets the value of this angle to the vector difference of itself and angle a1 (this = this - a1).

Parameters:
a1 the other angle

Definition at line 263 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

void se_core::Euler3::sub const Euler3 a1,
const Euler3 a2
[inline]
 

Sets the value of this angle to the vector difference of angle a1 and a2 (this = a1 - a2).

Parameters:
a1 the first angle
a2 the second angle

Definition at line 253 of file Euler3.hpp.

References pitch_, roll_, and yaw_.

Referenced by se_core::Pos::areaFace().

const char * se_core::Euler3::toLog  )  const
 

Definition at line 10 of file Euler3.cpp.

References log_msg().

char * se_core::Euler3::toString char *  buffer  )  const
 

Returns a string that contains the values of this Euler3.

The form is (x,y,z,w).

Returns:
the String representation

Definition at line 17 of file Euler3.cpp.

Referenced by se_core::operator<<().


Member Data Documentation

bray_t se_core::Euler3::pitch_
 

The angle leaning forward or backwards.

Definition at line 42 of file Euler3.hpp.

Referenced by add(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), epsilonEquals(), equals(), se_core::Point3::eulerTowards(), get(), interpolate(), invert(), se_ogre::O3dThingParser::parseThingInfo(), scale(), scaleAdd(), se_core::Quat4::set(), set(), se_core::AxisAngle4::set(), se_core::Vector3::setForward(), sub(), se_core::CollisionComponent::updateAreaCovered(), and se_ogre::O3dManager::updateStats().

bray_t se_core::Euler3::roll_
 

The angle tilting left or right.

Definition at line 47 of file Euler3.hpp.

Referenced by add(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), epsilonEquals(), equals(), get(), interpolate(), invert(), se_ogre::O3dThingParser::parseThingInfo(), scale(), scaleAdd(), se_core::Quat4::set(), set(), se_core::AxisAngle4::set(), sub(), se_core::CollisionComponent::updateAreaCovered(), and se_ogre::O3dManager::updateStats().

bray_t se_core::Euler3::yaw_
 

The angle turning left or right.

Definition at line 37 of file Euler3.hpp.

Referenced by add(), se_basic::PhCirclingCamera::calcNext(), se_client::PlayerEncoder::encode(), se_basic::SimpleAreaThingEncoder::encode(), epsilonEquals(), equals(), se_core::Point3::eulerTowards(), get(), interpolate(), invert(), se_client::PlayerParser::parse(), se_ogre::O3dThingParser::parseThingInfo(), scaleAdd(), se_core::Quat4::set(), set(), se_core::AxisAngle4::set(), se_core::Vector3::setForward(), sub(), and se_ogre::O3dManager::updateStats().


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