예제 #1
0
        public WVec Rotate(WRot rot)
        {
            Int32Matrix4x4 mtx;

            rot.AsMatrix(out mtx);
            return(Rotate(ref mtx));
        }
예제 #2
0
        public WVec Rotate(WRot rot)
        {
            var mtx = rot.AsMatrix();
            var lx  = (long)X;
            var ly  = (long)Y;
            var lz  = (long)Z;

            return(new WVec(
                       (int)((lx * mtx[0] + ly * mtx[4] + lz * mtx[8]) / mtx[15]),
                       (int)((lx * mtx[1] + ly * mtx[5] + lz * mtx[9]) / mtx[15]),
                       (int)((lx * mtx[2] + ly * mtx[6] + lz * mtx[10]) / mtx[15])));
        }
예제 #3
0
 public WVec Rotate(WRot rot)
 {
     return(Rotate(rot.AsMatrix()));
 }
예제 #4
0
파일: WVec.cs 프로젝트: RunCraze/OpenRA
 public WVec Rotate(WRot rot)
 {
     var mtx = rot.AsMatrix();
     var lx = (long)X;
     var ly = (long)Y;
     var lz = (long)Z;
     return new WVec(
         (int)((lx * mtx[0] + ly*mtx[4] + lz*mtx[8]) / mtx[15]),
         (int)((lx * mtx[1] + ly*mtx[5] + lz*mtx[9]) / mtx[15]),
         (int)((lx * mtx[2] + ly*mtx[6] + lz*mtx[10]) / mtx[15]));
 }