Examples of Quaternion


Examples of org.mt4j.util.math.Quaternion

     
      // TEST
      if (doInWorldCoords)
        lastPoint.transform(shape.getGlobalMatrix());
     
      q = new Quaternion();
      returnMatrix = new Matrix();
     
      camDistToInterSection = 1;
    }
View Full Code Here

Examples of remixlab.proscene.Quaternion

        anchor.position().x,
        anchor.position().y,
        anchor.position().z);

    // Acumulo las 3 rotaciones en una sola
    currentRotation = new Quaternion();

    currentRotation.multiply(yaw);
    currentRotation.multiply(pitch);
    currentRotation.multiply(roll);
View Full Code Here

Examples of toxi.geom.Quaternion

public class QuaternionTest extends TestCase {

    public void testCreateFromAxisAngle() {
        ReadonlyVec3D axis = new Vec3D(100, 100, 100);
        float angle = MathUtils.PI * 1.5f;
        Quaternion a = Quaternion.createFromAxisAngle(axis, angle);
        assertEquals(MathUtils.sin(-MathUtils.QUARTER_PI), a.w);
        float[] reverse = a.toAxisAngle();
        Vec3D revAxis = new Vec3D(reverse[1], reverse[2], reverse[3]);
        assertTrue(axis.getNormalized().equalsWithTolerance(revAxis, 0.01f));
        assertTrue(MathUtils.abs(angle - reverse[0]) < 0.01);
    }
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.