Beispiel #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="baseLengthVal">Length of this node, not taking looseness into account.</param>
        /// <param name="minSizeVal">Minimum size of nodes in this octree.</param>
        /// <param name="loosenessVal">Multiplier for baseLengthVal to get the actual size.</param>
        /// <param name="centerVal">Centre position of this node.</param>
        public BoundsQuadTreeNode(BoundsQuadTreeNode parent, LFloat baseLengthVal, LFloat minSizeVal,
                                  LFloat loosenessVal, LVector2 centerVal)
        {
#if SHOW_NODES
            monoTrans = new GameObject(MonoID++.ToString()).transform;
            if (parent != null)
            {
                monoTrans.SetParent(parent.monoTrans, false);
            }

            monoTrans.position = centerVal.ToLVector3().ToVector3();
#endif
            this.parent = parent;
            SetValues(baseLengthVal, minSizeVal, loosenessVal, centerVal);
        }