Package org.mapsforge.map.layer.hills
Class DiffuseLightShadingAlgorithm
- java.lang.Object
-
- org.mapsforge.map.layer.hills.AbsShadingAlgorithmDefaults
-
- org.mapsforge.map.layer.hills.DiffuseLightShadingAlgorithm
-
- All Implemented Interfaces:
ShadingAlgorithm
public class DiffuseLightShadingAlgorithm extends AbsShadingAlgorithmDefaults
simulates diffuse lighting (without self-shadowing) except for scaling the light values below horizontal and above horizontal differently so that both make full use of the available dynamic range while maintinging horizontal neutral identical toSimpleShadingAlgorithm
and to the standard neutral value that is filled in when there is no hillshading but the always-option is set to true in the theme.More accurate than
SimpleShadingAlgorithm
, but maybe not as useful for visualizing both softly rolling hills and dramatic mountain ranges at the same time.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.mapsforge.map.layer.hills.ShadingAlgorithm
ShadingAlgorithm.RawHillTileSource, ShadingAlgorithm.RawShadingResult
-
-
Constructor Summary
Constructors Constructor Description DiffuseLightShadingAlgorithm()
DiffuseLightShadingAlgorithm(float heightAngle)
height angle of light source over ground (in degrees 0..90)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
convert(java.nio.ByteBuffer din, int axisLength, int rowLen, int padding, org.mapsforge.map.layer.hills.HgtCache.HgtFileInfo fileInfo)
boolean
equals(java.lang.Object o)
int
getAxisLenght(org.mapsforge.map.layer.hills.HgtCache.HgtFileInfo source)
double
getLightHeight()
int
hashCode()
java.lang.String
toString()
-
Methods inherited from class org.mapsforge.map.layer.hills.AbsShadingAlgorithmDefaults
transformToByteBuffer
-
-
-
-
Method Detail
-
getLightHeight
public double getLightHeight()
-
getAxisLenght
public int getAxisLenght(org.mapsforge.map.layer.hills.HgtCache.HgtFileInfo source)
-
convert
protected byte[] convert(java.nio.ByteBuffer din, int axisLength, int rowLen, int padding, org.mapsforge.map.layer.hills.HgtCache.HgtFileInfo fileInfo) throws java.io.IOException
- Specified by:
convert
in classAbsShadingAlgorithmDefaults
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-