예제 #1
0
        public void SetUVCoord(Vector2 lowerleft, Vector2 dimensions)
        {
            mLowerLeftUV  = lowerleft;
            mUVDimensions = dimensions;


            XftTools.TopLeftUVToLowerLeft(ref mLowerLeftUV, ref mUVDimensions);
        }
예제 #2
0
        public void SetUVCoord(Vector2 lowerleft, Vector2 dimensions)
        {
            LowerLeftUV  = lowerleft;
            UVDimensions = dimensions;

            XftTools.TopLeftUVToLowerLeft(ref LowerLeftUV, ref UVDimensions);

            UVChanged = true;
        }
예제 #3
0
        public void SetUVCoord(Vector2 lowerleft, Vector2 dimensions)
        {
            // change to lower left coord.
            LowerLeftUV  = lowerleft;
            UVDimensions = dimensions;


            XftTools.TopLeftUVToLowerLeft(ref LowerLeftUV, ref UVDimensions);
        }
예제 #4
0
        //注意这里有点乱,与Sprite,CustomMesh这些不一样,UV计算是自定义的。
        //所以先全局坐标转换为lower left后,还需要局部转换。
        public void SetUVCoord(Vector2 topleft, Vector2 dimensions)
        {
            LowerLeftUV  = topleft;
            UVDimensions = dimensions;

            XftTools.TopLeftUVToLowerLeft(ref LowerLeftUV, ref UVDimensions);

            //注意这里还需颠倒UV。这里是局部坐标转换

            //还原为从顶部开始
            LowerLeftUV.y -= dimensions.y;
            UVDimensions.y = -UVDimensions.y;

            UVChanged = true;
        }