Esempio n. 1
0
    public vp_FractalNoise(float inH, float inLacunarity, float inOctaves, vp_Perlin noise)
    {
        this.m_Lacunarity = inLacunarity;
        this.m_Octaves    = inOctaves;
        this.m_IntOctaves = (int)inOctaves;
        this.m_Exponent   = new float[this.m_IntOctaves + 1];
        float num = 1f;

        for (int i = 0; i < this.m_IntOctaves + 1; i++)
        {
            this.m_Exponent[i] = (float)Math.Pow((double)this.m_Lacunarity, (double)(-(double)inH));
            num *= this.m_Lacunarity;
        }
        if (noise == null)
        {
            this.m_Noise = new vp_Perlin();
        }
        else
        {
            this.m_Noise = noise;
        }
    }
Esempio n. 2
0
    public vp_FractalNoise(float inH, float inLacunarity, float inOctaves, vp_Perlin noise)
    {
        m_Lacunarity = inLacunarity;
        m_Octaves    = inOctaves;
        m_IntOctaves = (int)inOctaves;
        m_Exponent   = new float[m_IntOctaves + 1];
        float frequency = 1.0F;

        for (int i = 0; i < m_IntOctaves + 1; i++)
        {
            m_Exponent[i] = (float)Math.Pow(m_Lacunarity, -inH);
            frequency    *= m_Lacunarity;
        }

        if (noise == null)
        {
            m_Noise = new vp_Perlin();
        }
        else
        {
            m_Noise = noise;
        }
    }
Esempio n. 3
0
    public vp_FractalNoise(float inH, float inLacunarity, float inOctaves, vp_Perlin noise)
    {
        m_Lacunarity = inLacunarity;
        m_Octaves = inOctaves;
        m_IntOctaves = (int)inOctaves;
        m_Exponent = new float[m_IntOctaves+1];
        float frequency = 1.0F;
        for (int i = 0; i < m_IntOctaves+1; i++)
        {
            m_Exponent[i] = (float)Math.Pow (m_Lacunarity, -inH);
            frequency *= m_Lacunarity;
        }

        if (noise == null)
            m_Noise = new vp_Perlin();
        else
            m_Noise = noise;
    }