Package com.ngt.jopenmetaverse.shared.types

Examples of com.ngt.jopenmetaverse.shared.types.Matrix4


               throw new IllegalArgumentException("Non-finite in CoordinateFrame constructor");
       }

       public CoordinateFrame(Vector3 origin, Quaternion rotation)
       {
           Matrix4 m = Matrix4.createFromQuaternion(rotation);

           this.origin = origin;
           xAxis = m.getAtAxis();
           yAxis = m.getLeftAxis();
           zAxis = m.getUpAxis();

           if (!IsFinite())
               throw new IllegalArgumentException("Non-finite in CoordinateFrame constructor");
       }
View Full Code Here


           Rotate(q);
       }

       public void Rotate(Quaternion q) throws Exception
       {
           Matrix4 m = Matrix4.createFromQuaternion(q);
           Rotate(m);
       }
View Full Code Here

       }

       public void Roll(float angle) throws Exception
       {
           Quaternion q = Quaternion.createFromAxisAngle(xAxis, angle);
           Matrix4 m = Matrix4.createFromQuaternion(q);
           Rotate(m);

           if (!yAxis.isFinite() || !zAxis.isFinite())
               throw new Exception("Non-finite in CoordinateFrame.Roll()");
       }
View Full Code Here

       }

       public void Pitch(float angle) throws Exception
       {
           Quaternion q = Quaternion.createFromAxisAngle(yAxis, angle);
           Matrix4 m = Matrix4.createFromQuaternion(q);
           Rotate(m);

           if (!xAxis.isFinite() || !zAxis.isFinite())
               throw new Exception("Non-finite in CoordinateFrame.Pitch()");
       }
View Full Code Here

       }

       public void Yaw(float angle) throws Exception
       {
           Quaternion q = Quaternion.createFromAxisAngle(zAxis, angle);
           Matrix4 m = Matrix4.createFromQuaternion(q);
           Rotate(m);

           if (!xAxis.isFinite() || !yAxis.isFinite())
               throw new Exception("Non-finite in CoordinateFrame.Yaw()");
       }
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.types.Matrix4

Copyright © 2018 www.massapicom. 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.