NAP
Public Member Functions | Public Attributes | List of all members
RenderFrustumComponent Class Reference

#include <renderfrustumcomponent.h>

Public Member Functions

virtual void getDependentComponents (std::vector< rtti::TypeInfo > &components) const override
 
- Public Member Functions inherited from Component
virtual const rtti::TypeInfo getInstanceType () const =0
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

float mLineWidth = 2.0f
 Property: 'LineWidth' frustrum line width. More...
 
RGBColorFloat mColor = { 1.0f, 1.0f, 1.0f }
 Property: 'Color' frustrum draw color. More...
 
- Public Attributes inherited from RenderableComponent
bool mVisible = true
 Property: 'Visible' if this object is rendered to target by the render service. More...
 
ResourcePtr< RenderLayermLayer
 Property: 'Layer' the render layer assigned to this component. More...
 
std::vector< ResourcePtr< RenderTag > > mTags
 Property: 'Tags' List of tags specifying the category this render component belongs to. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Resource 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.

Inheritance diagram for RenderFrustumComponent:
[legend]
Collaboration diagram for RenderFrustumComponent:
[legend]

Member Function Documentation

◆ getDependentComponents()

virtual void getDependentComponents ( std::vector< rtti::TypeInfo > &  components) const
overridevirtual

RenderFrustumComponent requires a camera whose frustum to render

Parameters
componentsthe components this component depends upon.

Reimplemented from Component.

Member Data Documentation

◆ mColor

RGBColorFloat mColor = { 1.0f, 1.0f, 1.0f }

Property: 'Color' frustrum draw color.

◆ mLineWidth

float mLineWidth = 2.0f

Property: 'LineWidth' frustrum line width.