|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.Node
org.j3d.aviatrix3d.Group
org.web3d.vrml.renderer.ogl.browser.GlobalEffectsGroup
public class GlobalEffectsGroup
Represents all of the global rendering effects in the world - viewpoint, background and fog.
TODO:
- Figure out the correct density calculations for exponential fog based
on visibilityRange.
| Field Summary |
|---|
| Fields inherited from class org.j3d.aviatrix3d.Group |
|---|
childList, cullList, dirtyBoundsCount, lastChild, pickableList, pickFlags, wkVec1, wkVec2 |
| Fields inherited from class org.j3d.aviatrix3d.Node |
|---|
bounds, implicitBounds, INVALID_BOUNDS, parent |
| Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
|---|
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG |
| Fields inherited from interface org.web3d.vrml.renderer.ogl.input.OGLGlobalEffectsHandler |
|---|
FOG_DISABLE, FOG_EXPONENTIAL, FOG_LINEAR |
| Fields inherited from interface org.j3d.aviatrix3d.picking.PickableObject |
|---|
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
| Fields inherited from interface org.j3d.aviatrix3d.picking.PickTarget |
|---|
CUSTOM_PICK_TYPE, GROUP_PICK_TYPE, LEAF_PICK_TYPE, SINGLE_PICK_TYPE |
| Constructor Summary | |
|---|---|
GlobalEffectsGroup(org.j3d.aviatrix3d.SimpleScene scene)
Create a new instance with the headlight off and controls over whether the code will be used in a static or dynamic environment. |
|
| Method Summary | |
|---|---|
void |
addViewDependentChild(org.j3d.aviatrix3d.Group group)
Add an arbitrary child that depends on being view-aligned to the view group. |
void |
enableFog(int state)
Update the fog type in use. |
org.j3d.aviatrix3d.Viewpoint |
getViewpoint()
Get the viewPlatform defined here so that views can be attached to it. |
void |
initialize()
Instruct the effects group to start initialisation now |
void |
setBackgroundMatrix(javax.vecmath.Matrix4f transform)
Set the background rotation matrix this new matrix. |
void |
setFogDetails(float visLimit,
float r,
float g,
float b)
Update the fog with different setups. |
void |
setFogMatrix(javax.vecmath.Matrix4f transform)
Set the fog coordinate matrix this new matrix. |
void |
setLayerId(int id)
Set or reset the layer ID to the new ID value. |
void |
setViewMatrix(javax.vecmath.Matrix4f transform)
Update the view matrix to be this new matrix. |
void |
updateBackgroundGround(float[] color,
float[] angles,
int num)
Update the background ground color sphere to the new values. |
void |
updateBackgroundSky(float[] color,
float[] angles,
int num)
Update the background sky color sphere to the new values. |
void |
updateBackgroundTextures(org.j3d.aviatrix3d.Texture2D[] textures,
boolean[] flags)
Update the background textures to this new set. |
void |
updateBackgroundTransparency(float transparency)
Update the background transparency to this new value. |
void |
updateNodeBoundsChanges(java.lang.Object src)
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds. |
void |
updateNodeDataChanges(java.lang.Object src)
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds. |
void |
useHeadlight(boolean on)
Set the embedded headlight to be on or off. |
| Methods inherited from class org.j3d.aviatrix3d.Group |
|---|
addChild, checkForCyclicChild, checkPickMask, getAllChildren, getChild, getCullableChildren, getCullableParent, getPickableBounds, getPickableChild, getPickableChildren, getPickMask, getPickTargetType, hasMultipleParents, indexOfChild, markBoundsDirty, numChildren, numCullableChildren, numPickableChildren, pickBatch, pickSingle, recomputeBounds, removeAllChildren, removeChild, removeChild, requestBoundsUpdate, setBounds, setChild, setLive, setPickMask, setUpdateHandler, updateBounds |
| Methods inherited from class org.j3d.aviatrix3d.Node |
|---|
boundsChanged, checkForCyclicParent, getBounds, getParent, removeParent, setParent, updateParentBounds |
| Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
|---|
dataChanged, getUserData, isLive, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.j3d.aviatrix3d.rendering.GroupCullable |
|---|
getBounds |
| Constructor Detail |
|---|
public GlobalEffectsGroup(org.j3d.aviatrix3d.SimpleScene scene)
scene - The scene to use for the global effects| Method Detail |
|---|
public void setLayerId(int id)
setLayerId in interface OGLGlobalEffectsHandlerid - A non-negative ID for the layerpublic void setViewMatrix(javax.vecmath.Matrix4f transform)
setViewMatrix in interface OGLGlobalEffectsHandlertransform - The new view matrix settingspublic void setBackgroundMatrix(javax.vecmath.Matrix4f transform)
setBackgroundMatrix in interface OGLGlobalEffectsHandlertransform - The new background matrix settingspublic void setFogMatrix(javax.vecmath.Matrix4f transform)
setFogMatrix in interface OGLGlobalEffectsHandlertransform - The new fog matrix settingspublic void updateBackgroundTransparency(float transparency)
updateBackgroundTransparency in interface OGLGlobalEffectsHandlertransparency - A value between 0 and 1
public void updateBackgroundTextures(org.j3d.aviatrix3d.Texture2D[] textures,
boolean[] flags)
updateBackgroundTextures in interface OGLGlobalEffectsHandlertextures - The list of textures to useflags - The list of flags indicating a texture change
public void updateBackgroundGround(float[] color,
float[] angles,
int num)
updateBackgroundGround in interface OGLGlobalEffectsHandlercolor - The color values to use as a flat arrayangles - The angles to use at each colour boundarynum - The number of color values to read from the arrays
public void updateBackgroundSky(float[] color,
float[] angles,
int num)
updateBackgroundSky in interface OGLGlobalEffectsHandlercolor - The color values to use as a flat arrayangles - The angles to use at each colour boundarynum - The number of color values to read from the arrayspublic void enableFog(int state)
enableFog in interface OGLGlobalEffectsHandlerstate - The fog to use right now
public void setFogDetails(float visLimit,
float r,
float g,
float b)
setFogDetails in interface OGLGlobalEffectsHandlervisLimit - The visibility limit. Zero to disable itr - The red component of the fog colorg - The green component of the fog colorb - The blue component of the fog colorpublic void updateNodeBoundsChanges(java.lang.Object src)
updateNodeBoundsChanges in interface org.j3d.aviatrix3d.NodeUpdateListenersrc - The node or Node Component that is to be updated.public void updateNodeDataChanges(java.lang.Object src)
updateNodeDataChanges in interface org.j3d.aviatrix3d.NodeUpdateListenersrc - The node or Node Component that is to be updated.public void initialize()
public org.j3d.aviatrix3d.Viewpoint getViewpoint()
public void useHeadlight(boolean on)
on - true if the headlight should be turned onpublic void addViewDependentChild(org.j3d.aviatrix3d.Group group)
group - The child to add
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||