Jamie Slowgrove - OOT Assignment 1 - A Mission in Afghanistan
 All Classes Namespaces Files Functions Variables Macros
Functions
util Namespace Reference

A namespace to contain utility functions. More...

Functions

Ogre::Matrix3 RotationMatrixXYZ (Ogre::Vector3 &orientation)
 
Ogre::Matrix3 xRotationMatrix3 (float angle)
 
Ogre::Matrix3 yRotationMatrix3 (float angle)
 
Ogre::Matrix3 zRotationMatrix3 (float angle)
 
Ogre::Matrix4 RotationMatrixXYZW (Ogre::Vector3 &orientation)
 
Ogre::Matrix4 xRotationMatrix4 (float angle)
 
Ogre::Matrix4 yRotationMatrix4 (float angle)
 
Ogre::Matrix4 zRotationMatrix4 (float angle)
 
Ogre::Quaternion covertRotateToQuaternion (Ogre::Vector3 rotationAxis, float rotateAngle)
 
Ogre::Quaternion covertRotateToQuaternion (Ogre::Vector3 rotation)
 
float convertAngleToRadian (float angle)
 
float convertRadianToDegree (float angle)
 
Ogre::Real angleCheck (Ogre::Real angle, Ogre::Real angleChange)
 
Ogre::Real getAngleTOA (Ogre::Real opp, Ogre::Real adj)
 
Ogre::Quaternion aim (Ogre::Vector3 target, Ogre::Vector3 lastTarget, Ogre::Vector3 position, Ogre::Vector3 rotateAxis)
 

Detailed Description

A namespace to contain utility functions.

Author
Jamie Slowgrove

Function Documentation

Ogre::Quaternion util::aim ( Ogre::Vector3  target,
Ogre::Vector3  lastTarget,
Ogre::Vector3  position,
Ogre::Vector3  rotateAxis 
)

Work out the aim rotation as a quaternion.

Parameters
Ogre::Vector3The target position.
Ogre::Vector3The last target position.
Ogre::Vector3The position.
Ogre::Vector3The axis for the rotation.
Returns
Ogre::Quaternion The resultant rotation.

Here is the caller graph for this function:

Ogre::Real util::angleCheck ( Ogre::Real  angle,
Ogre::Real  angleChange 
)

Makes sure the angle is between 0 and 360.

Parameters
Ogre::RealThe angle.
Ogre::RealThe value to add to the angle.
Returns
Ogre::Real The resultant angle between 0 and 360.
float util::convertAngleToRadian ( float  angle)

Converts the angle to a radian.

Parameters
floatThe angle to convert.
Returns
float The converted radian.

Here is the caller graph for this function:

float util::convertRadianToDegree ( float  angle)

Converts the angle from a radian.

Parameters
floatThe angle to convert.
Returns
float The converted angle.

Here is the caller graph for this function:

Ogre::Quaternion util::covertRotateToQuaternion ( Ogre::Vector3  rotationAxis,
float  rotateAngle 
)

Convert the rotation to a quaternion rotation.

Parameters
Ogre::Vector3The rotation axis of the object. E.g. to rotate on the x rotation axis will be (1.0f,0.0f,0.0f).
floatThe angle to rotate by.

Here is the call graph for this function:

Here is the caller graph for this function:

Ogre::Quaternion util::covertRotateToQuaternion ( Ogre::Vector3  rotation)

Convert the rotation to a quaternion rotation.

Parameters
Ogre::Vector3The rotation of the object.

Here is the call graph for this function:

Ogre::Real util::getAngleTOA ( Ogre::Real  opp,
Ogre::Real  adj 
)

Work out the angle using TOA from SOHCAHTOA.

Parameters
Ogre::RealThe opposite length.
Ogre::RealThe adjacent length.
Returns
float The resultant angle.

Here is the call graph for this function:

Ogre::Matrix3 util::RotationMatrixXYZ ( Ogre::Vector3 &  orientation)

Create a 4x4 rotation matrix.

Parameters
Ogre::Vector3The orientation of the object.
Returns
Ogre::Matrix3 The rotation matrix.

Here is the call graph for this function:

Here is the caller graph for this function:

Ogre::Matrix4 util::RotationMatrixXYZW ( Ogre::Vector3 &  orientation)

Create a 4x4 rotation matrix.

Parameters
Ogre::Vector3The orientation of the object.
Returns
Ogre::Matrix4 The rotation matrix.

Here is the call graph for this function:

Ogre::Matrix3 util::xRotationMatrix3 ( float  angle)

Create a 3x3 rotation matrix for x.

Parameters
floatThe angle.
Returns
Ogre::Matrix3 The rotation matrix.

Here is the caller graph for this function:

Ogre::Matrix4 util::xRotationMatrix4 ( float  angle)

Create a 4x4 rotation matrix for x.

Parameters
floatThe angle.
Returns
Ogre::Matrix4 The rotation matrix.

Here is the caller graph for this function:

Ogre::Matrix3 util::yRotationMatrix3 ( float  angle)

Create a 3x3 rotation matrix for y.

Parameters
floatThe angle.
Returns
Ogre::Matrix3 The rotation matrix.

Here is the caller graph for this function:

Ogre::Matrix4 util::yRotationMatrix4 ( float  angle)

Create a 4x4 rotation matrix for y.

Parameters
floatThe angle.
Returns
Ogre::Matrix4 The rotation matrix.

Here is the caller graph for this function:

Ogre::Matrix3 util::zRotationMatrix3 ( float  angle)

Create a 3x3 rotation matrix for z.

Parameters
floatThe angle.
Returns
Ogre::Matrix3 The rotation matrix.

Here is the caller graph for this function:

Ogre::Matrix4 util::zRotationMatrix4 ( float  angle)

Create a 4x4 rotation matrix for z.

Parameters
floatThe angle.
Returns
Ogre::Matrix4 The rotation matrix.

Here is the caller graph for this function: