|
StevEngine
StevEngine is a customizable C++ game engine.
|
Standard renderable mesh object. More...
#include <visuals/renderer/Object.hpp>
Public Member Functions | |
| Object (const std::vector< Utilities::Vertex > &vertices, const Visuals::Material &material, RenderType renderType=SOLID) | |
| Create object from vertices. | |
| Object (const std::vector< Utilities::Vertex > &vertices, const std::vector< uint32_t > &indices, const Visuals::Material &material, RenderType renderType=SOLID) | |
| Create object from vertices and indices. | |
| Object (const Object &instance) | |
| Copy constructor. | |
| void | AddShader (Renderer::ShaderProgram program) |
| Add shader program. | |
| void | RemoveShader (Renderer::ShaderType type) |
| Remove shader of specified type. | |
| void | Draw (Utilities::Matrix4 transform) const |
| Draw object with transform. | |
| void | UpdateBuffers () const |
| Update GPU buffers with object vertex and index data. | |
| void | UpdateShaderMaterial () const |
| Update Fragment shader with material data. | |
| uint32_t | GetIndexCount () const |
| Get the number of indices in object. | |
| uint32_t | GetVertexCount () const |
| Get the number of indices in object. | |
| Utilities::Range3 | GetBoundingBox () const |
| Get bouning box of object. | |
| RenderType | GetRenderType () const |
| Get the type of rendering used by this object. | |
| void | SetRenderType (RenderType type) |
| Set the type of rendering used by this object. | |
Public Attributes | |
| Visuals::Material | material |
| Material used for rendering. | |
Standard renderable mesh object.
Manages vertex data, indices, and materials for rendering 3D meshes. Handles OpenGL buffer management and shader program binding.
| StevEngine::Renderer::Object::Object | ( | const std::vector< Utilities::Vertex > & | vertices, |
| const Visuals::Material & | material, | ||
| RenderType | renderType = SOLID ) |
Create object from vertices.
| vertices | Array of vertex data |
| material | Material to render with |
| StevEngine::Renderer::Object::Object | ( | const std::vector< Utilities::Vertex > & | vertices, |
| const std::vector< uint32_t > & | indices, | ||
| const Visuals::Material & | material, | ||
| RenderType | renderType = SOLID ) |
Create object from vertices and indices.
| vertices | Array of vertex data |
| indices | Array of vertex indices |
| material | Material to render with |
| StevEngine::Renderer::Object::Object | ( | const Object & | instance | ) |
Copy constructor.
| instance | Object to copy |
| void StevEngine::Renderer::Object::AddShader | ( | Renderer::ShaderProgram | program | ) |
Add shader program.
| program | Shader program to add |
|
virtual |
Draw object with transform.
| transform | World transform matrix |
Implements StevEngine::Renderer::CustomObject.
|
inline |
Get bouning box of object.
|
inline |
Get the number of indices in object.
|
inline |
Get the type of rendering used by this object.
|
inline |
Get the number of indices in object.
| void StevEngine::Renderer::Object::RemoveShader | ( | Renderer::ShaderType | type | ) |
Remove shader of specified type.
| type | Type of shader to remove |
| void StevEngine::Renderer::Object::SetRenderType | ( | RenderType | type | ) |
Set the type of rendering used by this object.