OpenBarnyard
 
Loading...
Searching...
No Matches
AGlowViewport.h
Go to the documentation of this file.
1#pragma once
2#include "Cameras/AViewport.h"
3
4#include <Math/TMatrix44.h>
5#include <Math/TPlane.h>
8
9class AGlowViewport : public Toshi::TSingleton<AGlowViewport>
10{
11public:
13 {
14 public:
15 GlowObject();
16 ~GlowObject() = default;
17
18 void Setup(
19 const Toshi::TMatrix44& a_rcTransform,
20 const Toshi::TRenderContext::VIEWPORTPARAMS& a_rcViewportParams,
21 const Toshi::TRenderContext::PROJECTIONPARAMS& a_rcProjectionParams,
22 Toshi::TRenderContext::CameraMode a_eCameraMode
23 );
24
25 TBOOL IsEnabled() const { return m_bEnabled; }
27
28 public:
29 Toshi::TMatrix44 m_oMVP;
31 Toshi::TRenderContext::VIEWPORTPARAMS m_oViewportParams;
32 Toshi::TRenderContext::PROJECTIONPARAMS m_oProjectionParams;
33 Toshi::TRenderContext::CameraMode m_eCameraMode;
35 Toshi::TSceneObject* m_pSceneObject;
37 Toshi::TFrustum m_oFrustum;
40 Toshi::TMatrix44 m_oTransform;
42 Toshi::TLightID m_iID;
43 };
44
45public:
46 // constructors/destructor
47 AGlowViewport( TINT a_iMaxNumGlowingObjects );
49
50 // Gets glow object from free list and returns pointer to it
52
53 // Removes glow object from the used list
54 void RemoveGlowObject( GlowObject* a_pGlowObject );
55
56 // Obtains IDs of glow objects that can see the sphere
57 void GetInfluencingLightIDs( const Toshi::TSphere& a_rcSphere, Toshi::TLightIDList& a_rLightIDs );
58
59 // Prepares created glow objects for rendering
60 void Update();
61
62private:
63 TINT m_iMaxNumObjects;
64 GlowObject* m_pAllocObjects;
65 GlowObject* m_pHeadUsedObject;
66 GlowObject* m_pHeadFreeObject;
67};
4x4 matrix implementation for the Toshi engine
int TINT
Definition Typedefs.h:7
bool TBOOL
Definition Typedefs.h:6
void RemoveGlowObject(GlowObject *a_pGlowObject)
void GetInfluencingLightIDs(const Toshi::TSphere &a_rcSphere, Toshi::TLightIDList &a_rLightIDs)
AGlowViewport(TINT a_iMaxNumGlowingObjects)
GlowObject * CreateGlowObject()
Toshi::TFrustum m_oFrustum
Toshi::TMatrix44 m_oMVP
Toshi::TRenderContext::VIEWPORTPARAMS m_oViewportParams
void Setup(const Toshi::TMatrix44 &a_rcTransform, const Toshi::TRenderContext::VIEWPORTPARAMS &a_rcViewportParams, const Toshi::TRenderContext::PROJECTIONPARAMS &a_rcProjectionParams, Toshi::TRenderContext::CameraMode a_eCameraMode)
Toshi::TRenderContext::PROJECTIONPARAMS m_oProjectionParams
Toshi::TMatrix44 m_oTransform
Toshi::TSceneObject * m_pSceneObject
Toshi::TRenderContext::CameraMode m_eCameraMode