com.jmex.effects.transients
Class Fader

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Geometry
          extended by com.jme.scene.TriMesh
              extended by com.jme.scene.shape.Quad
                  extended by com.jmex.effects.transients.Fader
All Implemented Interfaces:
Savable, java.io.Serializable

public class Fader
extends Quad

A Fader can be added to a scene directly as it extends Quad and simply does what it says, provides the ability to fade in and out via a color and opacity.

Author:
Matthew D. Hicks
See Also:
Serialized Form

Nested Class Summary
static class Fader.FadeMode
           
 
Nested classes/interfaces inherited from class com.jme.scene.TriMesh
TriMesh.Mode
 
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.shape.Quad
height, width
 
Fields inherited from class com.jme.scene.TriMesh
indexBuffer, triangleQuantity
 
Fields inherited from class com.jme.scene.Geometry
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity
 
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
Fader(java.lang.String name, float width, float height, ColorRGBA color, float fadeTimeInSeconds)
          If width and height both equal 0 or less the width and height will be defined to take up the entire screen.
 
Method Summary
 float getAlpha()
          Gets the current alpha of this Quad.
 ColorRGBA getColor()
           
 Fader.FadeMode getFadeMode()
          Gets the current mode of operation for this Fader.
 float getFadeTimeInSeconds()
           
 void setAlpha(float alpha)
          Sets the alpha where an alpha of 1.0f is completely opaque and 0.0f is transparent.
 void setColor(ColorRGBA color)
           
 void setFadeTimeInSeconds(float fadeTimeInSeconds)
           
 void setMode(Fader.FadeMode mode)
          Sets the current mode of operation of this Fader.
 
Methods inherited from class com.jme.scene.shape.Quad
getCenter, getHeight, getWidth, initialize, resize, updateGeometry
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, randomPointOnTriangles, read, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity, write
 
Methods inherited from class com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, applyRenderState, checkTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, reconstruct, resizeTextureIds, rotateNormals, rotatePoints, scaleTextureCoordinates, scaleTextureCoordinates, setBinormalBuffer, setCastsShadows, setColorBuffer, setDefaultColor, setDisplayListID, setFogCoordBuffer, setHasDirtyVertices, setLightState, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTangentBuffer, setTextureCoords, setTextureCoords, setTextureCoords, setVBOInfo, setVertexBuffer, setVertexCount, sortLights, translatePoints, translatePoints, unlockMeshes, updateModelBound, updateWorldBound
 
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, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, 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, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateRenderState, updateWorldData, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, 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

Fader

public Fader(java.lang.String name,
             float width,
             float height,
             ColorRGBA color,
             float fadeTimeInSeconds)
If width and height both equal 0 or less the width and height will be defined to take up the entire screen.

Parameters:
name -
width -
height -
color -
fadeTimeInSeconds -
Method Detail

setMode

public void setMode(Fader.FadeMode mode)
Sets the current mode of operation of this Fader. The alpha should be changed previous to the mode change if the mode is being changed from DISABLED.

Parameters:
mode -

getFadeMode

public Fader.FadeMode getFadeMode()
Gets the current mode of operation for this Fader.

Returns:
the fade mode of this Fader

setAlpha

public void setAlpha(float alpha)
Sets the alpha where an alpha of 1.0f is completely opaque and 0.0f is transparent.

Parameters:
alpha -

getAlpha

public float getAlpha()
Gets the current alpha of this Quad.

Returns:
The current alpha where 1.0f is opaque and 0.0f is transparent

getFadeTimeInSeconds

public float getFadeTimeInSeconds()
Returns:
Returns the fadeTimeInSeconds.

setFadeTimeInSeconds

public void setFadeTimeInSeconds(float fadeTimeInSeconds)
Parameters:
fadeTimeInSeconds - The fadeTimeInSeconds to set.

getColor

public ColorRGBA getColor()
Returns:
Returns the base color of the fader.

setColor

public void setColor(ColorRGBA color)
Parameters:
color - The color to set as the base color of the fader.