Exemple #1
0
        // ================================================================================

        public Matrix3D GetTextureXfrm()
        {
            // ensure bitmap of texture is loaded
            if (this.Texture.IsBitmapLoaded == false)
            {
                this.Texture.LoadBitmap();
            }

            // generate texture transform
            Matrix3D xfrm = Matrix3D.FromBasis(this.SAxis, this.TAxis, Vector3D.Cross(this.SAxis, this.TAxis));

            xfrm.Scale(this.Texture.Width, this.Texture.Height, 1);
            xfrm.Invert();
            return(xfrm);
        }