se_core::Quat4 Class Reference

A 4 element quaternion represented by x,y,z,w coordinates. More...

#include <Quat4.hpp>

Inheritance diagram for se_core::Quat4:

se_core::Tuple4 List of all members.

Public Types

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

Public Member Functions

 Quat4 (coor_t x, coor_t y, coor_t z, coor_t w)
 Constructs and initializes a Quat4 from the specified xyzw coordinates.
 Quat4 (const coor_t v[])
 Constructs and initializes a Quat4 from the array of length 4.
 Quat4 (const Tuple4 &t1)
 Constructs and initializes a Quat4 from the specified Tuple4d.
 Quat4 (const Euler3 &a1)
 Quat4 (const AxisAngle4 &a1)
 Quat4 ()
 Constructs uninitialized Quat4.
void set (const Tuple4 &t1)
 Sets the value of this tuple to the value of tuple t1.
void setIdentity ()
void set (coor_t x, coor_t y, coor_t z, coor_t w)
 Sets the value of this tuple to the specified xyzw coordinates.
void conjugate (const Quat4 &q1)
 Sets the value of this quaternion to the conjugate of quaternion q1.
void conjugate ()
 Negate the value of of each of this quaternion's x,y,z coordinates in place.
void mul (const Quat4 &q1, const Quat4 &q2)
 Sets the value of this quaternion to the quaternion product of quaternions q1 and q2 (this = q1 * q2).
void mul (const Quat4 &q1)
 Sets the value of this quaternion to the quaternion product of itself and q1 (this = this * q1).
void rotate (const Quat4 &q1)
 Same as mul.
void rotateInverse (const Quat4 &q1)
void mulInverse (const Quat4 &q1, const Quat4 &q2)
 Multiplies quaternion q1 by the inverse of quaternion q2 and places the value into this quaternion.
void mulInverse (const Quat4 &q1)
 Multiplies this quaternion by the inverse of quaternion q1 and places the value into this quaternion.
void inverse (const Quat4 &q1)
 Sets the value of this quaternion to quaternion inverse of quaternion q1.
void inverse ()
 Sets the value of this quaternion to the quaternion inverse of itself.
void normalize (const Quat4 &q1)
 Sets the value of this quaternion to the normalized value of quaternion q1.
void normalize ()
 Normalizes the value of this quaternion in place.
bool isNormalized () const
bool isIdentity () const
void set (const AxisAngle4 &a1)
 Sets the value of this quaternion to the equivalent rotation of teh AxisAngle argument.
void set (const Euler3 &a1)
void setYaw (const bray_t yaw)
void setPitch (const bray_t pitch)
void setRoll (const bray_t roll)
void setYawAndPitch (const bray_t yaw, const bray_t pitch)
void setEuler (const bray_t yaw, const bray_t pitch, const bray_t roll)
void slerp (const Quat4 &q1, scale_t alpha, bool findShortestPath=false)
 Performs a great circle interpolation between this quaternion and the quaternion parameter and places the result into this quaternion.
void slerp (const Quat4 &q1, const Quat4 &q2, scale_t alpha, bool findShortestPath=false)
 Performs a great circle interpolation between quaternion q1 and quaternion q2 and places the result into this quaternion.
void interpolate (const Quat4 &q1, scale_t alpha)
 Same as slerp( ....
void interpolate (const Quat4 &q1, const Quat4 &q2, scale_t alpha)
void scale (scale_t alpha)
 Sets the value of this tuple to the scalar multiplication of itself.
void set (const coor_t t[])
 Sets the value of this tuple from the 4 values specified in the array.
void get (coor_t t[]) const
 Copies the value of the elements of this tuple into the array t[].
void get (Tuple4 *t) const
 Gets the value of this tuple and copies the values into the Tuple4.
void add (const Tuple4 &t1, const Tuple4 &t2)
 Sets the value of this tuple to the vector sum of tuples t1 and t2.
void add (const Tuple4 &t1)
 Sets the value of this tuple to the vector sum of itself and tuple t1.
void sub (const Tuple4 &t1, const Tuple4 &t2)
 Sets the value of this tuple to the vector difference of tuple t1 and t2 (this = t1 - t2).
void sub (const Tuple4 &t1)
 Sets the value of this tuple to the vector difference of itself and tuple t1 (this = this - t1).
void negate (const Tuple4 &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 Tuple4 &t1)
 Sets the value of this tuple to the scalar multiplication of tuple t1.
void scaleAdd (scale_t s, const Tuple4 &t1, const Tuple4 &t2)
 Sets the value of this tuple to the scalar multiplication of tuple t1 and then adds tuple t2 (this = s*t1 + t2).
void scaleAdd (scale_t s, const Tuple4 &t1)
 Sets the value of this tuple to the scalar multiplication of itself and then adds tuple t1 (this = s*this + t1).
bool equals (const Tuple4 &t1) const
 Returns true if all of the data members of Tuple4 t1 are equal to the corresponding data members in this.
bool isNan () const
bool epsilonEquals (const Tuple4 &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 clamp (coor_t min, coor_t max, const Tuple4 &t)
 Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
void clamp (coor_t min, coor_t max)
 Clamps this tuple to the range [low, high].
void clampMin (coor_t min, const Tuple4 &t)
 Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
void clampMin (coor_t min)
 Clamps the minimum value of this tuple to the min parameter.
void clampMax (coor_t max, const Tuple4 &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 absolute (const Tuple4 &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 interpolate (const Tuple4 &t1, const Tuple4 &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 Tuple4 &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 Tuple4.
const char * toLog () const
bool operator== (const Tuple4 &t1) const
coor_t operator[] (size_type index) const
coor_toperator[] (size_type index)
Tuple4operator+= (const Tuple4 &t1)
Tuple4operator-= (const Tuple4 &t1)
Tuple4operator *= (scale_t s)
Tuple4 operator+ (const Tuple4 &t1) const
Tuple4 operator- (const Tuple4 &t1) const
Tuple4 operator * (scale_t s) const

Public Attributes

coor_t x_
 The x coordinate.
coor_t y_
 The y coordinate.
coor_t z_
 The z coordinate.
coor_t w_
 The w coordinate.

Static Public Attributes

const Quat4 IDENTITY

Protected Member Functions

coor_double_t norm () const

Detailed Description

A 4 element quaternion represented by x,y,z,w coordinates.

Version:
specification 1.1, implementation
Revision
1.3
,
Date
1999/10/06 02:52:46
Author:
Kenji hiranabe

Definition at line 36 of file Quat4.hpp.


Member Typedef Documentation

typedef short se_core::Tuple4::size_type [inherited]
 

the type for index

Definition at line 47 of file Tuple4.hpp.

typedef coor_t se_core::Tuple4::value_type [inherited]
 

the type for values

Definition at line 43 of file Tuple4.hpp.


Member Enumeration Documentation

anonymous enum [inherited]
 

dimension

Enumeration values:
DIMENSION 

Definition at line 51 of file Tuple4.hpp.


Constructor & Destructor Documentation

se_core::Quat4::Quat4 coor_t  x,
coor_t  y,
coor_t  z,
coor_t  w
[inline]
 

Constructs and initializes a Quat4 from the specified xyzw coordinates.

Parameters:
x the x coordinate
y the y coordinate
z the z coordinate
w the w scalar component

Definition at line 45 of file Quat4.hpp.

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

Constructs and initializes a Quat4 from the array of length 4.

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

Definition at line 51 of file Quat4.hpp.

se_core::Quat4::Quat4 const Tuple4 t1  )  [inline]
 

Constructs and initializes a Quat4 from the specified Tuple4d.

Parameters:
t1 the Tuple4d containing the initialization x y z w data

Definition at line 58 of file Quat4.hpp.

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

Definition at line 61 of file Quat4.hpp.

References se_core::Tuple4::set().

se_core::Quat4::Quat4 const AxisAngle4 a1  )  [inline]
 

Definition at line 65 of file Quat4.hpp.

References se_core::Tuple4::set().

se_core::Quat4::Quat4  )  [inline]
 

Constructs uninitialized Quat4.

Definition at line 72 of file Quat4.hpp.


Member Function Documentation

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

Sets each component of this tuple to its absolute value.

Definition at line 380 of file Tuple4.hpp.

void se_core::Tuple4::absolute const Tuple4 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 332 of file Tuple4.hpp.

void se_core::Tuple4::add const Tuple4 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 169 of file Tuple4.hpp.

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

void se_core::Tuple4::add const Tuple4 t1,
const Tuple4 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 158 of file Tuple4.hpp.

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

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

void se_core::Tuple4::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 342 of file Tuple4.hpp.

void se_core::Tuple4::clamp coor_t  min,
coor_t  max,
const Tuple4 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 300 of file Tuple4.hpp.

void se_core::Tuple4::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 366 of file Tuple4.hpp.

void se_core::Tuple4::clampMax coor_t  max,
const Tuple4 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 322 of file Tuple4.hpp.

void se_core::Tuple4::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 351 of file Tuple4.hpp.

void se_core::Tuple4::clampMin coor_t  min,
const Tuple4 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 311 of file Tuple4.hpp.

void se_core::Quat4::conjugate  )  [inline]
 

Negate the value of of each of this quaternion's x,y,z coordinates in place.

Definition at line 116 of file Quat4.hpp.

void se_core::Quat4::conjugate const Quat4 q1  )  [inline]
 

Sets the value of this quaternion to the conjugate of quaternion q1.

Parameters:
q1 the source vector

Definition at line 105 of file Quat4.hpp.

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

bool se_core::Tuple4::epsilonEquals const Tuple4 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), abs(z1-z2), abs(w1-w2)].

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

Definition at line 8 of file Tuple4.cpp.

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

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

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

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

Definition at line 278 of file Tuple4.hpp.

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

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

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

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

Definition at line 145 of file Tuple4.hpp.

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

void se_core::Tuple4::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 Tuple4.hpp.

void se_core::Tuple4::interpolate const Tuple4 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 409 of file Tuple4.hpp.

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

void se_core::Tuple4::interpolate const Tuple4 t1,
const Tuple4 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 398 of file Tuple4.hpp.

void se_core::Quat4::interpolate const Quat4 q1,
const Quat4 q2,
scale_t  alpha
[inline]
 

Definition at line 287 of file Quat4.hpp.

void se_core::Quat4::interpolate const Quat4 q1,
scale_t  alpha
[inline]
 

Same as slerp( ....

, true)

Definition at line 282 of file Quat4.hpp.

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

void se_core::Quat4::inverse  )  [inline]
 

Sets the value of this quaternion to the quaternion inverse of itself.

Definition at line 193 of file Quat4.hpp.

References scale_t.

void se_core::Quat4::inverse const Quat4 q1  )  [inline]
 

Sets the value of this quaternion to quaternion inverse of quaternion q1.

Parameters:
q1 the quaternion to be inverted

Definition at line 180 of file Quat4.hpp.

References norm(), scale_t, se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_.

Referenced by se_core::Vector3::rotateInverse().

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

Definition at line 242 of file Quat4.hpp.

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

Definition at line 30 of file Tuple4.cpp.

bool se_core::Quat4::isNormalized  )  const [inline]
 

Definition at line 231 of file Quat4.hpp.

References coor_double_t, and LogFatal.

Referenced by slerp().

void se_core::Quat4::mul const Quat4 q1  ) 
 

Sets the value of this quaternion to the quaternion product of itself and q1 (this = this * q1).

Parameters:
q1 the other quaternion

Definition at line 24 of file Quat4.cpp.

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

void se_core::Quat4::mul const Quat4 q1,
const Quat4 q2
 

Sets the value of this quaternion to the quaternion product of quaternions q1 and q2 (this = q1 * q2).

Note that this is safe for aliasing (e.g. this can be q1 or q2).

Parameters:
q1 the first quaternion
q2 the second quaternion

Definition at line 12 of file Quat4.cpp.

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

void se_core::Quat4::mulInverse const Quat4 q1  ) 
 

Multiplies this quaternion by the inverse of quaternion q1 and places the value into this quaternion.

The value of the argument quaternion is preserved (this = this * q^-1).

Parameters:
q1 the other quaternion

Definition at line 68 of file Quat4.cpp.

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

void se_core::Quat4::mulInverse const Quat4 q1,
const Quat4 q2
 

Multiplies quaternion q1 by the inverse of quaternion q2 and places the value into this quaternion.

The value of both argument quaternions is preservered (this = q1 * q2^-1).

Parameters:
q1 the left quaternion
q2 the right quaternion

Definition at line 36 of file Quat4.cpp.

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

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

Negates the value of this vector in place.

Definition at line 214 of file Tuple4.hpp.

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

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

Parameters:
t1 the source vector

Definition at line 204 of file Tuple4.hpp.

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

coor_double_t se_core::Quat4::norm  )  const [inline, protected]
 

Definition at line 170 of file Quat4.hpp.

References coor_double_t.

Referenced by inverse(), and normalize().

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

Normalizes the value of this quaternion in place.

Definition at line 220 of file Quat4.hpp.

References scale_t.

void se_core::Quat4::normalize const Quat4 q1  )  [inline]
 

Sets the value of this quaternion to the normalized value of quaternion q1.

Parameters:
q1 the quaternion to be normalized.

Definition at line 208 of file Quat4.hpp.

References norm(), scale_t, se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_.

Tuple4 se_core::Tuple4::operator * scale_t  s  )  const [inline, inherited]
 

Definition at line 488 of file Tuple4.hpp.

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

Definition at line 478 of file Tuple4.hpp.

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

Definition at line 482 of file Tuple4.hpp.

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

Definition at line 470 of file Tuple4.hpp.

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

Definition at line 485 of file Tuple4.hpp.

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

Definition at line 474 of file Tuple4.hpp.

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

Definition at line 427 of file Tuple4.hpp.

coor_t& se_core::Tuple4::operator[] size_type  index  )  [inline, inherited]
 

Definition at line 447 of file Tuple4.hpp.

References Assert, and coor_t.

coor_t se_core::Tuple4::operator[] size_type  index  )  const [inline, inherited]
 

Definition at line 431 of file Tuple4.hpp.

References Assert, and coor_t.

void se_core::Quat4::rotate const Quat4 q1  )  [inline]
 

Same as mul.

Included for method compatibility with Euler3.

Definition at line 143 of file Quat4.hpp.

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

void se_core::Quat4::rotateInverse const Quat4 q1  )  [inline]
 

Definition at line 147 of file Quat4.hpp.

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

void se_core::Tuple4::scale scale_t  s,
const Tuple4 t1
[inline, 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 227 of file Tuple4.hpp.

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

void se_core::Quat4::scale scale_t  alpha  )  [inline]
 

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

Parameters:
s the scalar value

Reimplemented from se_core::Tuple4.

Definition at line 292 of file Quat4.hpp.

void se_core::Tuple4::scaleAdd scale_t  s,
const Tuple4 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 265 of file Tuple4.hpp.

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

void se_core::Tuple4::scaleAdd scale_t  s,
const Tuple4 t1,
const Tuple4 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 252 of file Tuple4.hpp.

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

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

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

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

Definition at line 112 of file Tuple4.hpp.

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

Definition at line 127 of file Quat4.cpp.

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

void se_core::Quat4::set const AxisAngle4 a1  ) 
 

Sets the value of this quaternion to the equivalent rotation of teh AxisAngle argument.

Parameters:
a1 the axis-angle

Definition at line 101 of file Quat4.cpp.

References se_core::AxisAngle4::angle_, coor_t, se_core::AxisAngle4::x_, se_core::AxisAngle4::y_, and se_core::AxisAngle4::z_.

void se_core::Quat4::set coor_t  x,
coor_t  y,
coor_t  z,
coor_t  w
[inline]
 

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

note: other set methods hides this set.

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

Reimplemented from se_core::Tuple4.

Definition at line 96 of file Quat4.hpp.

void se_core::Quat4::set const Tuple4 t1  )  [inline]
 

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

note: other set methods hides this set.

Parameters:
t1 the tuple to be copied

Reimplemented from se_core::Tuple4.

Definition at line 79 of file Quat4.hpp.

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

void se_core::Quat4::setEuler const bray_t  yaw,
const bray_t  pitch,
const bray_t  roll
 

Definition at line 151 of file Quat4.cpp.

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

Definition at line 84 of file Quat4.hpp.

References se_core::Tuple4::set().

void se_core::Quat4::setPitch const bray_t  pitch  ) 
 

Definition at line 188 of file Quat4.cpp.

References Assert.

void se_core::Quat4::setRoll const bray_t  roll  ) 
 

Definition at line 202 of file Quat4.cpp.

References Assert.

void se_core::Quat4::setYaw const bray_t  yaw  ) 
 

Definition at line 176 of file Quat4.cpp.

References Assert.

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

void se_core::Quat4::setYawAndPitch const bray_t  yaw,
const bray_t  pitch
 

Definition at line 157 of file Quat4.cpp.

References Assert, and trig_t.

void se_core::Quat4::slerp const Quat4 q1,
const Quat4 q2,
scale_t  alpha,
bool  findShortestPath = false
 

Performs a great circle interpolation between quaternion q1 and quaternion q2 and places the result into this quaternion.

Parameters:
q1 the first quaternion
q2 the second quaternion
alpha the alpha interpolation parameter

Definition at line 280 of file Quat4.cpp.

void se_core::Quat4::slerp const Quat4 q1,
scale_t  alpha,
bool  findShortestPath = false
 

Performs a great circle interpolation between this quaternion and the quaternion parameter and places the result into this quaternion.

Parameters:
q1 the other quaternion
alpha the alpha interpolation parameter

Definition at line 213 of file Quat4.cpp.

References abs, Assert, coor_t, isNormalized(), LogFatal, scale_t, se_core::Tuple4::w_, se_core::Tuple4::x_, se_core::Tuple4::y_, and se_core::Tuple4::z_.

void se_core::Tuple4::sub const Tuple4 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 193 of file Tuple4.hpp.

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

void se_core::Tuple4::sub const Tuple4 t1,
const Tuple4 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 182 of file Tuple4.hpp.

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

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

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

Definition at line 24 of file Tuple4.cpp.

References log_msg().

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

Returns a string that contains the values of this Tuple4.

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

Returns:
the String representation

Definition at line 17 of file Tuple4.cpp.


Member Data Documentation

const Quat4 se_core::Quat4::IDENTITY [static]
 

coor_t se_core::Tuple4::w_ [inherited]
 

The w coordinate.

Definition at line 71 of file Tuple4.hpp.

Referenced by se_core::Tuple4::add(), conjugate(), se_core::Point4::distanceL1(), se_core::Point4::distanceLinf(), se_core::Point4::distanceSquared(), se_core::Vector4::dot(), se_core::Tuple4::epsilonEquals(), se_core::Tuple4::equals(), se_core::Tuple4::get(), se_core::Tuple4::interpolate(), inverse(), mul(), mulInverse(), se_core::Tuple4::negate(), normalize(), se_ogre::O3dThingParser::parseThingInfo(), se_core::Point4::project(), se_core::Point3::project(), se_core::Vector3::rotate(), se_core::Tuple4::scale(), se_core::Tuple4::scaleAdd(), se_core::Tuple4::set(), se_core::Euler3::set(), se_core::AxisAngle4::set(), slerp(), and se_core::Tuple4::sub().

coor_t se_core::Tuple4::x_ [inherited]
 

The x coordinate.

Definition at line 56 of file Tuple4.hpp.

Referenced by se_core::Tuple4::add(), conjugate(), se_core::Point4::distanceL1(), se_core::Point4::distanceLinf(), se_core::Point4::distanceSquared(), se_core::Vector4::dot(), se_core::Tuple4::epsilonEquals(), se_core::Tuple4::equals(), se_core::Tuple4::get(), se_core::Tuple4::interpolate(), inverse(), mul(), mulInverse(), se_core::Tuple4::negate(), normalize(), se_ogre::O3dThingParser::parseThingInfo(), se_core::Point4::project(), se_core::Point3::project(), se_core::Vector3::rotate(), se_core::Tuple4::scale(), se_core::Tuple4::scaleAdd(), se_core::Tuple4::set(), se_core::Euler3::set(), se_core::AxisAngle4::set(), slerp(), and se_core::Tuple4::sub().

coor_t se_core::Tuple4::y_ [inherited]
 

The y coordinate.

Definition at line 61 of file Tuple4.hpp.

Referenced by se_core::Tuple4::add(), conjugate(), se_core::Point4::distanceL1(), se_core::Point4::distanceLinf(), se_core::Point4::distanceSquared(), se_core::Vector4::dot(), se_core::Tuple4::epsilonEquals(), se_core::Tuple4::equals(), se_core::Tuple4::get(), se_core::Tuple4::interpolate(), inverse(), mul(), mulInverse(), se_core::Tuple4::negate(), normalize(), se_ogre::O3dThingParser::parseThingInfo(), se_core::Point4::project(), se_core::Point3::project(), se_core::Vector3::rotate(), se_core::Tuple4::scale(), se_core::Tuple4::scaleAdd(), se_core::Tuple4::set(), se_core::Euler3::set(), se_core::AxisAngle4::set(), slerp(), and se_core::Tuple4::sub().

coor_t se_core::Tuple4::z_ [inherited]
 

The z coordinate.

Definition at line 66 of file Tuple4.hpp.

Referenced by se_core::Tuple4::add(), conjugate(), se_core::Point4::distanceL1(), se_core::Point4::distanceLinf(), se_core::Point4::distanceSquared(), se_core::Vector4::dot(), se_core::Tuple4::epsilonEquals(), se_core::Tuple4::equals(), se_core::Tuple4::get(), se_core::Tuple4::interpolate(), inverse(), mul(), mulInverse(), se_core::Tuple4::negate(), normalize(), se_ogre::O3dThingParser::parseThingInfo(), se_core::Point4::project(), se_core::Point3::project(), se_core::Vector3::rotate(), se_core::Tuple4::scale(), se_core::Tuple4::scaleAdd(), se_core::Tuple4::set(), se_core::Euler3::set(), se_core::AxisAngle4::set(), slerp(), and se_core::Tuple4::sub().


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