Class FlawedPointHash.FNVHash
java.lang.Object
com.github.yellowstonegames.grid.IPointHash.IntImpl
com.github.yellowstonegames.grid.FlawedPointHash.FNVHash
- All Implemented Interfaces:
com.github.yellowstonegames.core.IFlawed, FlawedPointHash, IPointHash
- Enclosing interface:
FlawedPointHash
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). Unfortunately, it is not aesthetically pleasing as
a point hash. Some usages might be able to use it to apply a grimy, glitchy effect.
-
Nested Class Summary
Nested classes/interfaces inherited from interface FlawedPointHash
FlawedPointHash.CubeHash, FlawedPointHash.FlowerHash, FlawedPointHash.FNVHash, FlawedPointHash.LowLeaningHash, FlawedPointHash.QuiltHash, FlawedPointHash.RugHash, FlawedPointHash.SquishedCubeHashNested classes/interfaces inherited from interface IPointHash
IPointHash.IntImpl, IPointHash.LongImpl -
Field Summary
Fields inherited from class IPointHash.IntImpl
state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetState()inthashWithState(int x, int y, int state) inthashWithState(int x, int y, int z, int state) inthashWithState(int x, int y, int z, int w, int state) inthashWithState(int x, int y, int z, int w, int u, int state) inthashWithState(int x, int y, int z, int w, int u, int v, int state) inthashWithState(int x, int y, int z, int w, int u, int v, int m, int state)
-
Constructor Details
-
FNVHash
public FNVHash() -
FNVHash
public FNVHash(int state)
-
-
Method Details
-
getState
public int getState() -
hashWithState
public int hashWithState(int x, int y, int state) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int state) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int w, int state) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int w, int u, int state) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int w, int u, int v, int state) - Specified by:
hashWithStatein interfaceIPointHash
-
hashWithState
public int hashWithState(int x, int y, int z, int w, int u, int v, int m, int state) - Specified by:
hashWithStatein interfaceIPointHash
-