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


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

            XftTools.TopLeftUVToLowerLeft(ref LowerLeftUV, ref UVDimensions);

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


            XftTools.TopLeftUVToLowerLeft(ref LowerLeftUV, ref UVDimensions);
        }
Beispiel #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;
        }