public BouncingSphereSimlulator(BspTree bspTree) { // mMass = 1.0f; mLinearFriction = 0.15f; mAngularDamping = 0.995f; mSphereRadius = 1.35f; mGravity = new Vector3(0.0f, -9.81f, 0.0f); mBspTree = bspTree; // for simulating the spheres two linked lists are used: // new sphere properties are written one by one to mSimulatedSpheresNextStep, // and at the end of the simulation loop all new properties are copied to // mSimulatedSpheres at once. mSimulatedSpheres = new LinkedList <SphereProperties>(); mSimulatedSpheresNextStep = new LinkedList <SphereProperties>(); mCollidingFaces = new Dictionary <Face, uint>(); mNumSubSteps = 3; // init performance measurement timers mTimeCollisions = new Stopwatch(); mTimePhysics = new Stopwatch(); }
public BouncingSphereSimlulator(BspTree bspTree) { // mMass = 1.0f; mLinearFriction = 0.15f; mAngularDamping = 0.995f; mSphereRadius = 1.35f; mGravity = new Vector3(0.0f, -9.81f, 0.0f); mBspTree = bspTree; // for simulating the spheres two linked lists are used: // new sphere properties are written one by one to mSimulatedSpheresNextStep, // and at the end of the simulation loop all new properties are copied to // mSimulatedSpheres at once. mSimulatedSpheres = new LinkedList<SphereProperties>(); mSimulatedSpheresNextStep = new LinkedList<SphereProperties>(); mCollidingFaces = new Dictionary<Face, uint>(); mNumSubSteps = 3; // init performance measurement timers mTimeCollisions = new Stopwatch(); mTimePhysics = new Stopwatch(); }