Esempio n. 1
0
        //-------------------------------------------------------------------------
        public void SetupTerrainZonePages(PCZSceneNode parentNode)
        {
            //create a root terrain node.
            if (null == this.mTerrainRoot)
            {
                this.mTerrainRoot = (PCZSceneNode)(parentNode.CreateChildSceneNode(Name + "_Node"));
                SetEnclosureNode(this.mTerrainRoot);
            }
            //setup the page array.
            var    pageSlots = (ushort)(1 + (this.mBufferedPageMargin * 2));
            ushort i, j;

            for (i = 0; i < pageSlots; ++i)
            {
                this.mTerrainZonePages.Add(new TerrainZonePageRow());
                ;
                for (j = 0; j < pageSlots; ++j)
                {
                    this.mTerrainZonePages[i].Add(null);
                }
            }

            // If we're not paging, load immediate for convenience
            if (this.mActivePageSource != null && !this.mPagingEnabled)
            {
                this.mActivePageSource.RequestPage(0, 0);
            }
        }
Esempio n. 2
0
        public override void SetZoneGeometry(string filename, PCZSceneNode parentNode)
        {
            string entityName, nodeName;

            entityName = Name + "_entity";
            nodeName   = Name + "_Node";
            Entity ent = mPCZSM.CreateEntity(entityName, filename);
            // create a node for the entity
            PCZSceneNode node;

            node = (PCZSceneNode)parentNode.CreateChildSceneNode(nodeName);
            // attach the entity to the node
            node.AttachObject(ent);
            // set the node as the enclosure node
            SetEnclosureNode(node);
        }