VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::CameraComponent Class Reference

#include <framework/components/camera/cameraComponent.h>

Inheritance diagram for visutwin::canvas::CameraComponent:
[legend]

Public Member Functions

Cameracamera ()
const Cameracamera () const
 CameraComponent (IComponentSystem *system, Entity *entity)
std::shared_ptr< RenderPassCameraFramecameraFrame () const
DofSettingsdof ()
const DofSettingsdof () const
std::shared_ptr< RenderTargetdofSceneRenderTarget () const
std::shared_ptr< RenderPassTAAensureTaaPass (const std::shared_ptr< GraphicsDevice > &device, Texture *sourceTexture)
void initializeComponentData () override
const std::vector< int > & layers () const
void * onPostprocessing () const
const Matrix4projectionMatrix () const
RenderingSettingsrendering ()
const RenderingSettingsrendering () const
const std::vector< std::shared_ptr< RenderPass > > & renderPasses () const
bool renderSceneColorMap () const
bool renderSceneDepthMap () const
bool rendersLayer (const int layerId) const
void requestSceneColorMap (bool enabled)
void requestSceneDepthMap (bool enabled)
void setCameraFrame (const std::shared_ptr< RenderPassCameraFrame > &frame)
void setDof (const DofSettings &value)
void setDofEnabled (bool enabled)
void setLayers (const std::vector< int > &layers)
void setRendering (const RenderingSettings &value)
void setSsao (const SsaoSettings &value)
void setSsaoEnabled (bool enabled)
void setTaa (const TaaSettings &value)
void setTaaEnabled (bool enabled)
SsaoSettingsssao ()
const SsaoSettingsssao () const
TaaSettingstaa ()
const TaaSettingstaa () const
 ~CameraComponent ()
Public Member Functions inherited from visutwin::canvas::Component
virtual void cloneFrom (const Component *source)
 Component (IComponentSystem *system, Entity *entity)
virtual bool enabled () const
Entityentity () const
virtual void onDisable ()
virtual void onEnable ()
virtual void onPostStateChange ()
virtual void setEnabled (bool value)
IComponentSystemsystem () const
virtual ~Component ()=default
Public Member Functions inherited from visutwin::canvas::EventHandler
template<typename... Args>
EventHandlerfire (const std::string &name, Args &&... args)
bool hasEvent (const std::string &name) const
void initEventHandler ()
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleroff (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleroff (const std::string &name="", const HandleEventCallback &callback=HandleEventCallback(), void *scope=nullptr)
EventHandleroffByHandle (EventHandle *handle)
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleon (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleon (const std::string &name, HandleEventCallback callback, void *scope=nullptr)
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleonce (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleonce (const std::string &name, HandleEventCallback callback, void *scope=nullptr)
virtual ~EventHandler ()=default

Static Public Member Functions

static const std::vector< CameraComponent * > & instances ()

Additional Inherited Members

Protected Member Functions inherited from visutwin::canvas::Component
virtual void onSetEnabled (bool oldValue, bool newValue)
Protected Member Functions inherited from visutwin::canvas::EventHandler
EventHandleaddCallback (const std::string &name, HandleEventCallback callback, void *scope=nullptr, bool once=false)
Protected Attributes inherited from visutwin::canvas::Component
bool _enabled = true
Entity_entity

Detailed Description

Definition at line 85 of file cameraComponent.h.

Constructor & Destructor Documentation

◆ CameraComponent()

visutwin::canvas::CameraComponent::CameraComponent ( IComponentSystem * system,
Entity * entity )

◆ ~CameraComponent()

visutwin::canvas::CameraComponent::~CameraComponent ( )

Definition at line 27 of file cameraComponent.cpp.

Member Function Documentation

◆ camera() [1/2]

Camera * visutwin::canvas::CameraComponent::camera ( )
inline

Definition at line 107 of file cameraComponent.h.

Referenced by visutwin::canvas::RenderAction::setupClears().

◆ camera() [2/2]

const Camera * visutwin::canvas::CameraComponent::camera ( ) const
inline

Definition at line 109 of file cameraComponent.h.

◆ cameraFrame()

std::shared_ptr< RenderPassCameraFrame > visutwin::canvas::CameraComponent::cameraFrame ( ) const
inline

Definition at line 157 of file cameraComponent.h.

◆ dof() [1/2]

DofSettings & visutwin::canvas::CameraComponent::dof ( )
inline

Definition at line 121 of file cameraComponent.h.

◆ dof() [2/2]

const DofSettings & visutwin::canvas::CameraComponent::dof ( ) const
inline

Definition at line 120 of file cameraComponent.h.

◆ dofSceneRenderTarget()

std::shared_ptr< RenderTarget > visutwin::canvas::CameraComponent::dofSceneRenderTarget ( ) const
inline

Definition at line 128 of file cameraComponent.h.

◆ ensureTaaPass()

std::shared_ptr< RenderPassTAA > visutwin::canvas::CameraComponent::ensureTaaPass ( const std::shared_ptr< GraphicsDevice > & device,
Texture * sourceTexture )

Definition at line 210 of file cameraComponent.cpp.

◆ initializeComponentData()

void visutwin::canvas::CameraComponent::initializeComponentData ( )
overridevirtual

Implements visutwin::canvas::Component.

Definition at line 45 of file cameraComponent.cpp.

References visutwin::canvas::Component::_entity.

◆ instances()

const std::vector< CameraComponent * > & visutwin::canvas::CameraComponent::instances ( )
inlinestatic

◆ layers()

const std::vector< int > & visutwin::canvas::CameraComponent::layers ( ) const
inline

Definition at line 117 of file cameraComponent.h.

Referenced by setLayers().

◆ onPostprocessing()

void * visutwin::canvas::CameraComponent::onPostprocessing ( ) const
inline

Definition at line 111 of file cameraComponent.h.

References CameraComponent().

◆ projectionMatrix()

const Matrix4 & visutwin::canvas::CameraComponent::projectionMatrix ( ) const
inline

Definition at line 93 of file cameraComponent.h.

◆ rendering() [1/2]

RenderingSettings & visutwin::canvas::CameraComponent::rendering ( )
inline

Definition at line 153 of file cameraComponent.h.

◆ rendering() [2/2]

const RenderingSettings & visutwin::canvas::CameraComponent::rendering ( ) const
inline

Definition at line 152 of file cameraComponent.h.

◆ renderPasses()

const std::vector< std::shared_ptr< RenderPass > > & visutwin::canvas::CameraComponent::renderPasses ( ) const
inline

Definition at line 98 of file cameraComponent.h.

◆ renderSceneColorMap()

bool visutwin::canvas::CameraComponent::renderSceneColorMap ( ) const
inline

Definition at line 100 of file cameraComponent.h.

Referenced by requestSceneColorMap().

◆ renderSceneDepthMap()

bool visutwin::canvas::CameraComponent::renderSceneDepthMap ( ) const
inline

Definition at line 102 of file cameraComponent.h.

Referenced by requestSceneDepthMap().

◆ rendersLayer()

bool visutwin::canvas::CameraComponent::rendersLayer ( const int layerId) const
inline

Definition at line 160 of file cameraComponent.h.

◆ requestSceneColorMap()

void visutwin::canvas::CameraComponent::requestSceneColorMap ( bool enabled)

◆ requestSceneDepthMap()

void visutwin::canvas::CameraComponent::requestSceneDepthMap ( bool enabled)

◆ setCameraFrame()

void visutwin::canvas::CameraComponent::setCameraFrame ( const std::shared_ptr< RenderPassCameraFrame > & frame)
inline

Definition at line 158 of file cameraComponent.h.

◆ setDof()

void visutwin::canvas::CameraComponent::setDof ( const DofSettings & value)
inline

Definition at line 123 of file cameraComponent.h.

References visutwin::canvas::DofSettings::enabled, and setDofEnabled().

◆ setDofEnabled()

void visutwin::canvas::CameraComponent::setDofEnabled ( bool enabled)

Definition at line 83 of file cameraComponent.cpp.

References visutwin::canvas::Component::enabled().

Referenced by setDof().

◆ setLayers()

void visutwin::canvas::CameraComponent::setLayers ( const std::vector< int > & layers)
inline

Definition at line 118 of file cameraComponent.h.

References layers().

◆ setRendering()

void visutwin::canvas::CameraComponent::setRendering ( const RenderingSettings & value)
inline

Definition at line 154 of file cameraComponent.h.

◆ setSsao()

void visutwin::canvas::CameraComponent::setSsao ( const SsaoSettings & value)
inline

Definition at line 146 of file cameraComponent.h.

References visutwin::canvas::SsaoSettings::enabled, and setSsaoEnabled().

◆ setSsaoEnabled()

void visutwin::canvas::CameraComponent::setSsaoEnabled ( bool enabled)

Definition at line 128 of file cameraComponent.cpp.

References visutwin::canvas::Component::enabled().

Referenced by setSsao().

◆ setTaa()

void visutwin::canvas::CameraComponent::setTaa ( const TaaSettings & value)
inline

Definition at line 133 of file cameraComponent.h.

References visutwin::canvas::TaaSettings::enabled, and setTaaEnabled().

◆ setTaaEnabled()

void visutwin::canvas::CameraComponent::setTaaEnabled ( bool enabled)

Definition at line 101 of file cameraComponent.cpp.

References visutwin::canvas::Component::enabled().

Referenced by setTaa().

◆ ssao() [1/2]

SsaoSettings & visutwin::canvas::CameraComponent::ssao ( )
inline

Definition at line 144 of file cameraComponent.h.

◆ ssao() [2/2]

const SsaoSettings & visutwin::canvas::CameraComponent::ssao ( ) const
inline

Definition at line 143 of file cameraComponent.h.

◆ taa() [1/2]

TaaSettings & visutwin::canvas::CameraComponent::taa ( )
inline

Definition at line 131 of file cameraComponent.h.

◆ taa() [2/2]

const TaaSettings & visutwin::canvas::CameraComponent::taa ( ) const
inline

Definition at line 130 of file cameraComponent.h.


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