|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSGBackground.Background
SGBackground.Sky
public class Sky
| Field Summary | |
|---|---|
float |
phiS
Angle in radians to the sun vector from the south pole. |
float |
thetaS
Angle in radians from the zenith to the sun vector. |
Tuple.Tuple3f |
toSun
Tuple3f pointing to the sun. |
| Constructor Summary | |
|---|---|
Sky(processing.core.PApplet parent,
SGCamera.SGCamera cam)
|
|
Sky(processing.core.PApplet parent,
SGCamera.SGCamera cam,
int mode)
Creates a new instance of Sky |
|
| Method Summary | |
|---|---|
int |
clearSky(Tuple.Tuple3f dir)
Return the color of the sky for an angle in the sky. |
void |
draw()
Render the background with default resolution. |
void |
draw(int res)
Renders the background at a set resolution. |
float |
getTurbidity()
|
int |
overcast(Tuple.Tuple3f dir)
Returns the sky color for a patch of sky using the CIE overcast sky model |
void |
setMode(int mode)
|
void |
setSunByTime(float latitude,
float longitude,
int julianDay,
float timeOfDay,
float standardMeridian)
Sets the position of the sun using an earth position and time. |
void |
setSunVector(float theta,
float phi)
Set the sun vector using explicit spherical angles |
void |
setTurbidity(float turbidity)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Tuple.Tuple3f toSun
public float thetaS
public float phiS
| Constructor Detail |
|---|
public Sky(processing.core.PApplet parent,
SGCamera.SGCamera cam)
parent - cam -
public Sky(processing.core.PApplet parent,
SGCamera.SGCamera cam,
int mode)
parent - cam - Sky will be rendered to fill the view frustum of this camera.mode - Mode 0 = CIE overcast sky model
Mode 1 = Preetham daylight sky model| Method Detail |
|---|
public void setMode(int mode)
public void setTurbidity(float turbidity)
public float getTurbidity()
public void draw()
draw in class Backgroundpublic void draw(int res)
res - Points per axis to sample. Higher is better, but cost is N^2.public int clearSky(Tuple.Tuple3f dir)
dir - Sky direction to sample
public int overcast(Tuple.Tuple3f dir)
dir - Sky direction to sample
public void setSunVector(float theta,
float phi)
theta - Angle from the zenith to the sun in radians. Must be 0-PI.phi - Angle between the sun vector and the south vector in radians.
public void setSunByTime(float latitude,
float longitude,
int julianDay,
float timeOfDay,
float standardMeridian)
latitude - longitude - julianDay - timeOfDay - standardMeridian -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||