Castor3D 0.16.0
Multiplatform 3D engine
|
#include <InstantiationComponent.hpp>
Classes | |
struct | ComponentData |
struct | Data |
class | Plugin |
Public Types | |
using | InstanceDataMap = castor::Map< uint32_t, Data > |
Public Member Functions | |
C3D_API | InstantiationComponent (Submesh &submesh, uint32_t threshold=1u) |
Constructor. | |
C3D_API SubmeshComponentUPtr | clone (Submesh &submesh) const override |
Clones this component into given submesh. | |
C3D_API ProgramFlags | getProgramFlags (Pass const &pass) const noexcept override |
C3D_API bool | isInstanced (Pass const &pass) const |
C3D_API bool | isInstanced () const |
ComponentData & | getData () const noexcept |
Public Member Functions inherited from castor3d::SubmeshComponent | |
C3D_API | SubmeshComponent (Submesh &submesh, castor::String const &type, SubmeshComponentDataUPtr data={}, castor::StringArray deps={}) |
Constructor. | |
virtual C3D_API | ~SubmeshComponent () noexcept=default |
Destructor. | |
virtual C3D_API bool | writeText (castor::String const &tabs, castor::Path const &folder, castor::String const &subfolder, castor::StringStream &file) const |
Writes the component content to text. | |
virtual C3D_API void | accept (ConfigurationVisitorBase &vis) |
ConfigurationVisitorBase acceptance function. | |
virtual C3D_API SubmeshComponentFlag | getSubmeshFlags () const noexcept |
C3D_API void | initialiseRenderData () |
Initialises the render data specific for this component's submesh. | |
castor::String const & | getType () const noexcept |
castor::StringArray const & | getDependencies () const noexcept |
SubmeshComponentPlugin const & | getPlugin () const noexcept |
SubmeshComponentID | getId () const noexcept |
SubmeshComponentDataRPtr | getBaseData () const noexcept |
SubmeshRenderData * | getRenderData () const noexcept |
template<typename DataT > | |
DataT * | getDataT () const noexcept |
template<typename DataT > | |
DataT * | getRenderDataT () const noexcept |
Public Member Functions inherited from castor::OwnedBy< Submesh > | |
Submesh * | getOwner () const |
Static Public Member Functions | |
static SubmeshComponentPluginUPtr | createPlugin (SubmeshComponentRegister const &submeshComponents) |
Static Public Attributes | |
static C3D_API castor::String const | TypeName |
Additional Inherited Members | |
Protected Member Functions inherited from castor::OwnedBy< Submesh > | |
OwnedBy (Submesh &owner) | |
Constructor. | |
Protected Attributes inherited from castor3d::SubmeshComponent | |
SubmeshComponentDataUPtr | m_data |
SubmeshRenderDataPtr | m_renderData |
using castor3d::InstantiationComponent::InstanceDataMap = castor::Map< uint32_t, Data > |
|
explicit |
Constructor.
[in] | submesh | The parent submesh. |
[in] | threshold | The threshold from which a submesh will be instantiated. |
|
overridevirtual |
Clones this component into given submesh.
[in,out] | submesh | Receives the cloned component. |
Implements castor3d::SubmeshComponent.
|
inlinestatic |
|
inlinenoexcept |
|
overridevirtualnoexcept |
[in] | pass | The material pass. |
Reimplemented from castor3d::SubmeshComponent.
C3D_API bool castor3d::InstantiationComponent::isInstanced | ( | ) | const |
true
if the max instance count is greater than the threshold. [in] | pass | The material pass. |
true
if the instance count for given material is greater than the threshold.
|
static |