public WVec Rotate(WRot rot) { Int32Matrix4x4 mtx; rot.AsMatrix(out mtx); return(Rotate(ref mtx)); }
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]))); }
public WVec Rotate(WRot rot) { return(Rotate(rot.AsMatrix())); }
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])); }