public void ChangeDefaultMaterial(string softness)
 {
     if (softness != null)
     {
         if (softness == "NORMAL")
         {
             this.defaultGrassType = GrassManager.GrassType.GRASS_TYPE_NORMAL;
         }
         else if (softness == "SOFT")
         {
             this.defaultGrassType = GrassManager.GrassType.GRASS_TYPE_SOFT;
         }
         else if (softness == "FIRM")
         {
             this.defaultGrassType = GrassManager.GrassType.GRASS_TYPE_FIRM;
         }
     }
 }
 public GrassManager.GrassType getGrassType(double x, double z, List <SimulationGreen> greens)
 {
     GrassManager.GrassType grassType = this.defaultGrassType;
     if (greens == null)
     {
         return(grassType);
     }
     foreach (SimulationGreen green in greens)
     {
         double radius = (double)green.Radius;
         if (x <= (double)green.Origin.x - radius || x >= (double)green.Origin.x + radius || z <= (double)green.Origin.z - radius || z >= (double)green.Origin.z + radius)
         {
             continue;
         }
         grassType = GrassManager.GrassType.GRASS_TYPE_GREEN;
         break;
     }
     return(grassType);
 }
 public void SetGrassType(GrassManager.GrassType type)
 {
     this.defaultGrassType = type;
 }
 public double getSpinFrictionCoeff(GrassManager.GrassType grassType)
 {
     return(this.terrainSpinFrictionCoeff[(int)grassType]);
 }
 public double getFrictionCoeff(GrassManager.GrassType grassType)
 {
     return(this.frictionCoeff[(int)grassType]);
 }
 public double getBounceCoeff(GrassManager.GrassType grassType)
 {
     return(this.terrainBounceCoeff[(int)grassType]);
 }
 private GrassManager()
 {
     this.defaultGrassType = GrassManager.GrassType.GRASS_TYPE_NORMAL;
 }