public class GlobalLightSource
extends java.lang.Object
Constructor and Description |
---|
GlobalLightSource(float azimuth,
float height,
com.badlogic.gdx.graphics.Color color,
com.badlogic.gdx.graphics.Color ambient,
int amplitudeHeight)
A GlobalLightSource can be the moon, the sun or even something new.
|
Modifier and Type | Method and Description |
---|---|
com.badlogic.gdx.graphics.Color |
getAmbient()
Returns the ambient the GLS emits.
|
float |
getAzimuth() |
float |
getAzimuthSpeed() |
float |
getHeight()
current height above horizon
|
com.badlogic.gdx.graphics.Color |
getLight()
Returns the light the GLS emits.
|
int |
getMaxAngle() |
com.badlogic.gdx.math.Vector3 |
getNormal() |
float |
getPower()
A light source shines can shine brighter and darker.
|
com.badlogic.gdx.graphics.Color |
getTone() |
void |
setAzimuth(float azimuth)
The longitudinal position
|
void |
setHeight(float height)
The Latitude posiiton.
|
void |
setTone(com.badlogic.gdx.graphics.Color tone) |
void |
update(float dt) |
public GlobalLightSource(float azimuth, float height, com.badlogic.gdx.graphics.Color color, com.badlogic.gdx.graphics.Color ambient, int amplitudeHeight)
azimuth
- The starting position.height
- The starting position.color
- the starting color of the light. With this parameter you controll its brightness.ambient
- amplitudeHeight
- the maximum degree during a day the LightSource risespublic float getPower()
public com.badlogic.gdx.graphics.Color getTone()
public float getHeight()
public float getAzimuth()
public float getAzimuthSpeed()
public int getMaxAngle()
public void setHeight(float height)
height
- in degrees 0-360°public void setAzimuth(float azimuth)
azimuth
- in degrees 0-360°public void setTone(com.badlogic.gdx.graphics.Color tone)
tone
- public void update(float dt)
dt
- public com.badlogic.gdx.graphics.Color getLight()
public com.badlogic.gdx.graphics.Color getAmbient()
public com.badlogic.gdx.math.Vector3 getNormal()