Class QuadWord

Inheritance Relationships

Derived Type

Class Documentation

class QuadWord

The QuadWord class is base class for Vector3 and Quaternion. Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword.

Subclassed by tf2::Quaternion

Public Functions

inline const tf2Scalar &getX() const

Return the x value.

inline const tf2Scalar &getY() const

Return the y value.

inline const tf2Scalar &getZ() const

Return the z value.

inline void setX(tf2Scalar x)

Set the x value.

inline void setY(tf2Scalar y)

Set the y value.

inline void setZ(tf2Scalar z)

Set the z value.

inline void setW(tf2Scalar w)

Set the w value.

inline const tf2Scalar &x() const

Return the x value.

inline const tf2Scalar &y() const

Return the y value.

inline const tf2Scalar &z() const

Return the z value.

inline const tf2Scalar &w() const

Return the w value.

inline operator tf2Scalar*()

operator tf2Scalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons.

inline operator const tf2Scalar*() const
inline bool operator==(const QuadWord &other) const
inline bool operator!=(const QuadWord &other) const
inline void setValue(const tf2Scalar &x, const tf2Scalar &y, const tf2Scalar &z)

Set x,y,z and zero w.

Parameters:
  • x – Value of x

  • y – Value of y

  • z – Value of z

inline void setValue(const tf2Scalar &x, const tf2Scalar &y, const tf2Scalar &z, const tf2Scalar &w)

Set the values.

Parameters:
  • x – Value of x

  • y – Value of y

  • z – Value of z

  • w – Value of w

inline QuadWord()

No initialization constructor.

inline QuadWord(const tf2Scalar &x, const tf2Scalar &y, const tf2Scalar &z)

Three argument constructor (zeros w)

Parameters:
  • x – Value of x

  • y – Value of y

  • z – Value of z

inline QuadWord(const tf2Scalar &x, const tf2Scalar &y, const tf2Scalar &z, const tf2Scalar &w)

Initializing constructor.

Parameters:
  • x – Value of x

  • y – Value of y

  • z – Value of z

  • w – Value of w

inline void setMax(const QuadWord &other)

Set each element to the max of the current values and the values of another QuadWord.

Parameters:

other – The other QuadWord to compare with

inline void setMin(const QuadWord &other)

Set each element to the min of the current values and the values of another QuadWord.

Parameters:

other – The other QuadWord to compare with

Protected Attributes

tf2Scalar m_floats[4]