Examples of assignScale()


Examples of jinngine.math.InertiaMatrix.assignScale()

          //        System.out.println("small or included");
          totalmass = totalmass + localmass;

        // inertia matrix for this local box
        InertiaMatrix localinertia = new InertiaMatrix();
        localinertia.assignScale(
                                        (1.0f / 12.0f) * localmass * (yl * yl + zl * zl),
                                        (1.0f / 12.0f) * localmass * (xl * xl + zl * zl),
                                        (1.0f / 12.0f) * localmass * (yl * yl + xl * xl));

          // translate inertia matrix
View Full Code Here

Examples of jinngine.math.InertiaMatrix.assignScale()

 
  @Override
  public InertiaMatrix getInertialMatrix() {
    //Inertia tensor for the sphere.
    InertiaMatrix I = new InertiaMatrix();
                I.assignScale((2/5f)*mass*radius*radius);
    return I;
  }

  @Override
  public void setBody(Body b) {
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.