|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--yaarq.sys.yrqEnviron
This class encapsules all environmental settings used in a 3D environment. It provides support for a background geometry, fog, and two main lights, the basic ambient lights and a directional main light.
Particle visuals are added to the environment. They can only be added here.
Instances of the class automatically attach to the engines root on creation. The engine creates an instance of this class on initialisation, properties of the instance can be set at runtime.
TODO: Nothing
| Constructor Summary | |
yrqEnviron(yrqEngine a_engine)
|
|
| Method Summary | |
void |
addVisual(java.lang.String a_name,
yrqParticleVisual a_visual)
This method adds a visual to the environ. |
void |
clearVisuals()
This method clears all visuals from the hierarchy, detaching them in the process. |
javax.media.j3d.Fog |
getFog()
This function returns the internal LinearFog used by the environ instance. |
javax.media.j3d.BackgroundSound |
getMusic()
This function returns the background music playing |
yrqVisual |
getVisual(java.lang.String a_name)
This method retrieves a visual which has been added to the environ by its name. |
void |
removeVisual(java.lang.String a_name)
This method removes a visual specified by name. |
void |
removeVisual(yrqVisual a_visual)
This method removes a visual specified as an instance. |
void |
setBackground(yrqBasicVisual a_visual)
This method sets the background visual to be used in the environment. |
void |
setBaseLight(javax.vecmath.Color3f a_color)
This method sets the basic ambient lighting level of the environment. |
void |
setFog(javax.vecmath.Color3f a_color,
float a_min,
float a_max)
This method sets the fog to be used in the environment. |
void |
setMainLight(javax.vecmath.Color3f a_color,
javax.vecmath.Vector3f a_direction)
This method sets the main directional light of the environment. |
void |
setMusic(javax.media.j3d.MediaContainer a_music,
boolean a_loop)
|
void |
update()
This method is called by the engine regulary to update visuals added to the environ |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public yrqEnviron(yrqEngine a_engine)
| Method Detail |
public void addVisual(java.lang.String a_name,
yrqParticleVisual a_visual)
a_name - The name under which to add the visuala_visual - The visual to be addedpublic void clearVisuals()
public javax.media.j3d.Fog getFog()
public javax.media.j3d.BackgroundSound getMusic()
public yrqVisual getVisual(java.lang.String a_name)
a_name - The name of the visual to be retrievedpublic void removeVisual(java.lang.String a_name)
a_name - The name of the visual to be removedpublic void removeVisual(yrqVisual a_visual)
a_visual - The visual to be removedpublic void setBackground(yrqBasicVisual a_visual)
a_visual - The visual to use as a backgroundpublic void setBaseLight(javax.vecmath.Color3f a_color)
a_color - The color of the basic ambient light
public void setFog(javax.vecmath.Color3f a_color,
float a_min,
float a_max)
a_color - The color of the linear foga_min - The start distance of the linear foga_max - The full-value distance of the linear fog
public void setMainLight(javax.vecmath.Color3f a_color,
javax.vecmath.Vector3f a_direction)
a_color - The color of the directional main lighta_direction - The direction of the directional main light
public void setMusic(javax.media.j3d.MediaContainer a_music,
boolean a_loop)
public void update()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||