Esempio n. 1
0
        public void Init(AxisAlignedBox box, int depth)
        {
            rootSceneNode = new OctreeNode(this, "SceneRoot");
            rootSceneNode.SetAsRootNode();
            defaultRootNode = rootSceneNode;

            this.maxDepth = depth;

            this.octree = new Octree(null);

            this.octree.Box = box;

            Vector3 Min = box.Minimum;
            Vector3 Max = box.Maximum;

            this.octree.HalfSize = (Max - Min) / 2;

            this.numObjects = 0;

            var scalar = new Vector3(1.5f, 1.5f, 1.5f);

            this.scaleFactor.Scale = scalar;
        }
Esempio n. 2
0
		public void Init( AxisAlignedBox box, int depth )
		{
			rootSceneNode = new OctreeNode( this, "SceneRoot" );
			rootSceneNode.SetAsRootNode();
			defaultRootNode = rootSceneNode;

			maxDepth = depth;

			octree = new Octree( null );

			octree.Box = box;

			Vector3 Min = box.Minimum;
			Vector3 Max = box.Maximum;

			octree.HalfSize = ( Max - Min ) / 2;

			numObjects = 0;

			Vector3 scalar = new Vector3( 1.5f, 1.5f, 1.5f );

			scaleFactor.Scale = scalar;
		}