com.jmex.effects.transients
Class FadeInOut

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Node
          extended by com.jmex.effects.transients.Transient
              extended by com.jmex.effects.transients.FadeInOut
All Implemented Interfaces:
Savable, java.io.Serializable

public class FadeInOut
extends Transient

A FadeInOut object is made to be controlled by a FadeInOutController. It has 3 parts:
1) A Geometry who's per vertex color is to be changed by a FadeInOutController. 2) A begining (fadeOutNode) node that represents the FadeInOut at the begining. 3) An ending (fadeInNode) node that represents the FadeInOut when the FadeInOutController has reached the next stage.
When the next stage is reached by the controller, the begining node is detached and the ending node is attached. It is assumed the (1) geometry can fade to cover up the change.

Author:
Ahmed, Jack Lindamood (javadoc only)
See Also:
FadeInOutController, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.scene.Spatial
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode
 
Field Summary
 
Fields inherited from class com.jme.scene.Node
children
 
Fields inherited from class com.jme.scene.Spatial
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
FadeInOut(java.lang.String name, Geometry fade, Node out, Node in, ColorRGBA c)
          Creates a new FadeInOut node.
FadeInOut(java.lang.String name, Geometry fade, Node out, Node in, ColorRGBA c, float s)
          Creates a new FadeInOut node.
 
Method Summary
 ColorRGBA getFadeColor()
          Returns the current color being applied to the fade quad.
 Node getFadeInNode()
          Returns the node this object is fading into.
 Node getFadeOutNode()
          Returns the node this object is fading from.
 Geometry getFadeQuad()
          Returns the Geometry that is fading.
 float getSpeed()
          Returns the speed that this object should fade at.
 void setFadeColor(ColorRGBA c)
          Sets the current per vertex color of the fade quad, and updates the current fade color to c.
 void setFadeInNode(Node fade)
          Sets the node that this object will fade into.
 void setFadeOutNode(Node fade)
          Sets the node this object will fade from.
 void setFadeQuad(Geometry f)
          Sets the geometry that will fade.
 void setSpeed(float s)
          Sets the speed this object should fade at.
 void updateWorldData(float time)
          Ignoring children, this only updates all the controllers of this FadeInOut
 
Methods inherited from class com.jmex.effects.transients.Transient
getCurrentStage, getMaxNumOfStages, setCurrentStage, setMaxNumOfStages
 
Methods inherited from class com.jme.scene.Node
applyRenderState, attachChild, attachChildAt, childChange, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, findCollisions, findPick, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, hasCollision, lockBounds, lockMeshes, lockShadows, lockTransforms, read, setModelBound, sortLights, swapChildren, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldBound, updateWorldVectors, write
 
Methods inherited from class com.jme.scene.Spatial
addController, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getClassTag, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBranch, lockMeshes, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBranch, unlockMeshes, updateGeometricState, updateRenderState, updateRenderState, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, worldToLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Constructor Detail

FadeInOut

public FadeInOut(java.lang.String name,
                 Geometry fade,
                 Node out,
                 Node in,
                 ColorRGBA c)
Creates a new FadeInOut node. The speed is by default .01f

Parameters:
name - The name of the node.
fade - The geometry whos per vertex color will fade over time.
out - The begining node that will fade out.
in - The ending node that will fade in.
c - The begining color of the fade Geometry.

FadeInOut

public FadeInOut(java.lang.String name,
                 Geometry fade,
                 Node out,
                 Node in,
                 ColorRGBA c,
                 float s)
Creates a new FadeInOut node.

Parameters:
name - The name of the node.
fade - The geometry whos per vertex color will fade over time.
out - The begining node that will fade out.
in - The ending node that will fade in.
c - The begining color of the fade geometry.
s - The speed at which the fade will take place.
Method Detail

getFadeQuad

public Geometry getFadeQuad()
Returns the Geometry that is fading.

Returns:
The currently fading geometry.

setFadeQuad

public void setFadeQuad(Geometry f)
Sets the geometry that will fade.

Parameters:
f - The new geometry that will fade.

getFadeInNode

public Node getFadeInNode()
Returns the node this object is fading into.

Returns:
The current fade in node.

setFadeInNode

public void setFadeInNode(Node fade)
Sets the node that this object will fade into.

Parameters:
fade - The node to fade into.

getFadeOutNode

public Node getFadeOutNode()
Returns the node this object is fading from.

Returns:
The current fade out node.

setFadeOutNode

public void setFadeOutNode(Node fade)
Sets the node this object will fade from.

Parameters:
fade - The new fade out node.

getFadeColor

public ColorRGBA getFadeColor()
Returns the current color being applied to the fade quad.

Returns:
The current fade color.

setFadeColor

public void setFadeColor(ColorRGBA c)
Sets the current per vertex color of the fade quad, and updates the current fade color to c.

Parameters:
c - The new color to set the fade quad too.

getSpeed

public float getSpeed()
Returns the speed that this object should fade at.

Returns:
The current speed.

setSpeed

public void setSpeed(float s)
Sets the speed this object should fade at.

Parameters:
s - The new speed.

updateWorldData

public void updateWorldData(float time)
Ignoring children, this only updates all the controllers of this FadeInOut

Overrides:
updateWorldData in class Node
Parameters:
time - the time to pass to update.