Example #1
0
        public void Yaw(float angle)
        {
            LLQuaternion q = new LLQuaternion(angle, zAxis);
            LLMatrix3    m = new LLMatrix3(q);

            Rotate(m);

            if (!xAxis.IsFinite() || !yAxis.IsFinite())
            {
                throw new Exception("Non-finite in CoordinateFrame.Yaw()");
            }
        }
Example #2
0
        public void Rotate(LLMatrix3 m)
        {
            xAxis = LLVector3.Rot(xAxis, m);
            yAxis = LLVector3.Rot(yAxis, m);

            Orthonormalize();

            if (!IsFinite())
            {
                throw new Exception("Non-finite in CoordinateFrame.Rotate()");
            }
        }
Example #3
0
        public CoordinateFrame(LLVector3 origin, LLMatrix3 rotation)
        {
            this.origin = origin;
            xAxis       = rotation[0];
            yAxis       = rotation[1];
            zAxis       = rotation[2];

            if (!IsFinite())
            {
                throw new ArgumentException("Non-finite in CoordinateFrame constructor");
            }
        }
Example #4
0
        public CoordinateFrame(LLVector3 origin, LLQuaternion rotation)
        {
            LLMatrix3 m = new LLMatrix3(rotation);

            this.origin = origin;
            xAxis       = m[0];
            yAxis       = m[1];
            zAxis       = m[2];

            if (!IsFinite())
            {
                throw new ArgumentException("Non-finite in CoordinateFrame constructor");
            }
        }
Example #5
0
        public void Rotate(LLQuaternion q)
        {
            LLMatrix3 m = new LLMatrix3(q);

            Rotate(m);
        }