Class LightSource
java.lang.Object
com.github.yellowstonegames.grid.LightSource
- All Implemented Interfaces:
com.github.yellowstonegames.core.ISerializersNeeded
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLightSource(Coord position, Radiance radiance) LightSource(Coord position, Radiance radiance, float spanTurns, float directionTurns) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatfloatgetSpan()inthashCode()static LightSourcerecreateFromString(String data) voidsetDirection(float directionTurns) voidsetPosition(Coord position) voidsetRadiance(Radiance radiance) voidsetSpan(float spanTurns) stringDeserialize(String data) toString()
-
Field Details
-
radiance
-
position
-
span
public float spanHow wide of an arc the light source covers, measured in turns (0-1). -
direction
public float directionThe angle the light source emits light towards, measured in turns (0-1, counterclockwise from right). If span is 1 or greater, this has no effect.
-
-
Constructor Details
-
LightSource
public LightSource() -
LightSource
-
LightSource
-
-
Method Details
-
getRadiance
-
setRadiance
-
getPosition
-
setPosition
-
getSpan
public float getSpan() -
setSpan
public void setSpan(float spanTurns) - Parameters:
spanTurns- how wide of an arc this should spread light into, measured in turns (0-1)
-
getDirection
public float getDirection() -
setDirection
public void setDirection(float directionTurns) - Parameters:
directionTurns- what angle the light should project in, measured in turns (0-1, counterclockwise from right)
-
equals
-
hashCode
-
toString
-
stringSerialize
-
stringDeserialize
-
recreateFromString
-
getSerializersNeeded
-