public class BasicController extends java.lang.Object implements Controller
| Constructor and Description |
|---|
BasicController() |
| Modifier and Type | Method and Description |
|---|---|
void |
getEastDirection(Vec2 dst)
Get east direction
|
void |
getMoonDirection(Vec3 dst)
Get moon direction
|
float |
getMoonPhase()
Get moon phase
|
void |
getSunDirection(Vec3 dst)
Get sun direction
|
Vec3 |
getTime(Vec3 dst)
Get time
|
void |
setEastDirection(Vec2 eastDirection)
Set eastn direction
|
void |
setMoonPhase(float moonPhase)
Set moon phase
|
void |
setTime(Vec3 time)
Set time
|
void |
update(float simDeltaTime)
Update controller
|
public BasicController()
deleteBySkyX - true to automatically destroy the controller by SkyX, false otherwisepublic void update(float simDeltaTime)
update in interface ControllersimDeltaTime - Simulation delta time (It's not the time since last frame, it's the delta simulation time, one
time the time since last frame has been multiplied by the time multiplier)public void setTime(Vec3 time)
time - Time, where x = time in [0, 24]h range, y = sunrise hour in [0, 24]h range, z = sunset hour in [0, 24] rangepublic Vec3 getTime(Vec3 dst)
public void setEastDirection(Vec2 eastDirection)
eastDirection - East direction, in X,Z world coords (must be normalized)public void getEastDirection(Vec2 dst)
public void getSunDirection(Vec3 dst)
getSunDirection in interface Controllerdst - Sun direction, the Earth-to-Sun directionpublic void getMoonDirection(Vec3 dst)
getMoonDirection in interface Controllerdst - Moon direction, Earth-to-Moon directionpublic void setMoonPhase(float moonPhase)
moonPhase - Moon phase in [-1,1] range, where -1 means fully covered Moon, 0 clear Moon and 1 fully covered Moonpublic float getMoonPhase()
getMoonPhase in interface ControllerBonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com