|
Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
|
This component is used to keep track of the meshes and textures to render. NOTE: only the Entity class is allowed to create this component. More...
#include <ModelComponent.hpp>
Public Member Functions | |
| virtual | ~ModelComponent () |
| void | SetModel (eastl::shared_ptr< Model > newModel) |
| This method allows you to change the model to render of this model component. More... | |
| void | SetModel (const eastl::string &path) |
| This method allows you to change the model to render of this model component. More... | |
| eastl::weak_ptr< Model > | GetModel () const |
| This method will return the current model of this model component. More... | |
| template<typename archive > | |
| void | SaveComponent (archive ar) |
| Saves the data of this component to a archive More... | |
| template<typename archive > | |
| void | LoadComponent (archive ar) |
| loads the data from the archive to this component More... | |
Public Member Functions inherited from Engine::Component | |
| virtual | ~Component ()=default |
| eastl::weak_ptr< Entity > | GetOwner () const |
| This method allows you to get the entity holding this component. More... | |
Friends | |
| class | Entity |
Additional Inherited Members | |
Public Attributes inherited from Engine::Component | |
| bool | isEnabled |
Protected Member Functions inherited from Engine::Component | |
| Component () | |
| template<typename ComponentType > | |
| eastl::weak_ptr< ComponentType > | GetComponent () |
| This method allows you to get the first component of the given type. More... | |
| template<typename ComponentType > | |
| eastl::vector< eastl::weak_ptr< ComponentType > > | GetComponents () |
| This method allows you to get all of the components of the given type. More... | |
| eastl::vector< eastl::shared_ptr< Component > > | GetAllComponents () const |
| Returns all the components of this entity. More... | |
| template<class ComponentType , class... Args> | |
| eastl::weak_ptr< ComponentType > | AddComponent (Args &&...args) |
| Allows you to create a component of the given type. More... | |
| template<class ComponentType , class... Args> | |
| eastl::vector< eastl::weak_ptr< ComponentType > > | AddComponents (size_t count, Args &&...args) |
| Allows you to create X amount of components of the given type. More... | |
| template<typename ComponentType > | |
| void | RemoveComponent (size_t amountToRemove=1) const |
| Allows X amount of components of the given type. More... | |
| template<typename ComponentType > | |
| void | RemoveAllComponents () const |
| Deletes all the components of the given type. More... | |
| template<typename archive > | |
| void | SaveBaseComponent (archive ar) |
| Saves the data of this component to a archive (all derived classes have their own version, but if needed they can call this one as a failsafe/default version) More... | |
| template<typename archive > | |
| void | LoadBaseComponent (archive ar) |
| loads the data from the archive to this component (all derived classes have their own version, but if needed they can call this one as a failsafe/default version) More... | |
| virtual void | OnBeginContact (eastl::weak_ptr< Entity > entity) |
| virtual void | OnEndContact (eastl::weak_ptr< Entity > entity) |
| eastl::weak_ptr< Component > | GetPointerRefence () const |
| This method allows you to get a direct refence to the weak pointer of this component. More... | |
| template<typename ComponentType > | |
| eastl::weak_ptr< ComponentType > | GetPointerRefence () |
| This method allows you to get a direct refence to the weak pointer of this component. More... | |
This component is used to keep track of the meshes and textures to render. NOTE: only the Entity class is allowed to create this component.
Definition at line 13 of file ModelComponent.hpp.
|
virtual |
Definition at line 26 of file ModelComponent.cpp.
| eastl::weak_ptr< Model > Engine::ModelComponent::GetModel | ( | ) | const |
This method will return the current model of this model component.
Definition at line 51 of file ModelComponent.cpp.
| void Engine::ModelComponent::LoadComponent | ( | archive | ar | ) |
loads the data from the archive to this component
| ar | the archive that you want to load from |
Definition at line 102 of file ModelComponent.cpp.
| void Engine::ModelComponent::SaveComponent | ( | archive | ar | ) |
Saves the data of this component to a archive
| ar | the archive that you want to save to |
Definition at line 96 of file ModelComponent.cpp.
| void Engine::ModelComponent::SetModel | ( | eastl::shared_ptr< Model > | newModel | ) |
This method allows you to change the model to render of this model component.
| newModel | The new model to use. |
Definition at line 31 of file ModelComponent.cpp.
| void Engine::ModelComponent::SetModel | ( | const eastl::string & | path | ) |
This method allows you to change the model to render of this model component.
| path | The path of the new model to use. |
Definition at line 36 of file ModelComponent.cpp.
|
friend |
Definition at line 16 of file ModelComponent.hpp.
1.8.11