public AddNoiseModule(PBSNoiseGenerator inputModule1, PBSNoiseGenerator inputModule2, PBSNoiseGenerator maskModule, float threshold)
 {
     this.inputModule1 = inputModule1;
     this.inputModule2 = inputModule2;
     this.maskModule   = maskModule;
     this.threshold    = threshold;
 }
Exemplo n.º 2
0
    private void OnDrawGizmos()
    {
        if (!debug)
        {
            return;
        }
        if (!enabled)
        {
            return;
        }

        Gizmos.color = Color.green;
        PBSNoiseGenerator NoiseGenerator = planet.noiseGenerator;

        foreach (Vector3 point in scorerPoints)
        {
            float elevation = NoiseGenerator.GetNoise3D(point);
            elevation = Mathf.Clamp(elevation, 0, 1);
            if (float.IsNaN(elevation))
            {
                elevation = 0;
            }
            Gizmos.DrawWireSphere(point * (1 + elevation) * planet.radius, 1.0f);
        }
    }
Exemplo n.º 3
0
 public SelectNoiseModule(PBSNoiseGenerator inputModule1, PBSNoiseGenerator inputModule2, PBSNoiseGenerator selectModule, SelectInterpType interpolationType, float falloff, float threshold, int numSteps)
 {
     this.inputModule1      = inputModule1;
     this.inputModule2      = inputModule2;
     this.selectModule      = selectModule;
     this.falloff           = falloff;
     this.threshold         = threshold;
     this.interpolationType = interpolationType;
     this.numSteps          = numSteps;
 }
Exemplo n.º 4
0
 private void Awake()
 {
     cameraTransform    = GameObject.FindGameObjectWithTag("MainCamera").transform;
     lastCameraPosition = cameraTransform.position;
     pbsNoiseScript     = GetComponent <PBSNoiseScript>();
     if (pbsNoiseScript)
     {
         noiseGenerator = pbsNoiseScript.GetNoiseGenerator();
     }
     else
     {
         noiseGenerator = new PBSNoiseGenerator();
     }
 }
 public WarpModule(PBSNoiseGenerator inputModule, PBSNoiseGenerator warpModule, float multiplier, WarpIterationsType warpIterations)
 {
     this.inputModule        = inputModule;
     this.warpModule         = warpModule;
     this.Iteration1XOffset  = 1.6f;
     this.Iteration1YOffset  = 2.5f;
     this.Iteration1ZOffset  = 0;
     this.Iteration2XOffset1 = 5.7f;
     this.Iteration2YOffset1 = 3.4f;
     this.Iteration2ZOffset1 = 0;
     this.Iteration2XOffset2 = 2.1f;
     this.Iteration2YOffset2 = 3.5f;
     this.Iteration2ZOffset2 = 0;
     this.Multiplier         = multiplier;
     this.WarpIterations     = warpIterations;
 }
Exemplo n.º 6
0
 public void UpdateNoiseGenerator()
 {
     noiseGenerator = pbsNoiseScript.GetNoiseGenerator();
     GenerateMesh();
 }
Exemplo n.º 7
0
 public ZeroOneNoiseModule(PBSNoiseGenerator noiseGenerator)
 {
     this.noiseGenerator = noiseGenerator;
 }
Exemplo n.º 8
0
 public ScaleBiasNoiseModule(PBSNoiseGenerator inputModule, float scale, float bias)
 {
     this.inputModule = inputModule;
     this.scale       = scale;
     this.bias        = bias;
 }