API Documentation
Public Member Functions | List of all members
nkGraphics::EntityRenderInfoSlot Class Referencefinal

A slot within the render information. More...

Inheritance diagram for nkGraphics::EntityRenderInfoSlot:
nkExport::Exportable

Public Member Functions

 EntityRenderInfoSlot () noexcept
 
 EntityRenderInfoSlot (const EntityRenderInfoSlot &other) noexcept
 
 EntityRenderInfoSlot (EntityRenderInfoSlot &&other) noexcept
 
 EntityRenderInfoSlot (Mesh *mesh, Shader *shader) noexcept
 
virtual ~EntityRenderInfoSlot ()
 
EntityRenderLodSlotgetLod (unsigned int index) const
 
const nkMemory::BufferCast< EntityRenderLodSlot * > & getLods () const
 
EntitygetParentEntity () const
 
EntityRenderLodSlotaddLod (const EntityRenderLodSlot &lodSlot=EntityRenderLodSlot())
 
void eraseLod (unsigned int index)
 
EntityRenderInfoSlotoperator= (const EntityRenderInfoSlot &other) noexcept
 
EntityRenderInfoSlotoperator= (EntityRenderInfoSlot &&other) noexcept
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable () noexcept
 
virtual ~Exportable ()
 

Detailed Description

A slot within the render information.

A slot can be seen as something that will be rendered by the default render strategy during a pass, after its LOD has been selected.

Constructor & Destructor Documentation

◆ EntityRenderInfoSlot() [1/4]

nkGraphics::EntityRenderInfoSlot::EntityRenderInfoSlot ( )
noexcept

Default constructor.

◆ EntityRenderInfoSlot() [2/4]

nkGraphics::EntityRenderInfoSlot::EntityRenderInfoSlot ( const EntityRenderInfoSlot other)
noexcept

Copy constructor.

Parameters
otherThe slot to copy from.

◆ EntityRenderInfoSlot() [3/4]

nkGraphics::EntityRenderInfoSlot::EntityRenderInfoSlot ( EntityRenderInfoSlot &&  other)
noexcept

Move constructor.

Parameters
otherThe slot to move from.

◆ EntityRenderInfoSlot() [4/4]

nkGraphics::EntityRenderInfoSlot::EntityRenderInfoSlot ( Mesh mesh,
Shader shader 
)
noexcept

Legacy convenience constructor. This will simply create a unique LOD within the slot.

Parameters
meshThe mesh to use.
shaderThe shader to use.

◆ ~EntityRenderInfoSlot()

virtual nkGraphics::EntityRenderInfoSlot::~EntityRenderInfoSlot ( )
virtual

Destructor.

Member Function Documentation

◆ getLod()

EntityRenderLodSlot* nkGraphics::EntityRenderInfoSlot::getLod ( unsigned int  index) const
Parameters
indexThe index of the lod to retrieve.
Returns
The lod requested if available, nullptr otherwise.

◆ getLods()

const nkMemory::BufferCast<EntityRenderLodSlot*>& nkGraphics::EntityRenderInfoSlot::getLods ( ) const
Returns
A const reference over the buffer of lods within the slot.

◆ getParentEntity()

Entity* nkGraphics::EntityRenderInfoSlot::getParentEntity ( ) const
Returns
The parent entity, if available, nullptr else.

◆ addLod()

EntityRenderLodSlot* nkGraphics::EntityRenderInfoSlot::addLod ( const EntityRenderLodSlot lodSlot = EntityRenderLodSlot())

Adds a LOD to the slot.

Parameters
lodSlotA reference to copy from if required.
Returns
The newly created LOD.

◆ eraseLod()

void nkGraphics::EntityRenderInfoSlot::eraseLod ( unsigned int  index)

Erases an existing LOD.

Parameters
indexThe index of the LOD to erase.

◆ operator=() [1/2]

EntityRenderInfoSlot& nkGraphics::EntityRenderInfoSlot::operator= ( const EntityRenderInfoSlot other)
noexcept

Copy assignment operator.

Parameters
otherThe slot to copy from.

◆ operator=() [2/2]

EntityRenderInfoSlot& nkGraphics::EntityRenderInfoSlot::operator= ( EntityRenderInfoSlot &&  other)
noexcept

Move assignment operator.

Parameters
otherThe slot to move from.

◆ exportClassToTree()

virtual void nkGraphics::EntityRenderInfoSlot::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Exports an item into a tree describing its structure and its data.

Parameters
rootNodeThe node into which the object has to write its related information.

Implements nkExport::Exportable.

◆ importClassFromTree()

virtual void nkGraphics::EntityRenderInfoSlot::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Imports information from a tree which is supposed to describe its structure and data.

Parameters
rootNodeThe root node of the tree holding the information.

Implements nkExport::Exportable.


The documentation for this class was generated from the following file: