Public Member Functions | List of all members
RenderGnomonComponentInstance Class Reference

#include <rendergnomoncomponent.h>

Public Member Functions

 RenderGnomonComponentInstance (EntityInstance &entity, Component &resource)
virtual void onDraw (IRenderTarget &renderTarget, VkCommandBuffer commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix) override
virtual bool isSupported (nap::CameraComponentInstance &camera) const override
virtual bool init (utility::ErrorState &errorState) override
- Public Member Functions inherited from RenderableComponentInstance
 RenderableComponentInstance (EntityInstance &entity, Component &resource)
void draw (IRenderTarget &renderTarget, VkCommandBuffer commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix)
void setVisible (bool visible)
bool isVisible () const
- Public Member Functions inherited from ComponentInstance
 ComponentInstance (EntityInstance &entity, Component &resource)
virtual void update (double deltaTime)
nap::EntityInstancegetEntityInstance () const
nap::ComponentgetComponent () const
template<typename T >
T * getComponent () const
- Public Member Functions inherited from Object
 Object ()
virtual ~Object ()
virtual void onDestroy ()
 Object (Object &)=delete
Objectoperator= (const Object &)=delete
 Object (Object &&)=delete
Objectoperator= (Object &&)=delete

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...


Renders a nap::GnomonMesh using a hard-coded nap::GnomonShader to target. The Gnomon material is automatically created on initialization. A Transform component is required to position the Gnomon.

Inheritance diagram for RenderGnomonComponentInstance:
Collaboration diagram for RenderGnomonComponentInstance:

Constructor & Destructor Documentation

◆ RenderGnomonComponentInstance()

RenderGnomonComponentInstance ( EntityInstance entity,
Component resource 

Member Function Documentation

◆ init()

virtual bool init ( utility::ErrorState errorState)

Initialize based on resource

errorStateholds the error message when initialization fails
if the component initialized successfully

Reimplemented from RenderableComponentInstance.

◆ isSupported()

virtual bool isSupported ( nap::CameraComponentInstance camera) const

Called by the Render Service. Supports orthographic and perspective cameras

Reimplemented from RenderableComponentInstance.

◆ onDraw()

virtual void onDraw ( IRenderTarget renderTarget,
VkCommandBuffer  commandBuffer,
const glm::mat4 &  viewMatrix,
const glm::mat4 &  projectionMatrix 

Draws the Gnomon to the currently active render target.

renderTargetthe target to render to.
commandBufferthe currently active command buffer.
viewMatrixoften the camera world space location
projectionMatrixoften the camera projection matrix

Implements RenderableComponentInstance.