#include <renderfrustumcomponent.h>
Public Member Functions | |
RenderFrustumComponentInstance (EntityInstance &entity, Component &resource) | |
virtual bool | init (utility::ErrorState &errorState) override |
const glm::vec3 & | getColor () const |
void | setColor (const glm::vec3 &color) |
virtual bool | isSupported (nap::CameraComponentInstance &camera) const override |
![]() | |
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 |
const std::vector< ResourcePtr< RenderTag > > & | getTags () const |
RenderMask | getMask () const |
bool | includesMask (RenderMask otherMask) |
int | getRank () const |
const RenderLayer * | getLayer () const |
![]() | |
ComponentInstance (EntityInstance &entity, Component &resource) | |
virtual void | update (double deltaTime) |
nap::EntityInstance * | getEntityInstance () const |
nap::Component * | getComponent () const |
template<typename T > | |
T * | getComponent () const |
virtual bool | init (utility::ErrorState &errorState) |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Protected Member Functions | |
void | onDraw (IRenderTarget &renderTarget, VkCommandBuffer commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix) override |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
![]() | |
RenderService * | mRenderService = nullptr |
Instance part of RenderFrustumComponent
Renders a camera frustum to aid in visual debugging. The is a dynamic line mesh that is updated on the CPU to match the latest camera properties e.g. field of view. Ignores the Mesh
property and creates a nap::BoxFrameMesh
with usage EMemoryUsage::DynamicWrite
. Supports nap::PerspCameraComponent
and nap::OrthoCameraComponent
. As the box frame mesh only has a position attribute this component is rendered with a simple nap::ConstantShader
.
RenderFrustumComponentInstance | ( | EntityInstance & | entity, |
Component & | resource | ||
) |
const glm::vec3& getColor | ( | ) | const |
|
overridevirtual |
Checks whether a transform component is available.
Reimplemented from RenderableComponentInstance.
|
overridevirtual |
Called by the Render Service. Supports orthographic and perspective cameras
Reimplemented from RenderableComponentInstance.
|
overrideprotectedvirtual |
Draws the current camera frustrum
Implements RenderableComponentInstance.
void setColor | ( | const glm::vec3 & | color | ) |
Set the frustrum draw color