Class BrickGridFunction3D

java.lang.Object
com.ardor3d.math.functions.GridPatternFunction3D
com.ardor3d.math.functions.BrickGridFunction3D
All Implemented Interfaces:
Function3D

public class BrickGridFunction3D extends GridPatternFunction3D
Creates a brick-like pattern in the XY plane. This is not really 3D, since it ignores the z factor. The brick and mortar values returned by this function can (and do by default) have some amount of variation for visual interest. The specified variation represents a maximum -- actual variation is determined randomly within this maximum variation. Since actual variation is determined randomly, the brick and mortar values are likely to change a bit for each instance of this class. In other words, if you do not want the variation to change at all, you should instantiate this class once and use the same object each time.
  • Constructor Details

    • BrickGridFunction3D

      public BrickGridFunction3D()
      Create a brick pattern using all default values.
    • BrickGridFunction3D

      public BrickGridFunction3D(int brickLength, int brickHeight, int mortarThickness, double brickValue, double mortarValue, double brickVariationAmount, double mortarVariationAmount)
      Create a brick pattern with values specified by the caller.
      Parameters:
      brickLength - The number of grid cells used for the length of a brick (default 12).
      brickHeight - The number of grid cells used for the height of a brick (default 6).
      mortarThickness - The number of grid cells used for the thickness of mortar (default 1).
      brickValue - The value returned from the function for a brick coordinate (default 0.0).
      mortarValue - The value returned from the function for a mortar coordinate (default 0.9).
      brickVariationAmount - The amount by which the brick value can vary (default 0.1). Use 0.0 for no variation.
      mortarVariationAmount - The amount by which the mortar value can vary (default 0.05). Use 0.0 for no variation.