コード例 #1
0
        /// <summary>
        /// Searches for a particular texture info
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public AtlasNode FindNode(object userData)
        {
            if (mUserData == userData)
            {
                return(this);
            }

            AtlasNode node = null;

            if (mLeft != null)
            {
                node = mLeft.FindNode(userData);
                if (node != null)
                {
                    return(node);
                }
            }

            if (mRight != null)
            {
                node = mRight.FindNode(userData);
                if (node != null)
                {
                    return(node);
                }
            }

            return(null);
        }
コード例 #2
0
        /// <summary>
        /// Searches for a node by texture info
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public AtlasNode FindNode(object userData)
        {
            if (mRoot == null)
            {
                return(null);
            }

            return(mRoot.FindNode(userData));
        }