コード例 #1
0
        /// <summary>
        ///     constructor of VRTerrain
        /// </summary>
        /// <param name="vr">VRConnector vr</param>
        /// <param name="node">VRNode node</param>
        /// <param name="width">int width : the width of the map !must be the same width as heightPath.width() </param>
        /// <param name="length">int length : the height of the map !must be the same width as heightPath.height()</param>
        /// <param name="heightPath">
        ///     string heightPath : the filepath to the image from where the height of the map can be
        ///     determent
        /// </param>
        /// <param name="terrainPath">string terainPath : the filepath to the terrain file</param>
        /// <param name="normalPath">string normalPath : the filepath to the the normal terein texture</param>
        /// <param name="minHeight">int minHeight : the minimum height from where the texture should be applied</param>
        /// <param name="maxHeight">int maxHeight : the maximum height from where the texture should be applied</param>
        public VRTerrain(VRConnector vr, VRNode node, int width, int length, string heightPath, string terrainPath,
                         string normalPath, int minHeight, int maxHeight)
        {
            node.deletePlane();
            this.vr     = vr;
            this.width  = width;
            this.length = length;
            addTerrain(generateHeights(heightPath));
            addTerrainRenderer();


            //Thread.Sleep(2000);
            //Console.WriteLine(string.Join(",",node.parseAllnodes()));
            //Thread.Sleep(2000);
            addLayer(node.getUUID("terrainrenderer"), terrainPath, normalPath, minHeight, maxHeight);
        }