Lugdunum  0.1.0
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
lug::Graphics::Render::Camera::Perspective Class Reference

#include <Perspective.hpp>

Inheritance diagram for lug::Graphics::Render::Camera::Perspective:
[legend]
Collaboration diagram for lug::Graphics::Render::Camera::Perspective:
[legend]

Public Member Functions

 Perspective (const Perspective &)=delete
 
 Perspective (Perspective &&)=delete
 
Perspectiveoperator= (const Perspective &)=delete
 
Perspectiveoperator= (Perspective &&)=delete
 
 ~Perspective ()=default
 
float getFovY () const
 
void setFovY (float fovy)
 
float getAspectRatio () const
 
void setAspectRatio (float aspectRatio)
 
- Public Member Functions inherited from lug::Graphics::Render::Camera::Camera
 Camera (const Camera &)=delete
 
 Camera (Camera &&)=delete
 
Cameraoperator= (const Camera &)=delete
 
Cameraoperator= (Camera &&)=delete
 
virtual ~Camera ()=default
 
void setZNear (float znear)
 Sets the znear (distance of near plane). More...
 
float getZNear () const
 Gets the znear (distance of near plane). More...
 
void setZFar (float zfar)
 Sets the zfar (distance of far plane). More...
 
float getZFar () const
 Gets the zfar (distance of far plane) More...
 
const Math::Mat4x4f & getProjectionMatrix ()
 Gets the projection matrix. Computes it if needed, but internally the projection matrix is cached. More...
 
const Math::Mat4x4f & getViewMatrix ()
 Gets the view matrix. Computes it if needed, but internally the view matrix is cached. More...
 
void update (const Renderer &renderer, const View &renderView, Queue &renderQueue)
 Update the render queue of the Camera by fetching the visible objects of the attached scene. More...
 
void setRenderView (View *renderView)
 
Scene::NodegetParent () const
 
void setParent (Scene::Node *parent)
 
void needUpdateProj ()
 
void needUpdateView ()
 
void lookAt (const Math::Vec3f &targetPosition, const Math::Vec3f &up, Node::TransformSpace space=Node::TransformSpace::Local)
 
- Public Member Functions inherited from lug::Graphics::Resource
 Resource (Type type, const std::string &name)
 
 Resource (const Resource &)=delete
 
 Resource (Resource &&)=delete
 
Resourceoperator= (const Resource &)=delete
 
Resourceoperator= (Resource &&)=delete
 
virtual ~Resource ()=default
 
Type getType () const
 Returns the type of the Resource. More...
 
Handle getHandle () const
 Returns the handle of the Resource. More...
 
const std::string & getName () const
 Gets the name of the Resource. More...
 
void setName (const std::string &name)
 Sets the name of the Resource. More...
 
- Public Member Functions inherited from lug::Graphics::Render::DirtyObject
 DirtyObject ()=default
 
 DirtyObject (const DirtyObject &)=delete
 
 DirtyObject (DirtyObject &&)=delete
 
DirtyObjectoperator= (const DirtyObject &)=delete
 
DirtyObjectoperator= (DirtyObject &&)=delete
 
 ~DirtyObject ()=default
 
void setDirty ()
 
void setDirty (uint32_t currentFrame)
 
void clearDirty ()
 
void clearDirty (uint32_t currentFrame)
 
bool isDirty (uint32_t currentFrame) const
 
bool isDirty () const
 

Protected Member Functions

 Perspective (const std::string &name)
 
void updateProj () override final
 
- Protected Member Functions inherited from lug::Graphics::Render::Camera::Camera
 Camera (const std::string &name)
 
void updateView ()
 

Private Attributes

float _fovy {0.0f}
 
float _aspectRatio {0.0f}
 

Friends

class Builder::Camera
 

Additional Inherited Members

- Public Types inherited from lug::Graphics::Resource
enum  Type : uint8_t {
  Type::Scene, Type::SceneNode, Type::Material, Type::Mesh,
  Type::Light, Type::Texture, Type::Pipeline, Type::Camera,
  Type::SkyBox
}
 Type of the resource. More...
 
- Protected Attributes inherited from lug::Graphics::Render::Camera::Camera
Scene::Node_parent {nullptr}
 
View_renderView {nullptr}
 
float _znear {0.1f}
 
float _zfar {100.0f}
 
bool _needUpdateProj {true}
 
bool _needUpdateView {true}
 
Math::Mat4x4f _projMatrix {Math::Mat4x4f::identity()}
 
Math::Mat4x4f _viewMatrix {Math::Mat4x4f::identity()}
 
- Protected Attributes inherited from lug::Graphics::Resource
std::string _name
 

Detailed Description

Definition at line 15 of file Perspective.hpp.

Constructor & Destructor Documentation

◆ Perspective() [1/3]

lug::Graphics::Render::Camera::Perspective::Perspective ( const Perspective )
delete

◆ Perspective() [2/3]

lug::Graphics::Render::Camera::Perspective::Perspective ( Perspective &&  )
delete

◆ ~Perspective()

lug::Graphics::Render::Camera::Perspective::~Perspective ( )
default

◆ Perspective() [3/3]

lug::Graphics::Render::Camera::Perspective::Perspective ( const std::string &  name)
explicitprotected

Definition at line 11 of file Perspective.cpp.

Member Function Documentation

◆ operator=() [1/2]

Perspective& lug::Graphics::Render::Camera::Perspective::operator= ( const Perspective )
delete

◆ operator=() [2/2]

Perspective& lug::Graphics::Render::Camera::Perspective::operator= ( Perspective &&  )
delete

◆ getFovY()

float Perspective::getFovY ( ) const
inline

Definition at line 1 of file Perspective.inl.

◆ setFovY()

void Perspective::setFovY ( float  fovy)
inline

Definition at line 5 of file Perspective.inl.

◆ getAspectRatio()

float Perspective::getAspectRatio ( ) const
inline

Definition at line 10 of file Perspective.inl.

◆ setAspectRatio()

void Perspective::setAspectRatio ( float  aspectRatio)
inline

Definition at line 14 of file Perspective.inl.

◆ updateProj()

void lug::Graphics::Render::Camera::Perspective::updateProj ( )
finaloverrideprotectedvirtual

Implements lug::Graphics::Render::Camera::Camera.

Definition at line 13 of file Perspective.cpp.

Friends And Related Function Documentation

◆ Builder::Camera

friend class Builder::Camera
friend

Definition at line 16 of file Perspective.hpp.

Member Data Documentation

◆ _fovy

float lug::Graphics::Render::Camera::Perspective::_fovy {0.0f}
private

Definition at line 39 of file Perspective.hpp.

◆ _aspectRatio

float lug::Graphics::Render::Camera::Perspective::_aspectRatio {0.0f}
private

Definition at line 40 of file Perspective.hpp.


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