Exemplo n.º 1
0
 public void addForce(THREE.Vector3 force)
 {
     THREE.Vector3 a = force.clone();
     a.multiplyScalar(invMass);
     acc.add(a);
 }
Exemplo n.º 2
0
        public Particle(double m, THREE.Vector3 pos)
        {
            position = pos.clone();
            previous = pos.clone();
            original = pos.clone();

            acc = new THREE.Vector3(0, 0, 0);

            mass = m;
            invMass = 1.0 / mass;
        }