Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Defines a camera with projection matrix. More...
#include <foray_camera.hpp>
Public Member Functions | |
void | InitDefault () |
glm::mat4 & | ProjectionMat () |
void | SetProjectionMatrix () |
void | SetProjectionMatrix (float verticalFov, float aspect, float near, float far) |
virtual void | UpdateUbo (CameraUboBlock &uboblock) |
virtual void | OnResized (VkExtent2D extent) override |
Invoked when the primary render resolution changes. | |
![]() | |
Node * | GetNode () |
Node this component is attached to. Casts mRegistry to Node. | |
virtual Scene * | GetScene () override |
Scene this component is a part of. Casts mRegistry->mCallbackDispatcher to Scene. | |
virtual Registry * | GetGlobals () override |
Global component registry. Casts mRegistry->mCallbackDispatcher to Scene and returns Scene->GetGlobals() | |
virtual core::Context * | GetContext () override |
Vulkan Context. Casts mRegistry->mCallbackDispatcher to Scene and returns Scene->GetContext() | |
![]() | |
virtual | ~Component () |
Destructor. Provide virtual constructors in inheriting classes, to make sure they get finalized correctly. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
![]() | |
void | Invoke (TArg event) |
Static Public Member Functions | |
static float | CalculateAspect (const VkExtent2D extent) |
Protected Attributes | |
float | mVerticalFov = 0 |
float | mAspect = 0.f |
float | mNear = 0 |
float | mFar = 0 |
glm::vec3 | mUpDirection = glm::vec3(0.f, 1.f, 0.f) |
glm::mat4 | mProjectionMatrix = glm::mat4(1) |
![]() | |
Registry * | mRegistry = nullptr |
std::string | mName = "" |
Additional Inherited Members | |
![]() | |
using | TArg = VkExtent2D |
![]() | |
friend | Registry |
![]() | |
static const bool | ORDERED_EXECUTION = false |
![]() | |
virtual void | __makeMePolymorphic () |
Defines a camera with projection matrix.
|
inlinestatic |
void foray::scene::ncomp::Camera::InitDefault | ( | ) |
|
overridevirtual |
Invoked when the primary render resolution changes.
Implements foray::scene::Component::OnResizedCallback.
|
inline |
void foray::scene::ncomp::Camera::SetProjectionMatrix | ( | ) |
void foray::scene::ncomp::Camera::SetProjectionMatrix | ( | float | verticalFov, |
float | aspect, | ||
float | near, | ||
float | far | ||
) |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |