|
Carpenter Engine
A C++ game engine with a build once run anywhere solution
|
A Game Object loaded in the scene. More...
#include <GameObject.hpp>
Public Member Functions | |
| GameObject (std::string name) | |
| Default constructor. | |
| Vec3f | GetGlobalPosition () |
| Returns the position of the game object relative to the global 0,0. | |
| Vec3f | GetGlobalRotation () |
| Returns the overall rotation in respect to any parent game objects. | |
Public Member Functions inherited from Engine::Node | |
| Node (std::string name) | |
| Default constructor. | |
| virtual | ~Node () |
| Default destructor. | |
| size_t | AddChild (Node *child) |
| Adds a child to the node and assigns itself as the parent of the new node. | |
| Node * | GetChild (size_t index) |
| Returns a reference to the child at the specified index. | |
| Success | RemoveChild (size_t index) |
| Removes the child at the specified index. | |
| Success | SetEnabled (bool enabled=true) |
| Toggles the state of the node. | |
| virtual void | OnEnable () |
| Overridable enable method for the node. | |
| virtual void | OnDisable () |
| Overridable disable method for the node. | |
| virtual void | Init () |
| virtual void | Draw () |
| Overridable draw method for the node. | |
| virtual void | Update (float dt) |
| Overridable update method for the node. | |
Public Attributes | |
| Vec3f | Position {0.0f, 0.0f, 0.0f} |
| Vec3f | Scale {1.0f, 1.0f, 1.0f} |
| Vec3f | Rotation {0.0f, 0.0f, 0.0f} |
Public Attributes inherited from Engine::Node | |
| const char * | m_nodeType |
| std::string | m_name |
Additional Inherited Members | |
Protected Attributes inherited from Engine::Node | |
| Node * | m_parent |
A Game Object loaded in the scene.
Each game object is a node. However it also has its own position, rotation, and scale allowing it to be moved around in space.
| Engine::GameObject::GameObject | ( | std::string | name | ) |
Default constructor.
takes in an object name to make searching easier
| Engine::Vec3f Engine::GameObject::GetGlobalPosition | ( | ) |
Returns the position of the game object relative to the global 0,0.
| Engine::Vec3f Engine::GameObject::GetGlobalRotation | ( | ) |
Returns the overall rotation in respect to any parent game objects.