|
Infinity Engine v0.6.20
C++ API Documentation
|
Complete renderable object combining geometry, materials, and instancing. More...
#include <Renderable.hpp>
Public Member Functions | |
| Renderable () | |
| Default constructor. | |
| virtual | ~Renderable () |
| Destructor. | |
| std::unique_ptr< Core::Base > | clone () const override |
| const Infinity::Types::TypeID & | typeId () const override |
| Gets the TypeID for Renderable. | |
Public Member Functions inherited from Infinity::Types::Core::Data | |
| Data () | |
| Data (const Data &other) | |
| Data (Data &&other) | |
| Data & | operator= (const Data &other) |
| Data & | operator= (Data &&other) |
| virtual | ~Data () |
| Virtual destructor. | |
| bool | hasProperty (const std::string &key) const |
| template<typename T > | |
| void | setProperty (const std::string &key, T &&value) |
| Sets a typed property value. | |
| template<typename T > | |
| void | setProperty (const std::string &key, const T &value) |
| Sets a typed property value. | |
| void | setProperty (const std::string &key, PropertyValue &&value) |
| Sets a typed property value. | |
| const PropertyValue & | getProperty (const std::string &key) const |
| Gets a property value without type checking. | |
| template<typename T > | |
| const T & | getProperty (const std::string &key) const |
| Gets a typed property value. | |
| void | removeProperty (const std::string &key) |
Public Member Functions inherited from Infinity::Types::Core::Base | |
| virtual | ~Base () |
| Virtual destructor. | |
| virtual std::istream & | legibleDataRead (std::istream &in) override |
| Deserializes the object from a single-line text representation. | |
| virtual std::ostream & | legibleDataWrite (std::ostream &out) const override |
| Serializes the object to a single-line text representation. | |
Public Attributes | |
| Mesh | mesh |
| Mesh geometry for this renderable. | |
| Containers::Array< Material > | materials |
| Array of materials applied to the mesh. | |
| Containers::Array< Spatial::Transform > | instances |
| Array of transform instances for instanced rendering. | |
Public Attributes inherited from Infinity::Types::Core::Data | |
| std::unordered_map< std::string, PropertyValue > | properties |
| Property storage for arbitrary metadata. | |
Complete renderable object combining geometry, materials, and instancing.
Renderable represents a complete, self-contained object ready for rendering in the Infinity Engine. It combines a Mesh (geometry), an array of Materials (appearance), and an array of Transform instances (placement), providing everything needed to render one or more instances of an object in the scene.
The renderable structure enables:
Key relationships:
Common use cases:
Example usage:
| Infinity::Types::Rendering::Renderable::Renderable | ( | ) |
Default constructor.
Creates an empty renderable with no geometry, materials, or instances.
|
virtual |
Destructor.
|
overridevirtual |
Reimplemented from Infinity::Types::Core::Data.
|
overridevirtual |
Gets the TypeID for Renderable.
Reimplemented from Infinity::Types::Core::Data.
| Containers::Array<Spatial::Transform> Infinity::Types::Rendering::Renderable::instances |
Array of transform instances for instanced rendering.
Each Transform defines position, rotation, and scale for one instance of the mesh. Empty array indicates single instance at identity transform (origin, no rotation, unit scale).
Instancing allows efficient rendering of the same geometry at multiple locations with different transforms, ideal for foliage, rocks, props, and other repeated elements.
| Containers::Array<Material> Infinity::Types::Rendering::Renderable::materials |
Array of materials applied to the mesh.
Materials are referenced by index from SubMesh.materialIndex. The array must contain at least as many materials as the highest materialIndex used in the mesh's submeshes plus one.