summaryrefslogtreecommitdiffstats
path: root/tools/statepropbuilder/apps/spbuilder/code/sp/engine/workspace.hpp
blob: e476ebf382c08b05041005d554bb54a533dd8bf3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef _WORKSPACE_HPP_
#define _WORKSPACE_HPP_

#include <radmath/radmath.hpp>
#include <simcollision/collisionmanager.hpp>

#include "aicollisionsolveragent.hpp"

class CStateProp;
class tDrawable;

//=============================================================================
// Class Declarations
// ViewerIterator
//=============================================================================
class ViewerIterator
{
public:
    virtual ~ViewerIterator() {}
    virtual tEntity* Current(void) = 0;
    virtual tEntity* Next(bool loop = false) = 0;
    virtual tEntity* Prev(void) = 0;
    virtual tEntity* First(void) = 0;
};


//=============================================================================
// Class Declarations
// Workspace
//=============================================================================
class Workspace : public tRefCounted
{
public:
    Workspace();
    ~Workspace();
	
	void Init();
	void ResetAll( bool emptyInventory = true );
	void Advance(float dt_ms);
    void Display(tContext* context);
    
	int Load( const char* name );
	int Pause(bool b);

	void LoadFloor( const char* p3dfilename );

private:
    
	void ResetProp();
	CStateProp* m_CStateProp;
    
    AICollisionSolverAgent *m_CollisionSolver;
    sim::CollisionManager* m_CollisionManager;

    ViewerIterator* m_DrawableIterator;
	ViewerIterator* m_ObjectFactoryIterator;
	ViewerIterator* m_CStatePropDataIterator;

	tDrawable* m_DrawableFloor;
	sim::SimState* m_SimStateFloor;

	char m_Path[256];
};



#endif