~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/gameengine/Ketsji/KX_Scene.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: KX_Scene.h,v 1.5 2004/03/22 22:01:53 jesterking Exp $
 
2
 * $Id: KX_Scene.h,v 1.13 2005/03/25 10:33:37 kester Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
49
49
#include "RAS_FramingManager.h"
50
50
#include "RAS_Rect.h"
51
51
 
 
52
#include "PyObjectPlus.h"
 
53
 
52
54
/**
53
55
 * @section Forward declarations
54
56
 */
55
57
struct SM_MaterialProps;
56
58
struct SM_ShapeProps;
57
59
 
 
60
class GEN_HashedPtr;
58
61
class CListValue;
59
 
class RAS_BucketManager;
60
 
class KX_Camera;
 
62
class CValue;
61
63
class SCA_LogicManager;
62
64
class SCA_KeyboardManager;
63
65
class SCA_TimeEventManager;
64
66
class SCA_MouseManager;
65
 
class KX_WorldInfo;
 
67
class SCA_ISystem;
 
68
class SCA_IInputDevice;
66
69
class SND_Scene;
67
70
class SND_IAudioDevice;
68
71
class NG_NetworkDeviceInterface;
69
72
class NG_NetworkScene;
 
73
class SG_IObject;
70
74
class SG_Node;
 
75
class SG_Tree;
 
76
class KX_WorldInfo;
71
77
class KX_Camera;
72
 
class GEN_HashedPtr;
73
78
class KX_GameObject;
74
 
class SCA_ISystem;
75
 
class SCA_IInputDevice;
 
79
class KX_LightObject;
 
80
class RAS_BucketManager;
76
81
class RAS_BucketManager;
77
82
class RAS_MaterialBucket;
78
83
class RAS_IPolyMaterial;
79
84
class RAS_IRasterizer;
80
85
class RAS_IRenderTools;
81
 
class CValue;
82
 
class SG_IObject;
83
 
 
 
86
class SCA_JoystickManager;
84
87
/**
85
88
 * The KX_Scene holds all data for an independent scene. It relates
86
89
 * KX_Objects to the specific objects in the modules.
87
90
 * */
88
 
class KX_Scene : public SCA_IScene
 
91
class KX_Scene : public PyObjectPlus, public SCA_IScene
89
92
{
 
93
        Py_Header;
 
94
protected:
90
95
        RAS_BucketManager*      m_bucketmanager;
91
96
        CListValue*                     m_tempObjectList;
92
97
 
102
107
        CListValue*                     m_lightlist;
103
108
 
104
109
        /**
 
110
         *  The tree of objects in the scene.
 
111
         */
 
112
        SG_Tree*                        m_objecttree;
 
113
 
 
114
        /**
105
115
         * The set of cameras for this scene
106
116
         */
107
117
        set<class KX_Camera*>       m_cameras;
118
128
        * physics engine abstraction
119
129
        */
120
130
 
121
 
        e_PhysicsEngine m_physicsEngine;
 
131
        //e_PhysicsEngine m_physicsEngine; //who needs this ?
122
132
        class PHY_IPhysicsEnvironment*          m_physicsEnvironment;
123
133
 
124
134
        /**
222
232
         * Toggle to enable or disable activity culling.
223
233
         */
224
234
        bool m_activity_culling;
225
 
 
 
235
        
226
236
        /**
227
237
         * The framing settings used by this scene
228
238
         */
235
245
         */
236
246
        RAS_Rect m_viewport;
237
247
        
 
248
        /**
 
249
         * Visibility testing functions.
 
250
         */
 
251
        void MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty);
 
252
        void MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible);
 
253
        void MarkVisible(RAS_IRasterizer* rasty, KX_GameObject* gameobj);
 
254
        
 
255
        /**
 
256
         * This stores anything from python
 
257
         */
 
258
        PyObject* m_attrlist;
 
259
 
238
260
public:
239
261
        KX_Scene(class SCA_IInputDevice* keyboarddevice,
240
262
                class SCA_IInputDevice* mousedevice,
270
292
         * @section Logic stuff
271
293
         * Initiate an update of the logic system.
272
294
         */
273
 
        void LogicBeginFrame(double curtime,
274
 
                                                 double deltatime);
275
 
        void LogicUpdateFrame(double curtime,
276
 
                                                  double deltatime);
 
295
        void LogicBeginFrame(double curtime);
 
296
        void LogicUpdateFrame(double curtime, bool frame);
277
297
 
278
298
                void                                            
279
299
        LogicEndFrame(
469
489
        void SetPhysicsEnvironment(class PHY_IPhysicsEnvironment*       physEnv);
470
490
 
471
491
        void    SetGravity(const MT_Vector3& gravity);
 
492
        
 
493
        /**
 
494
         * Sets the node tree for this scene.
 
495
         */
 
496
        void SetNodeTree(SG_Tree* root);
 
497
 
 
498
        KX_PYMETHOD_DOC(KX_Scene, getLightList);
 
499
        KX_PYMETHOD_DOC(KX_Scene, getObjectList);
 
500
        KX_PYMETHOD_DOC(KX_Scene, getName);
 
501
/*      
 
502
        KX_PYMETHOD_DOC(KX_Scene, getActiveCamera);
 
503
        KX_PYMETHOD_DOC(KX_Scene, getActiveCamera);
 
504
        KX_PYMETHOD_DOC(KX_Scene, findCamera);
 
505
        
 
506
        KX_PYMETHOD_DOC(KX_Scene, getGravity);
 
507
        
 
508
        KX_PYMETHOD_DOC(KX_Scene, setActivityCulling);
 
509
        KX_PYMETHOD_DOC(KX_Scene, setActivityCullingRadius);
 
510
        
 
511
        KX_PYMETHOD_DOC(KX_Scene, setSceneViewport);
 
512
        KX_PYMETHOD_DOC(KX_Scene, setSceneViewport);
 
513
        */
 
514
 
 
515
        virtual PyObject* _getattr(const STR_String& attr); /* name, active_camera, gravity, suspended, viewport, framing, activity_culling, activity_culling_radius */
 
516
        virtual int _setattr(const STR_String &attr, PyObject *pyvalue);
 
517
        virtual int _delattr(const STR_String &attr);
472
518
};
473
519
 
474
520
typedef std::vector<KX_Scene*> KX_SceneList;