/// <summary>
        /// Adds RMB ground plane to block node.
        /// </summary>
        /// <param name="block">DFBlock</param>
        /// <param name="climate">ClimateSettings.</param>
        private void AddRMBGroundPlane(ref DFBlock block, BlockNode blockNode, DFLocation.ClimateSettings climate)
        {
            // Add ground plane node
            GroundPlaneNode groundNode = new GroundPlaneNode(
                textureManager.GraphicsDevice,
                textureManager.LoadGroundPlaneTexture(ref block, climate));

            groundNode.Position = new Vector3(0f, groundHeight, 0f);
            blockNode.Add(groundNode);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Batch a ground plane node for rendering.
        /// </summary>
        /// <param name="node">GroundPlaneNode.</param>
        protected void BatchGroundPlaneNode(GroundPlaneNode node)
        {
            // Batch ground plane
            BatchItem batchItem;

            batchItem.Indexed        = false;
            batchItem.Matrix         = node.Matrix;
            batchItem.NumVertices    = node.PrimitiveCount * 3;
            batchItem.VertexBuffer   = node.VertexBuffer;
            batchItem.IndexBuffer    = null;
            batchItem.StartIndex     = 0;
            batchItem.PrimitiveCount = node.PrimitiveCount;
            batchItem.Texture        = textureManager.GetGroundPlaneTexture(node.TextureKey);
            AddBatch(TextureManager.GroundBatchKey, batchItem);
        }