Package javax.vecmath

Examples of javax.vecmath.Vector2d.dot()


              result.doesIntersect = false;

          // ===== 2. Now find if the polygons *will* intersect =====

          // Project the velocity on the current axis
          double velocityProjection = axis.dot(velocity);

          // Get the projection of polygon A during the movement
          if (velocityProjection < 0) {
              resA.min += velocityProjection;
          } else {
View Full Code Here


            frictionalForce = -particles_[i].mass * params.getDynamicFriction();
            change_.scale( frictionalForce );

            // eliminate the frictional force in the spinal direction
            Vector2d spineDir = segment.getSpinalDirection();
            double dot = spineDir.dot( change_ );
            if ( dot < 0 ) {
                // then the velocity vector is going at least partially backwards
                // remove the backwards component.
                vel_.set( spineDir );
                vel_.scale( dot );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.