Package com.github.yellowstonegames.grid
package com.github.yellowstonegames.grid
-
ClassDescriptionCombined higher-dimensional value noise with simplex noise as one of its axes.Makes 2D through 6D value noise that simply preserves the behavior of an
IPointHash, including intentional (or unintentional) artifacts that the point hash produces.An unusual kind of INoise that typically only outputs -1 or 1, for cases where you want binary results of blobby noise, but can also produce more bits if constructed as such.Provides access to precalculated tiling planes of 2D blue noise, that is, noise without high-frequency components, as well as seeded mixes of different blue noise planes that make it have even fewer patterns.Provides a means to generate Bresenham lines in 2D.Various simple cellular-automata rules and the data they operate on.An INoise implementation that divides space up into cells, and has configurable ways to get values from cells.A class that imitates patterns in an existingRegionand uses it to fill another Region so it has a similar visual style.A 2D coordinate with (constant) x and y fields.A variant on jdkgdxds'ObjectFloatMapclass that only uses Coord keys, and can do so more efficiently.A variant on jdkgdxds'ObjectFloatOrderedMapclass that only uses Coord keys, and can do so more efficiently.A variant on jdkgdxds'ObjectIntMapclass that only uses Coord keys, and can do so more efficiently.A variant on jdkgdxds'ObjectIntOrderedMapclass that only uses Coord keys, and can do so more efficiently.A variant on jdkgdxds'ObjectLongMapclass that only uses Coord keys, and can do so more efficiently.A variant on jdkgdxds'ObjectLongOrderedMapclass that only uses Coord keys, and can do so more efficiently.A variant on jdkgdxds'ObjectObjectMapclass that only uses Coord keys, and can do so more efficiently.A variant on jdkgdxds'ObjectObjectMapclass that only uses Coord keys, and can do so more efficiently.A variant on jdkgdxds'ObjectOrderedSetclass that only holds Coord items, and can do so more efficiently.A variant on jdkgdxds'ObjectSetclass that only holds Coord items, and can do so more efficiently.A periodic type of continuous noise that looks good when frequencies are low, and rather bad when frequencies are high.Represents the eight grid directions and the deltaX, deltaY values associated with those directions.A drunkard's-walk-like algorithm for line-drawing "wobbly" paths.A wrapper around anINoisethat allows two extra degrees of freedom to adjust the inputs by a small amount, continuously rather than in jumps (as adjusting the seed would do).Contains methods to draw anti-aliased lines based on floating-point coordinates.A variant onPhantomNoisethat also produces arbitrary-dimensional continuous noise, but that is optimized for higher-dimensional output (4 and up, in particular).An interface for point hashes that are statistically biased, as well as a holder for inner classes that implement this.Very similar toFlawedPointHash.QuiltHash, but this doesn't change the pattern in different large squares, and instead repeats a square or cube of symmetric and patterned results over and over (so it can be tiled).FNV32a is OK as a hash for bytes when used in some hash tables, but it has major issues on its low-order bits when used as a point hash (the high bits aren't much better).Makes smaller results on average, with a biased average at about 25% of the range instead of 50% of the range for most non-biased hashes.Extremely flawed if you're using this as a point hash, but meant to be aesthetically interesting, this produces different symmetrical patterns in squares, as if on a quilt.Produces hashes that show strong bias on one axis (usually the later axes matter more) and have nice-looking patterns of dots.Like CubeHash, but with a squished Z axis in 3D and 4D, as well as a squashed W axis in 4D.Foam noise code as anINoiseimplementation.Foam noise but using Simplex noise instead of Value noise.This class provides methods for calculating Field of View in grids.Stores arrays representing vectors on the unit hypersphere in 2D through 6D.An iterator that returns cells in a square around a location.Iterates in a square spiral going outward from a starting position.An iterator to iterate from a starting position (exclusive) and going up.Arbitrary-dimensional continuous noise that always looks very blocky.Calculates and stores 2D and optionally 3D Hilbert Curves up to a reasonable size.An INoise implementation that combines and accentuatesSimplexNoiseandValueNoise.A variant onCyclicNoisethat always uses 7D noise internally, filling in any dimensions that it doesn't have with 1s.Combines IGridPositioned and IIdentified for objects that have a Coord position and an int identifier.Allows getting and setting the position of an object, as a Coord.Shared interface for all continuous noise algorithms that can produce at least one dimensionality of noise between 2D and 7D.A group of similar methods for getting hashes of points based on int coordinates in 2, 3, 4, or 6 dimensions and an int for state; the code is similar toLongPointHashbut will be much faster on GWT.An interface for "point hashes", that is, functions that produce usually-unique integer results given multiple integer inputs.A convenience abstract class to implement IPointHash when you have an int for state.A convenience abstract class to implement IPointHash when you have a long for state.A very simple point hash meant only for fixed-size grids, and only for when the hash must be unique but does not need to be randomized.A convenience class that makes dealing with multiple colored light sources easier.A functional interface that is really only meant to be one of two functions:FOV.reuseFOV(float[][], float[][], int, int, float, Radius)orFOV.reuseFOVSymmetrical(float[][], float[][], int, int, float, Radius).Used to choose whether FOV calculations should be done as quickly as possible (without symmetry guarantees) or more precisely (and more slowly, but with a symmetry guarantee).A convenience class that makes dealing with multiple colored light sources easier.A tiny data wrapper around aLightSource.radianceand a CoordLightSource.positionfor that Radiance, as well as, optionally, an angle to project a cone of light in and a span for how wide of a cone to project.A shared interface for line-drawing classes, so instances can be interchanged.Tools for constructing patterns using box-drawing characters in grids.A group of similar methods for getting hashes of points based on long coordinates in 2, 3, 4, 5, or 6 dimensions and a long for state.A way of measuring what cells are adjacent and how much further any adjacent cells are from other adjacent cells.A wrapper around anINoisethat allows an extra degree of freedom to adjust the inputs by a small amount, continuously rather than in jumps (as adjusting the seed would do).A wide range of noise functions that can all be called from one configurable object.Wraps anotherINoiseand alters its output by running it through anInterpolations.Interpolator.Utility functions for pairing (and tripling) functions, which take two (or three) numbers, typicallyints, and return an int with magnitude dependent on the input number with maximum magnitude.K.jpg's OpenSimplex 2, faster variant.K.jpg's OpenSimplex 2, smoother variant.A simple line-drawing algorithm that only takes orthogonal steps; may be useful for LOS in games that use Manhattan distances for measurements."Classic" Perlin noise, written by Ken Perlin before he createdSimplex Noise, with minor adjustments.A mix of "Classic"PerlinNoise, written by Ken Perlin before he created Simplex Noise, withValueNoisecalculated at the same time.Arbitrary-dimensional continuous noise that maintains most of the same style even as the dimensionality gets fairly high.A mutable 2D point with float components implementingPoint2,PrimitiveCollection.OfFloat, andPointNFloat.A mutable 2D point with int components implementingPoint2,PrimitiveCollection.OfInt, andPointNInt.A mutable 3D point with float components implementingPoint3,PrimitiveCollection.OfFloat, andPointNFloat.A mutable 3D point with int components implementingPoint3,PrimitiveCollection.OfInt, andPointNInt.A mutable 4D point with float components implementingPoint4,PrimitiveCollection.OfFloat, andPointNFloat.A mutable 4D point with int components implementingPoint4,PrimitiveCollection.OfInt, andPointNInt.A mutable 5D point with float components implementingPoint5,PrimitiveCollection.OfFloat, andPointNFloat.A mutable 5D point with int components implementingPoint5,PrimitiveCollection.OfInt, andPointNInt.A mutable 6D point with float components implementingPoint6,PrimitiveCollection.OfFloat, andPointNFloat.A mutable 6D point with int components implementingPoint6,PrimitiveCollection.OfInt, andPointNInt.Groups functionality common to points with float components, in any dimension.AFloatIteratorthat iterates over the components in a PointNFloat usingPointNFloat.get(int).Groups functionality common to points with int components, in any dimension.AnIntIteratorthat iterates over the components in a PointNInt usingPointNInt.get(int).An implementation of the Poisson Disk sampling algorithm on a discrete grid.A variant onCyclicNoisethat always uses 7D noise internally, filling in any dimensions that it doesn't have with 1s.Static methods to produce numbers and points from quasi-random sequences (which seem like random sequences, but have lower "discrepancy" between results).A NoiseWrapper that makes its output radially symmetric around a given center point.Grouping of qualities related to glow and light emission.Basic radius strategy implementations likely to be used for roguelikes.Region encoding of on/off information about areas using bitsets; uncompressed but fast at bulk operations.This has tools for generating and applying matrix rotations, potentially in higher dimensions than the typical 2 or 3.A wrapper around similar logic toRotationTools, but with no allocation after construction.Foam noise code as anINoiseimplementation, additionally taking a shape parameter for its interpolations (to allow using something shaped differently from a cubic Hermite spline, which is otherwise the default).Simplex noise functions, in 2D, 3D, 4D, 5D, and 6D.Simplex noise functions, in 2D, 3D, 4D, 5D, and 6D.Simplex noise functions, in 2D, 3D, 4D, 5D, and 6D.Combines value noise with simplex noise, likeHoneyNoise, but has more sinuous squashing and stretching of its lattice because each axis is run throughLineWobble.bicubicWobble(int, float).A mix ofCyclicNoisewith Simplex noise; much less periodic than CyclicNoise alone.SpatialMap<V extends IGridIdentified>A kind of Map-like data structure that allows lookup by int id or Coord position, and retains its insertion order.Performs randomized flood-fill operations on arbitrarily-shaped areas, until a volume is reached.A variant onPhantomNoisethat also produces arbitrary-dimensional continuous noise, but that is optimized for higher-dimensional output (4 and up, in particular).An INoise implementation that produces blocky noise from 1D to 7D.A "one-stop shop" for handling field-of-view, line-of-sight, (colorful) light sources, and more.A "one-stop shop" for handling field-of-view, line-of-sight, (colorful) light sources, and more.A type of continuous noise that is meant to look "similar in character" regardless of dimension.A port of WaveFunctionCollapse by ExUtumno/mxgmn; takes a single sample of a grid to imitate and produces one or more grids of requested sizes that have a similar layout of cells to the sample.Makes 2D through 6D value noise that effectively produces a random float result for every different set of arguments given to aWhiteNoise.getNoise(float, float)orWhiteNoise.getNoiseWithSeed(float, float, long)call.