Orientation of objects.
More...
#include <LSMOrientation.h>
List of all members.
Detailed Description
Orientation of objects.
Class COrientation Description: A base class for all objects that can have an orientation in 3D.
Member Function Documentation
LSVOID LSE_FCALL lsm::COrientation::AddPos |
( |
const CVector3 & |
_vPos | ) |
|
Offset this position by a given amount.
- Parameters:
-
_vPos | The position to add to this orientation. |
LSVOID LSE_FCALL lsm::COrientation::AddRelPos |
( |
const CVector3 & |
_vPos | ) |
|
Offset the position of this orientation relative to its facing direction.
- Parameters:
-
_vPos | The position to add to this orientation. |
LSVOID LSE_FCALL lsm::COrientation::AddRotation |
( |
const CMatrix4x4 & |
_mMat | ) |
|
Add a rotation to the existing rotation of this object.
- Parameters:
-
_mMat | The rotation, in matrix form, to add to the existing rotation of this object. |
LSVOID LSE_FCALL lsm::COrientation::AddRotation |
( |
const CVector3 & |
_vForward, |
|
|
const CVector3 & |
_vUp |
|
) |
| |
Add a rotation to this object from forward and up vectors. The right vector is derived automatically.
- Parameters:
-
_vForward | The forward component of the rotation to add. |
_vUp | The up component of the rotation to add. |
LSVOID LSE_FCALL lsm::COrientation::AddScale |
( |
const CVector3 & |
_vScale | ) |
|
Add to the current scale of this object.
- Parameters:
-
_vScale | The scale to add to the existing scale of this object. |
LSVOID LSE_FCALL lsm::COrientation::AddScale |
( |
LSREAL |
_fScale | ) |
|
Add to the current scale of this object.
- Parameters:
-
_fScale | The scale to add to the existing scale of this object. |
LSVOID LSE_FCALL lsm::COrientation::BuildMatrix |
( |
CMatrix4x4 & |
_mRet | ) |
const |
Build a matrix from our data.
- Parameters:
-
_mRet | Holds the created matrix. |
LSVOID LSE_FCALL lsm::COrientation::ClearPosition |
( |
| ) |
|
Set the position to [0,0,0].
LSVOID LSE_FCALL lsm::COrientation::ClearRotation |
( |
| ) |
|
Set the rotation to identity.
LSVOID LSE_FCALL lsm::COrientation::ClearScale |
( |
| ) |
|
Set the scale to [1,1,1].
LSE_INLINE const CVector3 &LSE_FCALL lsm::COrientation::GetForward |
( |
| ) |
const |
Get the forward vector.
- Returns:
- Returns the forward vector of this orientation.
LSE_INLINE const CVector3 &LSE_FCALL lsm::COrientation::GetPos |
( |
| ) |
const |
Get the position.
- Returns:
- Returns the position of this orientation.
LSE_INLINE const CVector3 &LSE_FCALL lsm::COrientation::GetRight |
( |
| ) |
const |
Get the right vector.
- Returns:
- Returns the right vector of this orientation.
LSE_INLINE const CVector3 &LSE_FCALL lsm::COrientation::GetScale |
( |
| ) |
const |
Get the scale.
- Returns:
- Returns the scale of this orientation.
LSE_INLINE const CVector3 &LSE_FCALL lsm::COrientation::GetUp |
( |
| ) |
const |
Get the up vector.
- Returns:
- Returns the up vector of this orientation.
LSE_INLINE LSBOOL LSE_FCALL lsm::COrientation::IsDirty |
( |
| ) |
const |
Are we dirty at all?
- Returns:
- Returns true if the orientation is dirty and needs to update matrices.
LSE_INLINE LSVOID LSE_FCALL lsm::COrientation::MakeDirty |
( |
| ) |
|
Copy an orientation. The dirty flag on the copied orientation is always set after this operation.
- Parameters:
-
_oSrc | The source orientation. |
- Returns:
- Returns the copied object.
LSVOID LSE_FCALL lsm::COrientation::Pitch |
( |
LSREAL |
_fAmount | ) |
|
Pitch the orientation by the given amount. The object always rotates around its right axis.
- Parameters:
-
_fAmount | Amount, in radians, to pitch. |
LSVOID LSE_FCALL lsm::COrientation::Roll |
( |
LSREAL |
_fAmount | ) |
|
Roll the orientation by the given amount. The object always rotates around its forward axis.
- Parameters:
-
_fAmount | Amount, in radians, to roll. |
LSVOID LSE_FCALL lsm::COrientation::SetIdentity |
( |
| ) |
|
Set the orientation to identity.
LSVOID LSE_FCALL lsm::COrientation::SetPos |
( |
const CVector3 & |
_vPos | ) |
|
Set the absolute position.
- Parameters:
-
_vPos | The position to apply to this orientation. |
LSVOID LSE_FCALL lsm::COrientation::SetPosU |
( |
const CVector3 & |
_vPos | ) |
|
Set the absolute position. Only causes a change if the given position is not the same as the current position.
- Parameters:
-
_vPos | The position to apply to this orientation. |
LSVOID LSE_FCALL lsm::COrientation::SetRelPos |
( |
const CVector3 & |
_vPos | ) |
|
Set the position of this orientation relative to its facing direction.
- Parameters:
-
_vPos | The position to apply to this orientation. |
LSVOID LSE_FCALL lsm::COrientation::SetRotation |
( |
const CMatrix4x4 & |
_mMat | ) |
|
Set the rotation component of this orientation.
- Parameters:
-
_mMat | The full rotational component to apply to this object. |
LSVOID LSE_FCALL lsm::COrientation::SetRotation |
( |
const CVector3 & |
_vForward, |
|
|
const CVector3 & |
_vUp |
|
) |
| |
Set the rotation component of this object from forward and up vectors. The right vector is derived automatically.
- Parameters:
-
_vForward | The forward component of the rotation. |
_vUp | The up component of the rotation. |
LSVOID LSE_FCALL lsm::COrientation::SetRotationEasy |
( |
const CVector3 & |
_vForward, |
|
|
const CVector3 & |
_vUp |
|
) |
| |
Set the rotation component of this object from forward and up vectors. The right vector is derived automatically and the up vector is adjusted.
- Parameters:
-
_vForward | The forward component of the rotation. |
_vUp | The up component of the rotation. |
LSVOID LSE_FCALL lsm::COrientation::SetRotationYawPitchRoll |
( |
LSREAL |
_fYaw, |
|
|
LSREAL |
_fPitch, |
|
|
LSREAL |
_fRoll |
|
) |
| |
Set the rotation by the given yaw, pitch, and roll.
- Parameters:
-
_fYaw | Yaw around the Y axis, in radians. |
_fPitch | Pitch around the X axis, in radians. |
_fRoll | Roll around the Z axis, in radians. |
LSVOID LSE_FCALL lsm::COrientation::SetScale |
( |
const CVector3 & |
_vScale | ) |
|
Set the scale.
- Parameters:
-
_vScale | The new scale of this orientation. |
LSVOID LSE_FCALL lsm::COrientation::SetScale |
( |
LSREAL |
_fScale | ) |
|
Set the scale.
- Parameters:
-
_fScale | The new scale of this orientation. |
LSVOID LSE_FCALL lsm::COrientation::SetYaw |
( |
LSREAL |
_fAmount | ) |
|
Set the yaw to the given amount. The object always rotates around axis [0,1,0].
- Parameters:
-
_fAmount | Amount, in radians, to which to set the yaw. |
LSE_INLINE LSVOID LSE_FCALL lsm::COrientation::UndirtyRotations |
( |
| ) |
const |
Undirty rotations if necessary.
LSBOOL LSE_FCALL lsm::COrientation::UpdateMatrix |
( |
CMatrix4x4 & |
_mRet, |
|
|
LSBOOL |
_bClearDirty = true |
|
) |
| const |
Updates, if necessary, the orientation, filling the given matrix with the result. If the orientation has not been modified since the last update, no action is performed.
- Parameters:
-
_mRet | Holds the created matrix. |
_bClearDirty | Determines whether the dirty flag will be cleared after this update. This function only updates the given matrix if the dirty flag is set, so clearing the dirty flag results in no more updates until the orientation is modified in some way. In this manner, updates are only performed when needed. |
- Returns:
- Returns true if an update was performed.
LSVOID LSE_FCALL lsm::COrientation::Yaw |
( |
LSREAL |
_fAmount | ) |
|
Yaw the orientation by the given amount. The object always rotates around axis [0,1,0].
- Parameters:
-
_fAmount | Amount, in radians, to yaw. |
Member Data Documentation
The documentation for this class was generated from the following file: