|
enum | DirtyFlags { None = 0,
Position = 1,
Rotation = 2,
Scale = 4
} |
|
|
| Transform (Vector3f const &position, Quaternion const &rotation, Vector3f const &scale) |
|
void | refresh () |
|
uint32_t | getDirtyFlags (bool clearFlags=true) |
|
void | setPosition (Vector3f const &position) |
|
void | setPosition (float const x, float const y, float const z) |
|
Vector3f const & | getPosition () const |
|
void | setRotation (Quaternion const &rotation) |
|
Quaternion const & | getRotation () const |
|
void | setScale (Vector3f const &scale) |
|
Vector3f const & | getScale () const |
|
Vector3f | getForwards () const |
|
Vector3f | getUp () const |
|
Vector3f | getRight () const |
|
Matrix4x4 const & | getModelMatrix () const |
|
void | translate (Vector3f const &translation, bool local=true) |
|
void | moveForward (float const delta) |
|
void | moveUp (float const delta) |
|
void | moveRight (float const delta) |
|
void | rotate (float angle, Vector3f const &axis) |
|
void | rotate (Math::Quaternion const &rotation) |
|
void | lookAt (Vector3f const &point, Vector3f const &upVector=Vector3f::Up()) |
|
virtual void | onLoad (Core::BuilderNode const *node) override |
|
virtual void | onVariableModified (std::string const &varName) override |
|
virtual void | onSave (BuilderNode *node) const override |
|
void | getAllExposedNames (std::vector< std::string > &names) const |
|
bool | getVariable (std::string const &name, ExposedVariable &var) |
|
template<typename T > |
bool | getVariableValue (std::string const &name, T &var) |
|
template<typename T > |
bool | setVariableValue (std::string const &name, T const &value) |
|
|
void | exposeVariable (std::string const &name, std::string const &type, bool isPointer, bool isExposed, void *data) |
|
std::unordered_map< std::string, ExposedVariable > | m_ExposedVariables |
|
Vector3f Ocular::Math::Transform::getForwards |
( |
| ) |
const |
Retrieves the forwards (negative z-axis) vector of this transform.
Matrix4x4 const & Ocular::Math::Transform::getModelMatrix |
( |
| ) |
const |
Returns the model matrix composed of the current position, rotation, and scale.
Vector3f Ocular::Math::Transform::getRight |
( |
| ) |
const |
Retrieves the right (positive x-axis) vector of this transform.
Vector3f Ocular::Math::Transform::getUp |
( |
| ) |
const |
Retrieves the upwards (positive y-axis) vector of this transform.
void Ocular::Math::Transform::lookAt |
( |
Vector3f const & |
point, |
|
|
Vector3f const & |
upVector = Vector3f::Up() |
|
) |
| |
Rotates the transform so that the forward vector points at the specified point.
- Parameters
-
[in] | point | Point position in space to look at. |
[in] | upVector | Vector that specifies the new up vector. |
void Ocular::Math::Transform::moveForward |
( |
float const |
delta | ) |
|
Moves the transform along the forward vector for the given delta. Moving backwards can be achieved by specifying a negative delta.
- Parameters
-
void Ocular::Math::Transform::moveRight |
( |
float const |
delta | ) |
|
Moves the transform along the right vector for the given delta. Moving left can be achieved by specifying a negative delta.
- Parameters
-
void Ocular::Math::Transform::moveUp |
( |
float const |
delta | ) |
|
Moves the transform along the up vector for the given delta. Moving downwards can be achieved by specifying a negative delta.
- Parameters
-
Alternate creation method (opposed to the constructor) in which one is provided with a BuilderNode chain. This chain may be explored to retrieve any relevant variables, and their values, that may have been stored in it.
This method will typically mirror the onSave, in which relevant values are stored within the chain.
- Parameters
-
[in] | node | Node to extract variable information from |
Reimplemented from Ocular::Core::ObjectIO.
void Ocular::Math::Transform::onVariableModified |
( |
std::string const & |
varName | ) |
|
|
overridevirtual |
Optional method that should be called after modifying an exposed variable. This allows the implementation a chance to react to the modification if necessary.
Reimplemented from Ocular::Core::Exposable.
void Ocular::Math::Transform::refresh |
( |
| ) |
|
Forces a rebuild of the Model matrix. Typically this matrix is only built when a 'set' method is called.
void Ocular::Math::Transform::rotate |
( |
float |
angle, |
|
|
Vector3f const & |
axis |
|
) |
| |
Rotates the transform on the specified axis by the given angle.
- Parameters
-
[in] | angle | Angles to rotate in degrees. |
[in] | axis | Normalized vector axis to rotate on. |
void Ocular::Math::Transform::translate |
( |
Vector3f const & |
translation, |
|
|
bool |
local = true |
|
) |
| |
Translates the transform in the specified direction and distance.
- Parameters
-
The documentation for this class was generated from the following files:
- C:/Projects/OcularEngine/OcularCore/include/Math/Transform.hpp
- C:/Projects/OcularEngine/OcularCore/src/Math/Transform.cpp