~ubuntu-branches/ubuntu/lucid/blender/lucid

« back to all changes in this revision

Viewing changes to source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2009-08-06 22:32:19 UTC
  • mfrom: (1.2.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806223219-8z4eej1u8levu4pz
Tags: 2.49a+dfsg-0ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Build-depend on python-2.6 rather than python-2.5.
  - debian/misc/*.desktop: Add Spanish translation to .desktop 
    files.
  - debian/pyversions: 2.6.
  - debian/rules: Clean *.o of source/blender/python/api2_2x/
* New upstream release (LP: #382153).
* Refreshed patches:
  - 01_sanitize_sys.patch
  - 02_tmp_in_HOME
  - 10_use_systemwide_ftgl
  - 70_portability_platform_detection
* Removed patches merged upstream:
  - 30_fix_python_syntax_warning
  - 90_ubuntu_ffmpeg_52_changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: PHY_IPhysicsEnvironment.h 17002 2008-10-10 05:12:57Z erwin $
 
2
 * $Id: PHY_IPhysicsEnvironment.h 20665 2009-06-06 00:12:49Z erwin $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
89
89
                virtual void            beginFrame() = 0;
90
90
                virtual void            endFrame() = 0;
91
91
                /// Perform an integration step of duration 'timeStep'.
92
 
                virtual bool            proceedDeltaTime(double curTime,float timeStep)=0;
 
92
                virtual bool            proceedDeltaTime(double curTime,float timeStep,float interval)=0;
 
93
                ///draw debug lines (make sure to call this during the render phase, otherwise lines are not drawn properly)
 
94
                virtual void            debugDrawWorld(){}
93
95
                virtual void            setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep)=0;
94
96
                //returns 0.f if no fixed timestep is used
95
97
                virtual float           getFixedTimeStep()=0;
140
142
 
141
143
                virtual PHY_IPhysicsController* rayTest(PHY_IRayCastFilterCallback &filterCallback, float fromX,float fromY,float fromZ, float toX,float toY,float toZ)=0;
142
144
 
 
145
                //culling based on physical broad phase
 
146
                // the plane number must be set as follow: near, far, left, right, top, botton
 
147
                // the near plane must be the first one and must always be present, it is used to get the direction of the view
 
148
                virtual bool cullingTest(PHY_CullingCallback callback, void *userData, PHY__Vector4* planeNormals, int planeNumber, int occlusionRes) = 0;
143
149
 
144
150
                //Methods for gamelogic collision/physics callbacks
145
151
                //todo:
146
152
                virtual void addSensor(PHY_IPhysicsController* ctrl)=0;
147
153
                virtual void removeSensor(PHY_IPhysicsController* ctrl)=0;
148
154
                virtual void addTouchCallback(int response_class, PHY_ResponseCallback callback, void *user)=0;
149
 
                virtual void requestCollisionCallback(PHY_IPhysicsController* ctrl)=0;
150
 
                virtual void removeCollisionCallback(PHY_IPhysicsController* ctrl)=0;
 
155
                virtual bool requestCollisionCallback(PHY_IPhysicsController* ctrl)=0;
 
156
                virtual bool removeCollisionCallback(PHY_IPhysicsController* ctrl)=0;
151
157
                //These two methods are *solely* used to create controllers for sensor! Don't use for anything else
152
158
                virtual PHY_IPhysicsController* CreateSphereController(float radius,const PHY__Vector3& position) =0;
153
159
                virtual PHY_IPhysicsController* CreateConeController(float coneradius,float coneheight)=0;
154
160
                
155
161
                virtual void    setConstraintParam(int constraintId,int param,float value,float value1) = 0;
 
162
                virtual float   getConstraintParam(int constraintId,int param) = 0;
156
163
};
157
164
 
158
165
#endif //_IPHYSICSENVIRONMENT