~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
3. This notice may not be removed or altered from any source distribution.
14
14
*/
15
15
 
16
 
#ifndef CCDPHYSICSENVIRONMENT
17
 
#define CCDPHYSICSENVIRONMENT
 
16
/** \file CcdPhysicsEnvironment.h
 
17
 *  \ingroup physbullet
 
18
 *  See also \ref bulletdoc
 
19
 */
 
20
 
 
21
#ifndef __CCDPHYSICSENVIRONMENT_H__
 
22
#define __CCDPHYSICSENVIRONMENT_H__
18
23
 
19
24
#include "PHY_IPhysicsEnvironment.h"
20
25
#include <vector>
47
52
class PHY_IVehicle;
48
53
class CcdOverlapFilterCallBack;
49
54
 
50
 
/// CcdPhysicsEnvironment is an experimental mainloop for physics simulation using optional continuous collision detection.
51
 
/// Physics Environment takes care of stepping the simulation and is a container for physics entities.
52
 
/// It stores rigidbodies,constraints, materials etc.
53
 
/// A derived class may be able to 'construct' entities by loading and/or converting
 
55
/** CcdPhysicsEnvironment is an experimental mainloop for physics simulation using optional continuous collision detection.
 
56
 * Physics Environment takes care of stepping the simulation and is a container for physics entities.
 
57
 * It stores rigidbodies,constraints, materials etc.
 
58
 * A derived class may be able to 'construct' entities by loading and/or converting
 
59
 */
54
60
class CcdPhysicsEnvironment : public PHY_IPhysicsEnvironment
55
61
{
56
62
        friend class CcdOverlapFilterCallBack;
60
66
        btIDebugDraw*   m_debugDrawer;
61
67
        
62
68
        class btDefaultCollisionConfiguration* m_collisionConfiguration;
63
 
    class btBroadphaseInterface*                m_broadphase;   // broadphase for dynamic world
 
69
        class btBroadphaseInterface*            m_broadphase;   // broadphase for dynamic world
64
70
        // for culling only
65
71
        btOverlappingPairCache*                         m_cullingCache;
66
72
        struct btDbvtBroadphase*                        m_cullingTree;  // broadphase for culling
100
106
                        m_numTimeSubSteps = numTimeSubSteps;
101
107
                }
102
108
                virtual void            setDeactivationTime(float dTime);
103
 
                virtual void            setDeactivationLinearTreshold(float linTresh) ;
104
 
                virtual void            setDeactivationAngularTreshold(float angTresh) ;
105
 
                virtual void            setContactBreakingTreshold(float contactBreakingTreshold) ;
 
109
                virtual void            setDeactivationLinearTreshold(float linTresh);
 
110
                virtual void            setDeactivationAngularTreshold(float angTresh);
 
111
                virtual void            setContactBreakingTreshold(float contactBreakingTreshold);
106
112
                virtual void            setCcdMode(int ccdMode);
107
113
                virtual void            setSolverType(int solverType);
108
114
                virtual void            setSolverSorConstant(float sor);
109
115
                virtual void            setSolverTau(float tau);
110
116
                virtual void            setSolverDamping(float damping);
111
117
                virtual void            setLinearAirDamping(float damping);
112
 
                virtual void            setUseEpa(bool epa) ;
 
118
                virtual void            setUseEpa(bool epa);
113
119
 
114
120
                virtual void            beginFrame();
115
 
                virtual void            endFrame() {};
 
121
                virtual void            endFrame() {}
116
122
                /// Perform an integration step of duration 'timeStep'.
117
123
                virtual bool            proceedDeltaTime(double curTime,float timeStep,float interval);
118
124
                
119
125
                virtual void            debugDrawWorld();
120
126
//              virtual bool            proceedDeltaTimeOneStep(float timeStep);
121
127
 
122
 
                virtual void            setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep){};
 
128
                virtual void            setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep)
 
129
                {
 
130
                        //based on DEFAULT_PHYSICS_TIC_RATE of 60 hertz
 
131
                        setNumTimeSubSteps((int)(fixedTimeStep / 60.f));
 
132
                }
123
133
                //returns 0.f if no fixed timestep is used
124
134
 
125
 
                virtual float           getFixedTimeStep(){ return 0.f;};
 
135
                virtual float           getFixedTimeStep() { return 0.f; }
126
136
 
127
137
                virtual void            setDebugMode(int debugMode);
128
138
 
154
164
                
155
165
                virtual float   getConstraintParam(int constraintId,int param);
156
166
 
157
 
            virtual void                removeConstraint(int    constraintid);
 
167
                virtual void            removeConstraint(int    constraintid);
158
168
 
159
169
                virtual float           getAppliedImpulse(int   constraintid);
160
170
 
274
284
 
275
285
                bool    m_scalingPropagated;
276
286
 
 
287
                virtual void    exportFile(const char* filename);
 
288
 
277
289
                
278
290
#ifdef WITH_CXX_GUARDEDALLOC
279
291
public:
282
294
#endif
283
295
};
284
296
 
285
 
#endif //CCDPHYSICSENVIRONMENT
 
297
#endif //__CCDPHYSICSENVIRONMENT_H__