FromQuaternion() 공개 메소드

public FromQuaternion ( Quaternionf quaternion ) : void
quaternion Quaternionf
리턴 void
예제 #1
0
 public void Rotate(Quaternionf q)
 {
     Matrix4f m = new Matrix4f();
     m.FromQuaternion(q);
     Rotate(m);
 }
예제 #2
0
        public void Yaw(float angle)
        {
            Quaternionf q = new Quaternionf();
            q.FromAxisAngle(zAxis, angle);
            Matrix4f m = new Matrix4f();
            m.FromQuaternion(q);
            Rotate(m);

            if (!xAxis.IsFinite() || !yAxis.IsFinite())
                throw new Exception("Non-finite in CoordinateFrame.Yaw()");
        }
예제 #3
0
        public CoordinateFrame(Vector3f origin, Quaternionf rotation)
        {
            Matrix4f m = new Matrix4f();
            m.FromQuaternion(rotation);

            this.origin = origin;
            xAxis = new Vector3f(m.M11, m.M21, m.M31);
            yAxis = new Vector3f(m.M12, m.M22, m.M32);
            zAxis = new Vector3f(m.M13, m.M23, m.M33);

            if (!IsFinite())
                throw new ArgumentException("Non-finite in CoordinateFrame constructor");
        }