Esempio n. 1
0
        /*
        public void dump() {
        for (int i = 0; i < bspts.length; ++i) {
        System.out.println(">>>>\nDumping bspt #" + i + "\n>>>>");
        bspts[i].dump();
        }
        System.out.println("<<<<");
        }
        */

        public SphereIterator getSphereIterator(int bsptIndex)
        {
            if (bsptIndex >= sphereIterators.Length)
            {
                SphereIterator[] t = new SphereIterator[bsptIndex + 1];
                System.Array.Copy(sphereIterators, 0, t, 0, sphereIterators.Length);
                sphereIterators = t;
            }
            if (sphereIterators[bsptIndex] == null &&
                bspts[bsptIndex] != null)
                sphereIterators[bsptIndex] = bspts[bsptIndex].allocateSphereIterator();
            return sphereIterators[bsptIndex];
        }
Esempio n. 2
0
        /*
         * public void dump() {
         * for (int i = 0; i < bspts.length; ++i) {
         * System.out.println(">>>>\nDumping bspt #" + i + "\n>>>>");
         * bspts[i].dump();
         * }
         * System.out.println("<<<<");
         * }
         */

        public SphereIterator getSphereIterator(int bsptIndex)
        {
            if (bsptIndex >= sphereIterators.Length)
            {
                SphereIterator[] t = new SphereIterator[bsptIndex + 1];
                System.Array.Copy(sphereIterators, 0, t, 0, sphereIterators.Length);
                sphereIterators = t;
            }
            if (sphereIterators[bsptIndex] == null &&
                bspts[bsptIndex] != null)
            {
                sphereIterators[bsptIndex] = bspts[bsptIndex].allocateSphereIterator();
            }
            return(sphereIterators[bsptIndex]);
        }
Esempio n. 3
0
			public void  release()
			{
				bsptIter.release();
				bsptIter = null;
			}
Esempio n. 4
0
			public bool hasNext()
			{
				while (bsptIter == null || !bsptIter.hasMoreElements())
				{
					if (--bsptIndex < 0)
					{
						bsptIter = null;
						return false;
					}
					bsptIter = Enclosing_Instance.bspf.getSphereIterator(bsptIndex);
					bsptIter.initialize(center, radius);
				}
				return true;
			}
Esempio n. 5
0
            public void initialize(Tuple center, float radius)
			{
				Enclosing_Instance.initializeBspf();
				bsptIndex = Enclosing_Instance.bspf.BsptCount;
				bsptIter = null;
				this.center = center;
				this.radius = radius;
			}
Esempio n. 6
0
            public void initialize(int bsptIndex, Tuple center, float radius)
			{
				Enclosing_Instance.initializeBspf();
				this.bsptIndex = bsptIndex;
				bsptIter = Enclosing_Instance.bspf.getSphereIterator(bsptIndex);
				this.center = center;
				this.radius = radius;
				bsptIter.initialize(center, radius);
			}