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

Compiles the render information for an Entity to use within a RenderQueue. More...

Inheritance diagram for nkGraphics::EntityRenderInfo:
nkExport::Exportable

Public Member Functions

 EntityRenderInfo () noexcept
 
 EntityRenderInfo (const EntityRenderInfo &other) noexcept
 
 EntityRenderInfo (EntityRenderInfo &&other) noexcept
 
 EntityRenderInfo (Mesh *mesh, Shader *shader) noexcept
 
virtual ~EntityRenderInfo ()
 
EntityRenderInfoSlotgetSlot (unsigned int index) const
 
const nkMemory::BufferCast< EntityRenderInfoSlot * > & getSlots () const
 
EntitygetParentEntity () const
 
EntityRenderInfoSlotaddSlot (const EntityRenderInfoSlot &infoSlot=EntityRenderInfoSlot())
 
void eraseSlot (unsigned int index)
 
EntityRenderInfooperator= (const EntityRenderInfo &other) noexcept
 
EntityRenderInfooperator= (EntityRenderInfo &&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

Compiles the render information for an Entity to use within a RenderQueue.

This class is the starting point, where all slots and lods will be provided. A high level overview of the hierarchy is as such :

Info

For the default render strategy, each slot will be questioned for the LOD to render depending on its parameters, for a given pass. It is possible to add as many slots as wanted to the information, and each can have any amount of LOD as required.

Constructor & Destructor Documentation

◆ EntityRenderInfo() [1/4]

nkGraphics::EntityRenderInfo::EntityRenderInfo ( )
noexcept

Default constructor.

◆ EntityRenderInfo() [2/4]

nkGraphics::EntityRenderInfo::EntityRenderInfo ( const EntityRenderInfo other)
noexcept

Copy constructor.

Parameters
otherThe render information to copy from.

◆ EntityRenderInfo() [3/4]

nkGraphics::EntityRenderInfo::EntityRenderInfo ( EntityRenderInfo &&  other)
noexcept

Move constructor.

Parameters
otherThe render information to move.

◆ EntityRenderInfo() [4/4]

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

Legacy convenience constructor. This constructor mimicks what was possible before to a certain degree, by quickly creating a slot and a LOD using both parameters provided. This LOD will be used in all cases.

Parameters
meshThe mesh to use.
shaderThe shader to use.

◆ ~EntityRenderInfo()

virtual nkGraphics::EntityRenderInfo::~EntityRenderInfo ( )
virtual

Destructor.

Member Function Documentation

◆ getSlot()

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

◆ getSlots()

const nkMemory::BufferCast<EntityRenderInfoSlot*>& nkGraphics::EntityRenderInfo::getSlots ( ) const
Returns
A const reference over the slots available.

◆ getParentEntity()

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

◆ addSlot()

EntityRenderInfoSlot* nkGraphics::EntityRenderInfo::addSlot ( const EntityRenderInfoSlot infoSlot = EntityRenderInfoSlot())

Adds a slot to the information.

Parameters
infoSlotThe slot to copy from, if required.
Returns
The newly created slot, within the information's memory.

◆ eraseSlot()

void nkGraphics::EntityRenderInfo::eraseSlot ( unsigned int  index)

Erases an existing slot.

Parameters
indexThe index of the slot to erase.

◆ operator=() [1/2]

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

Copy assignment operator.

Parameters
otherThe information to copy from.

◆ operator=() [2/2]

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

Move assignment operator.

Parameters
otherThe information to move from.

◆ exportClassToTree()

virtual void nkGraphics::EntityRenderInfo::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::EntityRenderInfo::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: