LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::LCamera Class Reference

#include <Camera.h>

Inheritance diagram for LkEngine::LCamera:
LkEngine::LObject LkEngine::LObjectBase LkEngine::LSceneCamera LkEngine::LEditorCamera

Public Member Functions

 LCamera (const glm::mat4 &InProjection)
 
 LCamera (const float InDegFov, const float InWidth, const float InHeight, const float InNearP, const float InFarP)
 
virtual ECameraType GetType () const
 
FORCEINLINE ECameraProjection GetProjectionType () const
 
FORCEINLINE bool IsActive () const
 
FORCEINLINE void SetPerspective (const float InVerticalFovDeg, const float InNearClip=0.1f, const float InFarClip=1000.0f)
 
FORCEINLINE void SetOrthographic (const float InWidth, const float InHeight, const float InNearClip=-1.0f, const float InFarClip=1.0f)
 
FORCEINLINE void SetProjectionType (ECameraProjection InProjection)
 
FORCEINLINE void SetPitch (const float InPitch)
 
FORCEINLINE float GetPitch () const
 
FORCEINLINE float GetPitchDelta () const
 
FORCEINLINE void SetYaw (const float InYaw)
 
FORCEINLINE float GetYaw () const
 
FORCEINLINE float GetYawDelta () const
 
FORCEINLINE void SetActive (const bool InActive)
 
FORCEINLINE const glm::mat4 & GetViewMatrix () const
 
FORCEINLINE const glm::mat4 & GetProjectionMatrix () const
 
FORCEINLINE glm::mat4 GetViewProjection () const
 
FORCEINLINE float GetRotation ()
 
FORCEINLINE float GetRotationSpeed () const
 
FORCEINLINE const glm::vec3 & GetOrigin () const
 
FORCEINLINE const glm::vec3 & GetFocalPoint () const
 
FORCEINLINE const glm::vec3 & GetDirection () const
 
FORCEINLINE float GetPerspectiveNearClip () const
 
FORCEINLINE float GetPerspectiveFarClip () const
 
FORCEINLINE void SetPerspectiveNearClip (const float InNearClip)
 
FORCEINLINE void SetPerspectiveFarClip (const float InFarClip)
 
FORCEINLINE float GetOrthographicSize () const
 
FORCEINLINE float GetOrthographicNearClip () const
 
FORCEINLINE float GetOrthographicFarClip () const
 
FORCEINLINE void SetOrthographicNearClip (const float InNearClip)
 
FORCEINLINE void SetOrthographicFarClip (const float InFarClip)
 
FORCEINLINE void SetProjectionMatrix (const glm::mat4 &InProjection)
 
FORCEINLINE void SetPerspectiveProjectionMatrix (const float InRadFov, const float InWidth, const float InHeight, const float InNearP, const float InFarP)
 
FORCEINLINE void SetOrthoProjectionMatrix (const float InWidth, const float InHeight, const float InNearP, const float InFarP)
 
template<enum EAngleUnit = EAngleUnit::Degree>
float GetPerspectiveFov () const
 
template<enum EAngleUnit = EAngleUnit::Degree>
float GetPerspectiveVerticalFov () const
 
FORCEINLINE glm::quat GetOrientation () const
 
FORCEINLINE glm::vec3 GetUpDirection () const
 
FORCEINLINE glm::vec3 GetRightDirection () const
 
template<typename TVector = glm::vec3>
TVector GetForwardDirection () const
 
void SetMouseEnabled (const bool InEnabled)
 
void SetKeyboardEnabled (const bool InEnabled)
 
- Public Member Functions inherited from LkEngine::LObject
 LObject (const LObject &Other)
 
virtual void Initialize ()
 Initialize object.
 
virtual void Destroy ()
 Destroy object, releasing all resources.
 
virtual FORCEINLINE bool IsInitialized () const
 Check if object is initialized.
 
FORCEINLINE FObjectHandle GetObjectHandle () const
 Get the object handle.
 
virtual FORCEINLINE bool IsObjectValid () const
 Check if object is valid for use.
 
virtual const LClassObjectRegistration ()=0
 Register object class.
 
virtual FORCEINLINE const LClassGetClass () const
 Get the class for this LObject.
 
virtual std::string ClassName () const =0
 Get name of the LObject class.
 
LObjectoperator= (const LObject &Other)
 
void MarkAsGarbage ()
 Mark object as garbage.
 
template<typename T >
T & As ()
 Cast object to type T.
 
template<typename T >
const T & As () const
 Cast object to type T.
 
template<typename T >
bool IsA () const
 Check if the object is or is a derivation of type T.
 
virtual FORCEINLINE bool IsAsset () const
 Check if object is an asset.
 
FORCEINLINE uint32_t GetReferenceCount () const
 Return current reference count from all object pointers.
 
- Public Member Functions inherited from LkEngine::LObjectBase
template<typename OtherClassType >
FORCEINLINE bool IsA (OtherClassType OtherObject) const
 Check if the object is the same type as the passed object's.
 

Public Attributes

FCameraProjectionChanged OnCameraProjectionChanged
 
FCameraInputModified OnCameraInputModified
 

Static Public Attributes

static FCameraActivityChanged OnCameraActivityChanged
 

Protected Attributes

bool bIsActive = false
 
ECameraProjection ProjectionType = ECameraProjection::Perspective
 
int32_t ModifierFlags = 0
 
glm::vec3 Origin = { 0.0f, 0.0f, 0.0f }
 
glm::vec3 Direction {}
 
glm::vec3 FocalPoint {}
 
glm::vec3 PositionDelta = { 0.0f, 0.0f, 0.0f }
 
float Pitch = 0.0f
 
float PitchDelta = 0.0f
 
float Yaw = 0.0f
 
float YawDelta = 0.0f
 
float AspectRatio = (16.0f / 9.0f)
 
float DegPerspectiveFov = 45.0f
 
float PerspectiveNear = 0.1f
 
float PerspectiveFar = 1000.0f
 
float OrthographicSize = 10.0f
 
float OrthographicNear = -1.0f
 
float OrthographicFar = 1.0f
 
float Rotation = 0.0f
 
float RotationSpeed = 0.280f
 
glm::mat4 ViewMatrix = glm::mat4(1.0f)
 
glm::mat4 ProjectionMatrix = glm::mat4(1.0f)
 
- Protected Attributes inherited from LkEngine::LObject
FObjectHandle ObjectHandle = 0
 
bool bObjectInitialized = false
 
EObjectFlag ObjectFlags = EObjectFlag::None
 
std::atomic< uint32_t > Ptr_ReferenceCount = 0
 

Friends

class LEditorLayer
 
class LSceneSerializer
 

Additional Inherited Members

- Static Public Member Functions inherited from LkEngine::LObject
static FORCEINLINE const LClassStaticClass ()
 Get static class object.
 
static FORCEINLINE std::string StaticClassName ()
 Static class name.
 
template<typename T >
static void ValidateLObjectImplementation ()
 Validate the implementation of a LObject.
 
- Static Public Member Functions inherited from LkEngine::LObjectBase
template<typename ClassType >
static FORCEINLINE bool IsChildOf (const ClassType *InObjectClass, const ClassType *InOtherClass)
 Check if the object is a child of another class.
 
- Protected Member Functions inherited from LkEngine::LObjectBase
void SetClass (LClass *InClass)
 Set the class.
 
FORCEINLINE const LClassGetClass () const
 Get the private class member.
 
FORCEINLINE bool IsClassValid () const
 Check if LObjectBase has a valid LClass object.
 

Detailed Description

Base camera class.

Member Data Documentation

◆ OnCameraActivityChanged

FCameraActivityChanged LkEngine::LCamera::OnCameraActivityChanged
inlinestatic

Important to note that delegates have trouble being inherited for multiple derivations. The inheritence for LEditorCamera looks like this: [ LEditorCamera --> LSceneCamera --> LCamera ] This can be troublesome so it is best to declare camera delegates static.


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