Beispiel #1
0
        public void AddSprite(ref TRS quad, Vector2i tile_index, ref Matrix3 mat)
        {
            Vector2 x = quad.X;
            Vector2 y = quad.Y;

            TextureInfo.CachedTileData cachedTiledData = this.m_current_texture_info.GetCachedTiledData(ref tile_index);
            this.m_v0 = new Vector4(this.transform_point(ref mat, quad.T), cachedTiledData.UV_00);
            this.m_v1 = new Vector4(this.transform_point(ref mat, quad.T + x), cachedTiledData.UV_10);
            this.m_v2 = new Vector4(this.transform_point(ref mat, quad.T + y), cachedTiledData.UV_01);
            this.m_v3 = new Vector4(this.transform_point(ref mat, quad.T + x + y), cachedTiledData.UV_11);
            this.add_quad();
        }
Beispiel #2
0
        public void AddSprite(ref TRS quad, Vector2i tile_index)
        {
            Vector2 x = quad.X;
            Vector2 y = quad.Y;

            TextureInfo.CachedTileData cachedTiledData = this.m_current_texture_info.GetCachedTiledData(ref tile_index);
            this.m_v0 = new Vector4(quad.T, cachedTiledData.UV_00);
            this.m_v1 = new Vector4(quad.T + x, cachedTiledData.UV_10);
            this.m_v2 = new Vector4(quad.T + y, cachedTiledData.UV_01);
            this.m_v3 = new Vector4(quad.T + x + y, cachedTiledData.UV_11);
            this.add_quad();
        }