OpenBarnyard
 
Loading...
Searching...
No Matches
TCameraObject.h
Go to the documentation of this file.
1#pragma once
2#include "TTransformObject.h"
3#include "TRenderInterface.h"
4
6
8{
9public:
10 inline static constexpr TFLOAT s_kMinFOV = ( 1.0f / 180.0f ) * TMath::PI;
11 inline static constexpr TFLOAT s_kMaxFOV = TMath::PI;
12
13public:
16
17 void Render();
18
19 // $Barnyard: FUNCTION 006cd080
21 {
22 return std::exchange( m_fNear, fNear );
23 }
24
25 // $Barnyard: FUNCTION 006cd090
27 {
28 return std::exchange( m_fFar, fFar );
29 }
30
31 // $Barnyard: FUNCTION 006cd220
33 {
35 return std::exchange( m_fFOV, fFOV );
36 }
37
38 // $Barnyard: FUNCTION 006cd270
40 {
41 TMath::Clip( fCentreX, 0.0f, 1.0f );
42 return std::exchange( m_fCentreX, fCentreX );
43 }
44
45 // $Barnyard: FUNCTION 006cd2d0
47 {
48 TMath::Clip( fCentreY, 0.0f, 1.0f );
49 return std::exchange( m_fCentreY, fCentreY );
50 }
51
53 {
54 return m_fNear;
55 }
56
57 TFLOAT GetFar() const
58 {
59 return m_fFar;
60 }
61
62 TFLOAT GetFOV() const
63 {
64 return m_fFOV;
65 }
66
68 {
69 return m_eMode;
70 }
71
73 {
74 m_eMode = a_eMode;
75 }
76
78 {
79 return m_bEnabled;
80 }
81
83 {
84 return m_TransformObject;
85 }
86
87private:
88 TFLOAT m_fNear;
89 TFLOAT m_fFar;
90 TFLOAT m_fFOV;
91 TINT m_Unk1;
93 TFLOAT m_fCentreX;
94 TFLOAT m_fCentreY;
95 TTransformObject m_TransformObject;
96 TBOOL m_bEnabled;
97};
98
Rendering system interface for the Toshi engine.
#define TOSHI_NAMESPACE_START
Definition Defines.h:47
#define TOSHI_NAMESPACE_END
Definition Defines.h:50
float TFLOAT
Definition Typedefs.h:4
int TINT
Definition Typedefs.h:7
bool TBOOL
Definition Typedefs.h:6
TFORCEINLINE void Clip(T &rVal, const T &Min, const T &Max)
constexpr TFLOAT PI
Definition TMathInline.h:35
void SetMode(TRenderContext::CameraMode a_eMode)
TRenderContext::CameraMode GetMode() const
TFLOAT SetFar(TFLOAT fFar)
static constexpr TFLOAT s_kMinFOV
TFLOAT SetFOV(TFLOAT fFOV)
TFLOAT SetProjectionCentreY(TFLOAT fCentreY)
TFLOAT SetNear(TFLOAT fNear)
TFLOAT GetFar() const
TBOOL IsEnabled() const
TTransformObject & GetTransformObject()
static constexpr TFLOAT s_kMaxFOV
TFLOAT SetProjectionCentreX(TFLOAT fCentreX)
TFLOAT GetNear() const
TFLOAT GetFOV() const