includes/utils/Physics.hpp
Physics()
    {
        // Collision configuration, to be used by the collision detection class
        //collision configuration contains default setup for memory, collision setup. Advanced users can create their own configuration.
        this->collisionConfiguration = new btDefaultCollisionConfiguration();

        //default collision dispatcher (=collision detection method). For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
        this->dispatcher = new btCollisionDispatcher(this->collisionConfiguration);

        //btDbvtBroadphase is a good general purpose broadphase. You can also try out btAxis3Sweep.
        this->overlappingPairCache = new btDbvtBroadphase();

        // we set a ODE solver, which considers forces, constraints, collisions etc., to calculate positions and rotations of the rigid bodies.
        //the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded)
        this->solver = new btSequentialImpulseConstraintSolver();

        //  DynamicsWorld is the main class for the physical simulation
        this->dynamicsWorld = new btDiscreteDynamicsWorld(this->dispatcher,this->overlappingPairCache,this->solver,this->collisionConfiguration);

        // we set the gravity force
        this->dynamicsWorld->setGravity(btVector3(0.0f,-9.82f,0.0f));
    }
//////////////////////////////////////////
// constructor
// we set all the classes needed for the physical simulation
constructor
we set all the classes needed for the physical simulation
constructor we set all the classes needed for the physical simulation
Physics()
    {
        this->collisionConfiguration = new btDefaultCollisionConfiguration();
        this->dispatcher = new btCollisionDispatcher(this->collisionConfiguration);
        this->overlappingPairCache = new btDbvtBroadphase();
        this->solver = new btSequentialImpulseConstraintSolver();
        this->dynamicsWorld = new btDiscreteDynamicsWorld(this->dispatcher,this->overlappingPairCache,this->solver,this->collisionConfiguration);
        this->dynamicsWorld->setGravity(btVector3(0.0f,-9.82f,0.0f));
    }
Physics ( ) { this -> collisionConfiguration = new btDefaultCollisionConfiguration ( ) ; this -> dispatcher = new btCollisionDispatcher ( this -> collisionConfiguration ) ; this -> overlappingPairCache = new btDbvtBroadphase ( ) ; this -> solver = new btSequentialImpulseConstraintSolver ( ) ; this -> dynamicsWorld = new btDiscreteDynamicsWorld ( this -> dispatcher , this -> overlappingPairCache , this -> solver , this -> collisionConfiguration ) ; this -> dynamicsWorld -> setGravity ( btVector3 ( 0.0f , -9.82f , 0.0f ) ) ; }
constructor
we set all the classes needed for the physical simulation
constructor we set all the classes needed for the physical simulation
// Collision configuration, to be used by the collision detection class //collision configuration contains default setup for memory, collision setup. Advanced users can create their own configuration. //default collision dispatcher (=collision detection method). For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded) //btDbvtBroadphase is a good general purpose broadphase. You can also try out btAxis3Sweep. // we set a ODE solver, which considers forces, constraints, collisions etc., to calculate positions and rotations of the rigid bodies. //the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded) //  DynamicsWorld is the main class for the physical simulation // we set the gravity force