ModelObject class represents a model object in the engine. Thanks to engine separation from the backend, its constructor takes more parameters than its allowed by GameObjectFactory, thus it can only be created by Model Creators methods. More...
#include <ModelObject.hpp>
Public Member Functions | |
| ModelObject (Engine &engine, const std::string &name, MeshComponent meshComponent=MeshComponent{}, TransformComponent transformComponent=TransformComponent{}) | |
| Constructor for ModelObject class. As said earlier, ModelObject can only be created by Model Creators methods. So if you are reading this you are doing something wrong. | |
| ~ModelObject () override | |
| Destructor for ModelObject class. | |
| Public Member Functions inherited from vex::GameObject | |
| GameObject (Engine &engine, const std::string &name) | |
| Default constructor for GameObject. | |
| void | Destroy () |
| Destroys the GameObject and removes it from the engine's registry. | |
| virtual | ~GameObject () |
| Destructor. | |
| GameObject (const GameObject &)=delete | |
| GameObject & | operator= (const GameObject &)=delete |
| GameObject (GameObject &&other) noexcept | |
| virtual void | BeginPlay () |
| virtual void function you override to implement custom behavior when the game starts. | |
| virtual void | Update (float deltaTime) |
| virtual void function you override to implement custom behavior when the game updates (eg. every frame). | |
| vex::Entity | GetEntity () const |
| Function that returns entity object, which is the entity associated with this GameObject. Its mostly needed for parenting and other engine internal usage. | |
| Engine & | GetEngine () |
| Function that returns engine reference allowing your custom Object to use engine provided methods. | |
| template<typename T> | |
| T & | GetComponent () |
| Function that returns reference to a requested component. | |
| template<typename T> | |
| void | AddComponent (const T &comp) |
| Function that adds a component to the GameObject. | |
| template<typename T> | |
| bool | HasComponent () const |
| Function that checks if the GameObject has a component. | |
| bool | isValid () const |
| void | ParentTo (vex::Entity entity) |
| Function that parent this Object to another GameObject. You need to pass another GameObject's entity. | |
| void | setObjectType (const std::string &type) |
| Function that sets the type of the GameObject. | |
| const std::string & | getObjectType () const |
| Function that returns the type of the GameObject. | |
Additional Inherited Members | |
| Protected Attributes inherited from vex::GameObject | |
| Engine & | m_engine |
| vex::Entity | m_entity |
| bool | m_isValid |
| std::string | objectType |
ModelObject class represents a model object in the engine. Thanks to engine separation from the backend, its constructor takes more parameters than its allowed by GameObjectFactory, thus it can only be created by Model Creators methods.
Definition at line 15 of file ModelObject.hpp.
|
inline |
Constructor for ModelObject class. As said earlier, ModelObject can only be created by Model Creators methods. So if you are reading this you are doing something wrong.
Definition at line 18 of file ModelObject.hpp.
|
inlineoverride |
Destructor for ModelObject class.
Definition at line 24 of file ModelObject.hpp.