![]() |
Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
|
A data structure that contains position, size, and rotation. More...
#include <transform.h>


Public Member Functions | |
| Transform (rune::Vec3 newPosition=rune::Vec3(0, 0, 0), rune::Vec3 newScale=rune::Vec3(1, 1, 1), rune::Vec3 newRotation=rune::Vec3(0, 0, 0)) | |
| Default constructor. More... | |
| virtual void | update () override |
| Override of the update component function to update the position of the transform if there is a parent Transform. | |
| void | setScale (rune::Vec3) |
| Set the scale vector. More... | |
| void | setScaleX (double) |
| Set the X scale. More... | |
| void | setScaleY (double) |
| Set the Y scale. More... | |
| void | setScaleZ (double) |
| Set the Z scale. More... | |
| void | setPosition (rune::Vec3) |
| Set the position vector. More... | |
| void | setPositionX (double) |
| Set the X position. More... | |
| void | setPositionY (double) |
| Set the Y position. More... | |
| void | setPositionZ (double) |
| Set the Z position. More... | |
| void | setRotation (rune::Vec3) |
| Set the rotation vector. More... | |
| void | setRotationX (double) |
| Set the X rotation. More... | |
| void | setRotationY (double) |
| Set the Y rotation. More... | |
| void | setRotationZ (double) |
| Set the Z rotation. More... | |
| void | setLocalPosition (rune::Vec3 newLocalPosition) |
| Set the position of the transform relative to the transform parent. More... | |
| rune::Vec3 | getPosition (void) |
| Get the position of the transform in world coordinates. More... | |
| rune::Vec3 | getScale (void) |
| Get the scale factor of the transform. More... | |
| rune::Vec3 | getRotation (void) |
| Get the rotation vector of the transform. More... | |
| rune::Vec3 | getLocalPosition (void) |
| Get the position of the transform with respect to the parent object. More... | |
| void | setBounds (rune::Vec2 newBounds) |
| Set the boundaries of the current renderer. More... | |
| rune::Vec2 | getBounds (void) |
| Get the boundaries of the current renderer. More... | |
Public Member Functions inherited from rune::Component | |
| Component ()=default | |
| Default constructor to set up. | |
| virtual void | awake () |
| A function that will be called before all other start functions but after the component has been assigned to a GameObject. | |
| virtual void | start () |
| A function for each component that is called once at the beginning of the components lifetime. | |
| virtual void | fixedUpdate () |
| A function for each component that is called once every physics update. | |
| void | setParent (GameObject *newParent) |
| A function to set the pointer to the parent rune::GameObject for each component. More... | |
| void | setEnable (bool newEnable) |
| Enable or disable the component. More... | |
| bool | isComponentEnabled (void) |
| Gets whether or not the current component is enabled. | |
| void | onNotify (Signal const &signal) override |
| A virtual method to be overridden by a concrete implementation of the observer class. | |
Public Attributes | |
| Transform * | parentTransform = nullptr |
| Pointer to parent object. | |
Additional Inherited Members | |
Protected Attributes inherited from rune::Component | |
| GameObject * | parentObject = nullptr |
| The rune::GameObject that this component is attached to. If not attached to a rune::GameObject this will equal nullptr. | |
| bool | isEnabled = true |
| Whether or not the component is currently enabled. If not enabled, update function will not be called. | |
A data structure that contains position, size, and rotation.
| rune::Transform::Transform | ( | rune::Vec3 | newPosition = rune::Vec3(0,0,0), |
| rune::Vec3 | newScale = rune::Vec3(1,1,1), |
||
| rune::Vec3 | newRotation = rune::Vec3(0,0,0) |
||
| ) |
| rune::Vec2 rune::Transform::getBounds | ( | void | ) |
Get the boundaries of the current renderer.
| rune::Vec3 rune::Transform::getLocalPosition | ( | void | ) |
| rune::Vec3 rune::Transform::getPosition | ( | void | ) |
Get the position of the transform in world coordinates.
| rune::Vec3 rune::Transform::getRotation | ( | void | ) |
Get the rotation vector of the transform.
| rune::Vec3 rune::Transform::getScale | ( | void | ) |
Get the scale factor of the transform.
| void rune::Transform::setBounds | ( | rune::Vec2 | newBounds | ) |
Set the boundaries of the current renderer.
| newBounds | The new boundary of the Transform. |
| void rune::Transform::setLocalPosition | ( | rune::Vec3 | newLocalPosition | ) |
| void rune::Transform::setPosition | ( | rune::Vec3 | newPosition | ) |
Set the position vector.
| newPosition | The new position vector of the Transform. |
| void rune::Transform::setPositionX | ( | double | newX | ) |
Set the X position.
| newX | The new X position of the Transform. |
| void rune::Transform::setPositionY | ( | double | newY | ) |
Set the Y position.
| newY | The new Y position of the Transform. |
| void rune::Transform::setPositionZ | ( | double | newZ | ) |
Set the Z position.
| newZ | The new Z position of the Transform. |
| void rune::Transform::setRotation | ( | rune::Vec3 | newRotation | ) |
Set the rotation vector.
| newRotation | The new rotation vector of the Transform. |
| void rune::Transform::setRotationX | ( | double | newX | ) |
Set the X rotation.
| newX | The new X rotation of the Transform. |
| void rune::Transform::setRotationY | ( | double | newY | ) |
Set the Y rotation.
| newY | The new Y rotation of the Transform. |
| void rune::Transform::setRotationZ | ( | double | newZ | ) |
Set the Z rotation.
| newZ | The new Z rotation of the Transform. |
| void rune::Transform::setScale | ( | rune::Vec3 | newScale | ) |
Set the scale vector.
| newScale | The new scale of the Transform. |
| void rune::Transform::setScaleX | ( | double | newX | ) |
Set the X scale.
| newX | The new X scale of the Transform. |
| void rune::Transform::setScaleY | ( | double | newY | ) |
Set the Y scale.
| newY | The new Y scale of the Transform. |
| void rune::Transform::setScaleZ | ( | double | newZ | ) |
Set the Z scale.
| newZ | The new Z scale of the Transform. |