RenderMesh Class Reference
#include <RenderMesh.h>
Description
Aspect representing a 3D object that reduces to a Mesh.
Mesh s are typically loaded from files or data buffers via Assets::Load. See Mesh documentation for more information.
Functions | |
void | AddMesh (const Mesh &) |
void | AddMesh (const std::vector< Vector > &vertices, const std::vector< uint32_t > &faces, const std::vector< Vector > &UVs=std::vector< Vector >(), const std::vector< Vector > &normals=std::vector< Vector >(), const std::vector< Vector > &userData=std::vector< Vector >()) |
Mesh & | GetMesh (uint32_t) |
uint32_t | GetMeshCount () |
void | Clear () |
Dynacoe::Material & | Material () |
void | SetRenderPrimitive (Renderer::Polygon) |
Renderer::Polygon | GetRenderPrimitive () |
void | OnDraw () |
std::string | GetInfo () |
![]() | |
std::string | GetTag () |
Entity * | GetHost () const |
template<typename T > | |
T * | GetHostAs () const |
Entity::ID | GetHostID () const |
bool | EmitEvent (const std::string &eventName, Entity::ID source=Entity::ID(), const std::vector< std::string > &args={}) |
bool | CanHandleEvent (const std::string &eventName) |
void | InstallHook (const std::string &eventName, EventHandler, void *data=nullptr) |
void | UninstallHook (const std::string &eventName, EventHandler) |
void | InstallHandler (const std::string &eventName, EventHandler, void *data=nullptr) |
void | UninstallHandler (const std::string &eventName, EventHandler) |
std::vector< std::string > | GetKnownEvents () const |
Additional Inherited Members | |
![]() | |
using | EventHandler = bool(*)(void *, Component *component, Entity::ID self, Entity::ID source, const std::vector< std::string > &args) |
![]() | |
virtual void | OnStep () |
virtual void | OnAttach () |
void | InstallEvent (const std::string &eventName, EventHandler mainHandler=nullptr, void *data=nullptr) |
void | UninstallEvent (const std::string &) |
Member Function Documentation
void AddMesh | ( | const std::vector< Vector > & | vertices, |
const std::vector< uint32_t > & | faces, | ||
const std::vector< Vector > & | UVs = std::vector< Vector >() , |
||
const std::vector< Vector > & | normals = std::vector< Vector >() , |
||
const std::vector< Vector > & | userData = std::vector< Vector >() |
||
) |
Forms the aspect into a 3D mesh via vertcies you specify.
This is a convenience function for generating your own Mesh instance manually The produced mesh is freed when this RenderMesh is destroyed.
Mesh& GetMesh | ( | uint32_t | ) |
Retrieves the given mesh instance owned.
uint32_t GetMeshCount | ( | ) |
Returns how many meshes are attached.
void Clear | ( | ) |
Resets the Aspect.
Sets the material.
void SetRenderPrimitive | ( | Renderer::Polygon | ) |
Sets the rendering primitive. The default (and most useful) is Triangle.
Renderer::Polygon GetRenderPrimitive | ( | ) |
Returns the current rendering primitive.
|
virtual |
|
virtual |
Returns a string containing human-readable information on the state of the component.
Reimplemented from Component.
The documentation for this class was generated from the following file:
- /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Components/RenderMesh.h