|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjme.locale.external.feature.SkyDome
SkyDome
defines an implementation of the sky interface where
the sky is represented as a dome. The dome or half sphere is rendered over
the camera and gives a smooth look and allow for transitions of the texture
and color. This will allow for day/night effects and other natural
phenomenon.
For more information see
this
PDF file.
Constructor Summary | |
SkyDome(float radius,
float dLon,
float dLat,
float hTile,
float vTile)
Constructor instantiates a new SkyDome object. |
Method Summary | |
float |
getSize()
getSize returns the size of the sky dome, which is
represented by the diameter of the dome. |
void |
render()
render draws the dome around the camera and applies the
texture. |
void |
setDomeRotation(float rotationSpeed)
setDomeRotation sets the speed at which the dome rotates
around the camera. |
void |
setTexture(java.lang.String filename)
setTexture assignes the texture that makes up the
sky dome. |
void |
setTextureSpeed(float xSpeed,
float ySpeed)
setTextureSpeed sets the animation speed of the dome texture. |
void |
update(float time)
update calculates the new position of the dome and
the texture based on the speeds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SkyDome(float radius, float dLon, float dLat, float hTile, float vTile)
SkyDome
object. All
attributes are stored and the dome is generated.
radius
- the radius of the sphere.dLon
- the spacing between longitude lines in degrees.dLat
- the spacing between latitude lines in degrees.hTile
- vTile
-
MonkeyGLException
- if the OpenGL context is not created before
creation.Method Detail |
public void setTexture(java.lang.String filename)
setTexture
assignes the texture that makes up the
sky dome.
filename
- the image file that represents the sky dome texture.public float getSize()
getSize
returns the size of the sky dome, which is
represented by the diameter of the dome.
getSize
in interface Sky
public void setTextureSpeed(float xSpeed, float ySpeed)
setTextureSpeed
sets the animation speed of the dome texture.
xSpeed
- the speed along the x axis.ySpeed
- the speed along the y axis.public void setDomeRotation(float rotationSpeed)
setDomeRotation
sets the speed at which the dome rotates
around the camera.
rotationSpeed
- the speed at which the dome rotates.public void update(float time)
update
calculates the new position of the dome and
the texture based on the speeds.
update
in interface Sky
time
- the time value for frame independant timing.public void render()
render
draws the dome around the camera and applies the
texture.
render
in interface Sky
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |