Renamed CSceneManager to CScene

This commit is contained in:
parax0 2016-01-06 03:19:06 -07:00
parent 30774e33d1
commit 3fa109d5b8
43 changed files with 85 additions and 85 deletions

View File

@ -145,7 +145,6 @@ HEADERS += \
Scene/CLightNode.h \ Scene/CLightNode.h \
Scene/CModelNode.h \ Scene/CModelNode.h \
Scene/CRootNode.h \ Scene/CRootNode.h \
Scene/CSceneManager.h \
Scene/CSceneNode.h \ Scene/CSceneNode.h \
Scene/CScriptNode.h \ Scene/CScriptNode.h \
Scene/CStaticNode.h \ Scene/CStaticNode.h \
@ -179,7 +178,8 @@ HEADERS += \
Resource/Script/IPropertyTemplate.h \ Resource/Script/IPropertyTemplate.h \
Resource/Script/IProperty.h \ Resource/Script/IProperty.h \
Resource/Model/EVertexAttribute.h \ Resource/Model/EVertexAttribute.h \
Render/FRenderOptions.h Render/FRenderOptions.h \
Scene/CScene.h
# Source Files # Source Files
SOURCES += \ SOURCES += \
@ -235,7 +235,6 @@ SOURCES += \
Scene/CCollisionNode.cpp \ Scene/CCollisionNode.cpp \
Scene/CLightNode.cpp \ Scene/CLightNode.cpp \
Scene/CModelNode.cpp \ Scene/CModelNode.cpp \
Scene/CSceneManager.cpp \
Scene/CSceneNode.cpp \ Scene/CSceneNode.cpp \
Scene/CScriptNode.cpp \ Scene/CScriptNode.cpp \
Scene/CStaticNode.cpp \ Scene/CStaticNode.cpp \
@ -263,4 +262,5 @@ SOURCES += \
ScriptExtra/CRadiusSphereExtra.cpp \ ScriptExtra/CRadiusSphereExtra.cpp \
Resource/Cooker/CAreaCooker.cpp \ Resource/Cooker/CAreaCooker.cpp \
Resource/Script/IPropertyTemplate.cpp \ Resource/Script/IPropertyTemplate.cpp \
Resource/Script/IProperty.cpp Resource/Script/IProperty.cpp \
Scene/CScene.cpp

View File

@ -7,10 +7,10 @@
struct SViewInfo struct SViewInfo
{ {
class CSceneManager *pScene; class CScene *pScene;
class CRenderer *pRenderer; class CRenderer *pRenderer;
class CCamera *pCamera; class CCamera *pCamera;
bool GameMode; bool GameMode;
CFrustumPlanes ViewFrustum; CFrustumPlanes ViewFrustum;
CMatrix4f RotationOnlyViewMatrix; CMatrix4f RotationOnlyViewMatrix;

View File

@ -3,7 +3,7 @@
#include "Core/Render/CGraphics.h" #include "Core/Render/CGraphics.h"
#include "Core/Render/CRenderer.h" #include "Core/Render/CRenderer.h"
CCollisionNode::CCollisionNode(CSceneManager *pScene, CSceneNode *pParent, CCollisionMeshGroup *pCollision) CCollisionNode::CCollisionNode(CScene *pScene, CSceneNode *pParent, CCollisionMeshGroup *pCollision)
: CSceneNode(pScene, pParent) : CSceneNode(pScene, pParent)
{ {
SetCollision(pCollision); SetCollision(pCollision);

View File

@ -9,7 +9,7 @@ class CCollisionNode : public CSceneNode
TResPtr<CCollisionMeshGroup> mpCollision; TResPtr<CCollisionMeshGroup> mpCollision;
public: public:
CCollisionNode(CSceneManager *pScene, CSceneNode *pParent = 0, CCollisionMeshGroup *pCollision = 0); CCollisionNode(CScene *pScene, CSceneNode *pParent = 0, CCollisionMeshGroup *pCollision = 0);
ENodeType NodeType(); ENodeType NodeType();
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo); void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo); void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);

View File

@ -4,7 +4,7 @@
#include "Core/Render/CRenderer.h" #include "Core/Render/CRenderer.h"
#include <Math/MathUtil.h> #include <Math/MathUtil.h>
CLightNode::CLightNode(CSceneManager *pScene, CSceneNode *pParent, CLight *Light) CLightNode::CLightNode(CScene *pScene, CSceneNode *pParent, CLight *Light)
: CSceneNode(pScene, pParent) : CSceneNode(pScene, pParent)
{ {
mpLight = Light; mpLight = Light;

View File

@ -8,7 +8,7 @@ class CLightNode : public CSceneNode
{ {
CLight *mpLight; CLight *mpLight;
public: public:
CLightNode(CSceneManager *pScene, CSceneNode *pParent = 0, CLight *Light = 0); CLightNode(CScene *pScene, CSceneNode *pParent = 0, CLight *Light = 0);
ENodeType NodeType(); ENodeType NodeType();
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo); void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo); void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);

View File

@ -4,7 +4,7 @@
#include "Core/Render/CGraphics.h" #include "Core/Render/CGraphics.h"
#include <Math/MathUtil.h> #include <Math/MathUtil.h>
CModelNode::CModelNode(CSceneManager *pScene, CSceneNode *pParent, CModel *pModel) : CSceneNode(pScene, pParent) CModelNode::CModelNode(CScene *pScene, CSceneNode *pParent, CModel *pModel) : CSceneNode(pScene, pParent)
{ {
SetModel(pModel); SetModel(pModel);
mScale = CVector3f(1.f); mScale = CVector3f(1.f);

View File

@ -12,7 +12,7 @@ class CModelNode : public CSceneNode
bool mForceAlphaOn; bool mForceAlphaOn;
public: public:
explicit CModelNode(CSceneManager *pScene, CSceneNode *pParent = 0, CModel *pModel = 0); explicit CModelNode(CScene *pScene, CSceneNode *pParent = 0, CModel *pModel = 0);
virtual ENodeType NodeType(); virtual ENodeType NodeType();
virtual void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo); virtual void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);

View File

@ -8,7 +8,7 @@
class CRootNode : public CSceneNode class CRootNode : public CSceneNode
{ {
public: public:
explicit CRootNode(CSceneManager *pScene, CSceneNode *pParent = 0) : CSceneNode(pScene, pParent) {} explicit CRootNode(CScene *pScene, CSceneNode *pParent = 0) : CSceneNode(pScene, pParent) {}
~CRootNode() {} ~CRootNode() {}
ENodeType NodeType() { ENodeType NodeType() {

View File

@ -1,4 +1,4 @@
#include "CSceneManager.h" #include "CScene.h"
#include "Core/Render/CGraphics.h" #include "Core/Render/CGraphics.h"
#include "Core/Resource/CResCache.h" #include "Core/Resource/CResCache.h"
#include "Core/Resource/Script/CScriptLayer.h" #include "Core/Resource/Script/CScriptLayer.h"
@ -18,7 +18,7 @@
* Advantage of this is that I don't need to write separate functions for every single node type * Advantage of this is that I don't need to write separate functions for every single node type
* They can all be tracked together and the code could be streamlined a lot. * They can all be tracked together and the code could be streamlined a lot.
*/ */
CSceneManager::CSceneManager() CScene::CScene()
{ {
mSplitTerrain = true; mSplitTerrain = true;
mNodeCount = 0; mNodeCount = 0;
@ -28,12 +28,12 @@ CSceneManager::CSceneManager()
mpAreaRootNode = nullptr; mpAreaRootNode = nullptr;
} }
CSceneManager::~CSceneManager() CScene::~CScene()
{ {
ClearScene(); ClearScene();
} }
CModelNode* CSceneManager::AddModel(CModel *m) CModelNode* CScene::AddModel(CModel *m)
{ {
if (m == nullptr) return nullptr; if (m == nullptr) return nullptr;
@ -43,7 +43,7 @@ CModelNode* CSceneManager::AddModel(CModel *m)
return node; return node;
} }
CStaticNode* CSceneManager::AddStaticModel(CStaticModel *mdl) CStaticNode* CScene::AddStaticModel(CStaticModel *mdl)
{ {
if (mdl == nullptr) return nullptr; if (mdl == nullptr) return nullptr;
@ -53,7 +53,7 @@ CStaticNode* CSceneManager::AddStaticModel(CStaticModel *mdl)
return node; return node;
} }
CCollisionNode* CSceneManager::AddCollision(CCollisionMeshGroup *mesh) CCollisionNode* CScene::AddCollision(CCollisionMeshGroup *mesh)
{ {
if (mesh == nullptr) return nullptr; if (mesh == nullptr) return nullptr;
@ -63,7 +63,7 @@ CCollisionNode* CSceneManager::AddCollision(CCollisionMeshGroup *mesh)
return node; return node;
} }
CScriptNode* CSceneManager::AddScriptObject(CScriptObject *obj) CScriptNode* CScene::AddScriptObject(CScriptObject *obj)
{ {
if (obj == nullptr) return nullptr; if (obj == nullptr) return nullptr;
@ -73,7 +73,7 @@ CScriptNode* CSceneManager::AddScriptObject(CScriptObject *obj)
return node; return node;
} }
CLightNode* CSceneManager::AddLight(CLight *Light) CLightNode* CScene::AddLight(CLight *Light)
{ {
if (Light == nullptr) return nullptr; if (Light == nullptr) return nullptr;
@ -83,7 +83,7 @@ CLightNode* CSceneManager::AddLight(CLight *Light)
return node; return node;
} }
void CSceneManager::SetActiveArea(CGameArea* _area) void CScene::SetActiveArea(CGameArea* _area)
{ {
// Clear existing area // Clear existing area
delete mpAreaRootNode; delete mpAreaRootNode;
@ -188,12 +188,12 @@ void CSceneManager::SetActiveArea(CGameArea* _area)
std::cout << CSceneNode::NumNodes() << " nodes\n"; std::cout << CSceneNode::NumNodes() << " nodes\n";
} }
void CSceneManager::SetActiveWorld(CWorld* _world) void CScene::SetActiveWorld(CWorld* _world)
{ {
mpWorld = _world; mpWorld = _world;
} }
void CSceneManager::ClearScene() void CScene::ClearScene()
{ {
if (mpAreaRootNode) if (mpAreaRootNode)
{ {
@ -212,7 +212,7 @@ void CSceneManager::ClearScene()
mNodeCount = 0; mNodeCount = 0;
} }
void CSceneManager::AddSceneToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo) void CScene::AddSceneToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo)
{ {
FRenderOptions Options = pRenderer->RenderOptions(); FRenderOptions Options = pRenderer->RenderOptions();
@ -249,7 +249,7 @@ void CSceneManager::AddSceneToRenderer(CRenderer *pRenderer, const SViewInfo& Vi
} }
} }
SRayIntersection CSceneManager::SceneRayCast(const CRay& Ray, const SViewInfo& ViewInfo) SRayIntersection CScene::SceneRayCast(const CRay& Ray, const SViewInfo& ViewInfo)
{ {
// Terribly hacky stuff to avoid having tons of redundant code // Terribly hacky stuff to avoid having tons of redundant code
// because I'm too lazy to rewrite CSceneManager right now and fix it // because I'm too lazy to rewrite CSceneManager right now and fix it
@ -295,7 +295,7 @@ SRayIntersection CSceneManager::SceneRayCast(const CRay& Ray, const SViewInfo& V
return Tester.TestNodes(ViewInfo); return Tester.TestNodes(ViewInfo);
} }
void CSceneManager::PickEnvironmentObjects() void CScene::PickEnvironmentObjects()
{ {
// Pick AreaAttributes // Pick AreaAttributes
for (auto it = mAreaAttributesObjects.begin(); it != mAreaAttributesObjects.end(); it++) for (auto it = mAreaAttributesObjects.begin(); it != mAreaAttributesObjects.end(); it++)
@ -308,7 +308,7 @@ void CSceneManager::PickEnvironmentObjects()
} }
} }
CScriptNode* CSceneManager::ScriptNodeByID(u32 InstanceID) CScriptNode* CScene::ScriptNodeByID(u32 InstanceID)
{ {
auto it = mScriptNodeMap.find(InstanceID); auto it = mScriptNodeMap.find(InstanceID);
@ -316,12 +316,12 @@ CScriptNode* CSceneManager::ScriptNodeByID(u32 InstanceID)
else return nullptr; else return nullptr;
} }
CScriptNode* CSceneManager::NodeForObject(CScriptObject *pObj) CScriptNode* CScene::NodeForObject(CScriptObject *pObj)
{ {
return ScriptNodeByID(pObj->InstanceID()); return ScriptNodeByID(pObj->InstanceID());
} }
CLightNode* CSceneManager::NodeForLight(CLight *pLight) CLightNode* CScene::NodeForLight(CLight *pLight)
{ {
// Slow. Is there a better way to do this? // Slow. Is there a better way to do this?
for (auto it = mLightNodes.begin(); it != mLightNodes.end(); it++) for (auto it = mLightNodes.begin(); it != mLightNodes.end(); it++)
@ -330,7 +330,7 @@ CLightNode* CSceneManager::NodeForLight(CLight *pLight)
return nullptr; return nullptr;
} }
CModel* CSceneManager::GetActiveSkybox() CModel* CScene::GetActiveSkybox()
{ {
if (mpActiveAreaAttributes) if (mpActiveAreaAttributes)
{ {
@ -347,7 +347,7 @@ CModel* CSceneManager::GetActiveSkybox()
else return nullptr; else return nullptr;
} }
CGameArea* CSceneManager::GetActiveArea() CGameArea* CScene::GetActiveArea()
{ {
return mpArea; return mpArea;
} }

View File

@ -1,5 +1,5 @@
#ifndef CSCENEMANAGER_h #ifndef CSCENE_H
#define CSCENEMANAGER_h #define CSCENE_H
#include "CSceneNode.h" #include "CSceneNode.h"
#include "CRootNode.h" #include "CRootNode.h"
@ -19,7 +19,7 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
class CSceneManager class CScene
{ {
bool mSplitTerrain; bool mSplitTerrain;
@ -43,8 +43,8 @@ class CSceneManager
std::unordered_map<u32, CScriptNode*> mScriptNodeMap; std::unordered_map<u32, CScriptNode*> mScriptNodeMap;
public: public:
CSceneManager(); CScene();
~CSceneManager(); ~CScene();
// Scene Management // Scene Management
CModelNode* AddModel(CModel *mdl); CModelNode* AddModel(CModel *mdl);
@ -67,4 +67,4 @@ public:
CGameArea* GetActiveArea(); CGameArea* GetActiveArea();
}; };
#endif // CSCENEMANAGER_H #endif // CSCENE_H

View File

@ -13,7 +13,7 @@
u32 CSceneNode::smNumNodes = 0; u32 CSceneNode::smNumNodes = 0;
CColor CSceneNode::skSelectionTint = CColor::Integral(39, 154, 167); CColor CSceneNode::skSelectionTint = CColor::Integral(39, 154, 167);
CSceneNode::CSceneNode(CSceneManager *pScene, CSceneNode *pParent) CSceneNode::CSceneNode(CScene *pScene, CSceneNode *pParent)
{ {
smNumNodes++; smNumNodes++;
mpScene = pScene; mpScene = pScene;
@ -322,7 +322,7 @@ CSceneNode* CSceneNode::Parent() const
return mpParent; return mpParent;
} }
CSceneManager* CSceneNode::Scene() const CScene* CSceneNode::Scene() const
{ {
return mpScene; return mpScene;
} }

View File

@ -16,7 +16,7 @@
#include <Math/ETransformSpace.h> #include <Math/ETransformSpace.h>
class CRenderer; class CRenderer;
class CSceneManager; class CScene;
class CSceneNode : public IRenderable class CSceneNode : public IRenderable
{ {
@ -33,7 +33,7 @@ protected:
static u32 smNumNodes; static u32 smNumNodes;
TString mName; TString mName;
CSceneNode *mpParent; CSceneNode *mpParent;
CSceneManager *mpScene; CScene *mpScene;
CVector3f mPosition; CVector3f mPosition;
CQuaternion mRotation; CQuaternion mRotation;
@ -51,7 +51,7 @@ protected:
CColor mAmbientColor; CColor mAmbientColor;
public: public:
explicit CSceneNode(CSceneManager *pScene, CSceneNode *pParent = 0); explicit CSceneNode(CScene *pScene, CSceneNode *pParent = 0);
virtual ~CSceneNode(); virtual ~CSceneNode();
virtual ENodeType NodeType() = 0; virtual ENodeType NodeType() = 0;
virtual void AddToRenderer(CRenderer* /*pRenderer*/, const SViewInfo& /*ViewInfo*/) {} virtual void AddToRenderer(CRenderer* /*pRenderer*/, const SViewInfo& /*ViewInfo*/) {}
@ -89,7 +89,7 @@ public:
// Getters // Getters
TString Name() const; TString Name() const;
CSceneNode* Parent() const; CSceneNode* Parent() const;
CSceneManager* Scene() const; CScene* Scene() const;
CVector3f LocalPosition() const; CVector3f LocalPosition() const;
CVector3f AbsolutePosition() const; CVector3f AbsolutePosition() const;
CQuaternion LocalRotation() const; CQuaternion LocalRotation() const;

View File

@ -1,5 +1,5 @@
#include "CScriptNode.h" #include "CScriptNode.h"
#include "CSceneManager.h" #include "CScene.h"
#include "Core/Render/CDrawUtil.h" #include "Core/Render/CDrawUtil.h"
#include "Core/Render/CGraphics.h" #include "Core/Render/CGraphics.h"
#include "Core/Render/CRenderer.h" #include "Core/Render/CRenderer.h"
@ -10,7 +10,7 @@
#include <Common/AnimUtil.h> #include <Common/AnimUtil.h>
#include <Math/MathUtil.h> #include <Math/MathUtil.h>
CScriptNode::CScriptNode(CSceneManager *pScene, CSceneNode *pParent, CScriptObject *pObject) CScriptNode::CScriptNode(CScene *pScene, CSceneNode *pParent, CScriptObject *pObject)
: CSceneNode(pScene, pParent) : CSceneNode(pScene, pParent)
{ {
mpVolumePreviewNode = nullptr; mpVolumePreviewNode = nullptr;

View File

@ -23,7 +23,7 @@ class CScriptNode : public CSceneNode
CLightParameters *mpLightParameters; CLightParameters *mpLightParameters;
public: public:
CScriptNode(CSceneManager *pScene, CSceneNode *pParent = 0, CScriptObject *pObject = 0); CScriptNode(CScene *pScene, CSceneNode *pParent = 0, CScriptObject *pObject = 0);
ENodeType NodeType(); ENodeType NodeType();
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo); void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo); void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);

View File

@ -5,7 +5,7 @@
#include <Common/AnimUtil.h> #include <Common/AnimUtil.h>
#include <Math/MathUtil.h> #include <Math/MathUtil.h>
CStaticNode::CStaticNode(CSceneManager *pScene, CSceneNode *pParent, CStaticModel *pModel) CStaticNode::CStaticNode(CScene *pScene, CSceneNode *pParent, CStaticModel *pModel)
: CSceneNode(pScene, pParent) : CSceneNode(pScene, pParent)
{ {
mpModel = pModel; mpModel = pModel;

View File

@ -9,7 +9,7 @@ class CStaticNode : public CSceneNode
CStaticModel *mpModel; CStaticModel *mpModel;
public: public:
CStaticNode(CSceneManager *pScene, CSceneNode *pParent = 0, CStaticModel *pModel = 0); CStaticNode(CScene *pScene, CSceneNode *pParent = 0, CStaticModel *pModel = 0);
ENodeType NodeType(); ENodeType NodeType();
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo); void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo); void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);

View File

@ -2,7 +2,7 @@
#include "Core/Render/CDrawUtil.h" #include "Core/Render/CDrawUtil.h"
#include "Core/Render/CRenderer.h" #include "Core/Render/CRenderer.h"
CDamageableTriggerExtra::CDamageableTriggerExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent) CDamageableTriggerExtra::CDamageableTriggerExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent)
: CScriptExtra(pInstance, pScene, pParent) : CScriptExtra(pInstance, pScene, pParent)
, mpRenderSideProp(nullptr) , mpRenderSideProp(nullptr)
, mpMat(nullptr) , mpMat(nullptr)

View File

@ -29,7 +29,7 @@ class CDamageableTriggerExtra : public CScriptExtra
CVector2f mCoordScale; CVector2f mCoordScale;
public: public:
explicit CDamageableTriggerExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0); explicit CDamageableTriggerExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent = 0);
~CDamageableTriggerExtra(); ~CDamageableTriggerExtra();
void CreateMaterial(); void CreateMaterial();
void UpdatePlaneTransform(); void UpdatePlaneTransform();

View File

@ -1,7 +1,7 @@
#include "CDoorExtra.h" #include "CDoorExtra.h"
#include "Core/Render/CRenderer.h" #include "Core/Render/CRenderer.h"
CDoorExtra::CDoorExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent) CDoorExtra::CDoorExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent)
: CScriptExtra(pInstance, pScene, pParent) : CScriptExtra(pInstance, pScene, pParent)
, mpShieldModelProp(nullptr) , mpShieldModelProp(nullptr)
, mpShieldColorProp(nullptr) , mpShieldColorProp(nullptr)

View File

@ -13,7 +13,7 @@ class CDoorExtra : public CScriptExtra
CColor mShieldColor; CColor mShieldColor;
public: public:
explicit CDoorExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0); explicit CDoorExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent = 0);
void PropertyModified(IProperty *pProperty); void PropertyModified(IProperty *pProperty);
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo); void AddToRenderer(CRenderer *pRenderer, const SViewInfo& ViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo); void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& ViewInfo);

View File

@ -3,7 +3,7 @@
const CColor CPointOfInterestExtra::skRegularColor = CColor::Integral(0xFF,0x70,0x00); const CColor CPointOfInterestExtra::skRegularColor = CColor::Integral(0xFF,0x70,0x00);
const CColor CPointOfInterestExtra::skImportantColor = CColor::Integral(0xFF,0x00,0x00); const CColor CPointOfInterestExtra::skImportantColor = CColor::Integral(0xFF,0x00,0x00);
CPointOfInterestExtra::CPointOfInterestExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent) CPointOfInterestExtra::CPointOfInterestExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent)
: CScriptExtra(pInstance, pScene, pParent) : CScriptExtra(pInstance, pScene, pParent)
, mpScanProperty(nullptr) , mpScanProperty(nullptr)
, mpScanData(nullptr) , mpScanData(nullptr)

View File

@ -12,7 +12,7 @@ class CPointOfInterestExtra : public CScriptExtra
TResPtr<CScan> mpScanData; TResPtr<CScan> mpScanData;
public: public:
explicit CPointOfInterestExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0); explicit CPointOfInterestExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent = 0);
void PropertyModified(IProperty* pProperty); void PropertyModified(IProperty* pProperty);
void ModifyTintColor(CColor& Color); void ModifyTintColor(CColor& Color);

View File

@ -2,7 +2,7 @@
#include "Core/Render/CDrawUtil.h" #include "Core/Render/CDrawUtil.h"
#include "Core/Render/CRenderer.h" #include "Core/Render/CRenderer.h"
CRadiusSphereExtra::CRadiusSphereExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent) CRadiusSphereExtra::CRadiusSphereExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent)
: CScriptExtra(pInstance, pScene, pParent) : CScriptExtra(pInstance, pScene, pParent)
, mpRadius(nullptr) , mpRadius(nullptr)
{ {

View File

@ -10,7 +10,7 @@ class CRadiusSphereExtra : public CScriptExtra
TFloatProperty *mpRadius; TFloatProperty *mpRadius;
public: public:
explicit CRadiusSphereExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0); explicit CRadiusSphereExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent = 0);
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo); void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo);
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo); void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo);
CColor Color() const; CColor Color() const;

View File

@ -19,7 +19,7 @@ protected:
EGame mGame; EGame mGame;
public: public:
explicit CScriptExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0) explicit CScriptExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent = 0)
: CSceneNode(pScene, pParent), : CSceneNode(pScene, pParent),
mpInstance(pInstance), mpInstance(pInstance),
mGame(pInstance->Template()->Game()) mGame(pInstance->Template()->Game())

View File

@ -1,6 +1,6 @@
#include "CSpacePirateExtra.h" #include "CSpacePirateExtra.h"
CSpacePirateExtra::CSpacePirateExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent) CSpacePirateExtra::CSpacePirateExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent)
: CScriptExtra(pInstance, pScene ,pParent) : CScriptExtra(pInstance, pScene ,pParent)
, mpPowerVuln(nullptr) , mpPowerVuln(nullptr)
, mpWaveVuln(nullptr) , mpWaveVuln(nullptr)

View File

@ -13,7 +13,7 @@ class CSpacePirateExtra : public CScriptExtra
TLongProperty *mpPlasmaVuln; TLongProperty *mpPlasmaVuln;
public: public:
explicit CSpacePirateExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0); explicit CSpacePirateExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent = 0);
CColor TevColor(); CColor TevColor();
}; };

View File

@ -1,9 +1,9 @@
#include "CWaypointExtra.h" #include "CWaypointExtra.h"
#include "Core/Render/CDrawUtil.h" #include "Core/Render/CDrawUtil.h"
#include "Core/Render/CRenderer.h" #include "Core/Render/CRenderer.h"
#include "Core/Scene/CSceneManager.h" #include "Core/Scene/CScene.h"
CWaypointExtra::CWaypointExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent) CWaypointExtra::CWaypointExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent)
: CScriptExtra(pInstance, pScene, pParent) : CScriptExtra(pInstance, pScene, pParent)
, mColor(CColor::skBlack) , mColor(CColor::skBlack)
, mLinksBuilt(false) , mLinksBuilt(false)

View File

@ -18,7 +18,7 @@ class CWaypointExtra : public CScriptExtra
std::vector<SWaypointLink> mLinks; std::vector<SWaypointLink> mLinks;
public: public:
explicit CWaypointExtra(CScriptObject *pInstance, CSceneManager *pScene, CSceneNode *pParent = 0); explicit CWaypointExtra(CScriptObject *pInstance, CScene *pScene, CSceneNode *pParent = 0);
void BuildLinks(); void BuildLinks();
bool IsPathLink(const SLink& rkLink); bool IsPathLink(const SLink& rkLink);

View File

@ -1,6 +1,6 @@
#include "CNodeSelection.h" #include "CNodeSelection.h"
CSceneSelection::CSceneSelection(CSceneManager *pScene) CSceneSelection::CSceneSelection(CScene *pScene)
{ {
mpScene = pScene; mpScene = pScene;
} }

View File

@ -6,11 +6,11 @@
class CSceneSelection class CSceneSelection
{ {
CSceneManager *mpScene; CScene *mpScene;
std::vector<CSceneNode*> mSelectedNodes; std::vector<CSceneNode*> mSelectedNodes;
public: public:
CSceneSelection(CSceneManager *pScene); CSceneSelection(CScene *pScene);
void SelectNode(CSceneNode *pNode); void SelectNode(CSceneNode *pNode);
void DeselectNode(CSceneNode *pNode); void DeselectNode(CSceneNode *pNode);
u32 SelectionSize(); u32 SelectionSize();

View File

@ -31,7 +31,7 @@ CSceneViewport::~CSceneViewport()
delete mpRenderer; delete mpRenderer;
} }
void CSceneViewport::SetScene(INodeEditor *pEditor, CSceneManager *pScene) void CSceneViewport::SetScene(INodeEditor *pEditor, CScene *pScene)
{ {
mpEditor = pEditor; mpEditor = pEditor;
mpScene = pScene; mpScene = pScene;

View File

@ -9,7 +9,7 @@ class CSceneViewport : public CBasicViewport
Q_OBJECT Q_OBJECT
INodeEditor *mpEditor; INodeEditor *mpEditor;
CSceneManager *mpScene; CScene *mpScene;
CRenderer *mpRenderer; CRenderer *mpRenderer;
// Render settings // Render settings
@ -33,7 +33,7 @@ class CSceneViewport : public CBasicViewport
public: public:
CSceneViewport(QWidget *pParent = 0); CSceneViewport(QWidget *pParent = 0);
~CSceneViewport(); ~CSceneViewport();
void SetScene(INodeEditor *pEditor, CSceneManager *pScene); void SetScene(INodeEditor *pEditor, CScene *pScene);
void SetSkyEnabled(bool b); void SetSkyEnabled(bool b);
CRenderer* Renderer(); CRenderer* Renderer();
CSceneNode* HoverNode(); CSceneNode* HoverNode();

View File

@ -61,7 +61,7 @@ QUndoStack* INodeEditor::UndoStack()
return &mUndoStack; return &mUndoStack;
} }
CSceneManager* INodeEditor::Scene() CScene* INodeEditor::Scene()
{ {
return &mScene; return &mScene;
} }

View File

@ -3,7 +3,7 @@
#include "CGizmo.h" #include "CGizmo.h"
#include <Math/ETransformSpace.h> #include <Math/ETransformSpace.h>
#include <Core/Scene/CSceneManager.h> #include <Core/Scene/CScene.h>
#include <QMainWindow> #include <QMainWindow>
#include <QAction> #include <QAction>
@ -22,7 +22,7 @@ protected:
QList<QAction*> mUndoActions; QList<QAction*> mUndoActions;
// Node management // Node management
CSceneManager mScene; CScene mScene;
QList<CSceneNode*> mSelection; QList<CSceneNode*> mSelection;
CAABox mSelectionBounds; CAABox mSelectionBounds;
@ -43,7 +43,7 @@ public:
explicit INodeEditor(QWidget *pParent = 0); explicit INodeEditor(QWidget *pParent = 0);
virtual ~INodeEditor(); virtual ~INodeEditor();
QUndoStack* UndoStack(); QUndoStack* UndoStack();
CSceneManager* Scene(); CScene* Scene();
CGizmo* Gizmo(); CGizmo* Gizmo();
bool IsGizmoVisible(); bool IsGizmoVisible();
void BeginGizmoTransform(); void BeginGizmoTransform();

View File

@ -12,7 +12,7 @@
#include <Core/Resource/factory/CModelLoader.h> #include <Core/Resource/factory/CModelLoader.h>
#include <Core/Resource/factory/CMaterialLoader.h> #include <Core/Resource/factory/CMaterialLoader.h>
#include <Core/Resource/factory/CTextureDecoder.h> #include <Core/Resource/factory/CTextureDecoder.h>
#include <Core/Scene/CSceneManager.h> #include <Core/Scene/CScene.h>
#include <iostream> #include <iostream>
#include <QFileDialog> #include <QFileDialog>
@ -28,7 +28,7 @@ CModelEditorWindow::CModelEditorWindow(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
mpScene = new CSceneManager(); mpScene = new CScene();
mpCurrentMat = nullptr; mpCurrentMat = nullptr;
mpCurrentModel = nullptr; mpCurrentModel = nullptr;
mpCurrentModelNode = new CModelNode(mpScene); mpCurrentModelNode = new CModelNode(mpScene);

View File

@ -6,7 +6,7 @@
#include <Core/Resource/CFont.h> #include <Core/Resource/CFont.h>
#include <Core/Resource/CResCache.h> #include <Core/Resource/CResCache.h>
#include <Core/Resource/Model/CModel.h> #include <Core/Resource/Model/CModel.h>
#include <Core/Scene/CSceneManager.h> #include <Core/Scene/CScene.h>
#include <Core/Scene/CModelNode.h> #include <Core/Scene/CModelNode.h>
#include <QMainWindow> #include <QMainWindow>
@ -21,7 +21,7 @@ class CModelEditorWindow : public QMainWindow
Q_OBJECT Q_OBJECT
Ui::CModelEditorWindow *ui; Ui::CModelEditorWindow *ui;
CSceneManager *mpScene; CScene *mpScene;
QString mOutputFilename; QString mOutputFilename;
TResPtr<CModel> mpCurrentModel; TResPtr<CModel> mpCurrentModel;
CModelNode *mpCurrentModelNode; CModelNode *mpCurrentModelNode;

View File

@ -23,7 +23,7 @@ public:
private: private:
CWorldEditor *mpEditor; CWorldEditor *mpEditor;
CSceneManager *mpScene; CScene *mpScene;
TResPtr<CGameArea> mpArea; TResPtr<CGameArea> mpArea;
public: public:

View File

@ -30,7 +30,7 @@ public:
private: private:
CWorldEditor *mpEditor; CWorldEditor *mpEditor;
CSceneManager *mpScene; CScene *mpScene;
TResPtr<CGameArea> mpArea; TResPtr<CGameArea> mpArea;
CMasterTemplate *mpCurrentMaster; CMasterTemplate *mpCurrentMaster;
EInstanceModelType mModelType; EInstanceModelType mModelType;

View File

@ -12,7 +12,7 @@
#include <Core/Resource/CGameArea.h> #include <Core/Resource/CGameArea.h>
#include <Core/Resource/CWorld.h> #include <Core/Resource/CWorld.h>
#include <Core/Resource/TResPtr.h> #include <Core/Resource/TResPtr.h>
#include <Core/Scene/CSceneManager.h> #include <Core/Scene/CScene.h>
#include <Core/SRayIntersection.h> #include <Core/SRayIntersection.h>
#include <QComboBox> #include <QComboBox>

View File

@ -3,7 +3,7 @@
#include "CWorldEditor.h" #include "CWorldEditor.h"
#include <Core/Resource/Script/CScriptLayer.h> #include <Core/Resource/Script/CScriptLayer.h>
#include <Core/Scene/CSceneManager.h> #include <Core/Scene/CScene.h>
WInstancesTab::WInstancesTab(QWidget *parent) : WInstancesTab::WInstancesTab(QWidget *parent) :
QWidget(parent), QWidget(parent),
@ -47,7 +47,7 @@ WInstancesTab::~WInstancesTab()
delete ui; delete ui;
} }
void WInstancesTab::SetEditor(CWorldEditor *pEditor, CSceneManager *pScene) void WInstancesTab::SetEditor(CWorldEditor *pEditor, CScene *pScene)
{ {
mpEditor = pEditor; mpEditor = pEditor;
mpScene = pScene; mpScene = pScene;

View File

@ -8,7 +8,7 @@
#include <QMenu> #include <QMenu>
class CWorldEditor; class CWorldEditor;
class CSceneManager; class CScene;
namespace Ui { namespace Ui {
class WInstancesTab; class WInstancesTab;
@ -19,7 +19,7 @@ class WInstancesTab : public QWidget
Q_OBJECT Q_OBJECT
CWorldEditor *mpEditor; CWorldEditor *mpEditor;
CSceneManager *mpScene; CScene *mpScene;
CTypesInstanceModel *mpLayersModel; CTypesInstanceModel *mpLayersModel;
CTypesInstanceModel *mpTypesModel; CTypesInstanceModel *mpTypesModel;
@ -32,7 +32,7 @@ class WInstancesTab : public QWidget
public: public:
explicit WInstancesTab(QWidget *parent = 0); explicit WInstancesTab(QWidget *parent = 0);
~WInstancesTab(); ~WInstancesTab();
void SetEditor(CWorldEditor *pEditor, CSceneManager *pScene); void SetEditor(CWorldEditor *pEditor, CScene *pScene);
void SetMaster(CMasterTemplate *pMaster); void SetMaster(CMasterTemplate *pMaster);
void SetArea(CGameArea *pArea); void SetArea(CGameArea *pArea);