CcdPhysicsEnvironment::CcdPhysicsEnvironment(Dispatcher* dispatcher,OverlappingPairCache* pairCache) :m_scalingPropagated(false), m_numIterations(10), m_numTimeSubSteps(1), m_ccdMode(0), m_solverType(-1), m_profileTimings(0), m_enableSatCollisionDetection(false) { for (int i=0;i<PHY_NUM_RESPONSE;i++) { m_triggerCallbacks[i] = 0; } //if (!dispatcher) // dispatcher = new CollisionDispatcher(); if(!pairCache) { //todo: calculate/let user specify this world sizes SimdVector3 worldMin(-10000,-10000,-10000); SimdVector3 worldMax(10000,10000,10000); pairCache = new AxisSweep3(worldMin,worldMax); //broadphase = new SimpleBroadphase(); } setSolverType(1);//issues with quickstep and memory allocations m_collisionWorld = new CollisionWorld(dispatcher,pairCache); m_debugDrawer = 0; m_gravity = SimdVector3(0.f,-10.f,0.f); m_islandManager = new SimulationIslandManager(); }
GslOptimizer::GslOptimizer( const BaseScalarFunction<GslVector, GslMatrix> & objectiveFunction) : BaseOptimizer(), m_objectiveFunction(objectiveFunction), m_initialPoint(new GslVector(objectiveFunction.domainSet(). vectorSpace().zeroVector())), m_minimizer(new GslVector(this->m_objectiveFunction.domainSet(). vectorSpace().zeroVector())), m_solver_type(BFGS2), m_fstep_size(this->m_objectiveFunction.domainSet().vectorSpace().zeroVector()), m_fdfstep_size(getFdfstepSize()), m_line_tol(getLineTolerance()) { // We initialize the minimizer to GSL_NAN just in case the optimization fails m_minimizer->cwSet(GSL_NAN); // Set to documented default value. m_fstep_size.cwSet(getFstepSize()); // Set solver type to the one set in the options object setSolverType(getSolverType()); }