com.jmex.effects
Class FlareQuad

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.FlareQuad
All Implemented Interfaces:
Savable, Serializable

public class FlareQuad
extends Quad

FlareQuad represents a single light reflection in a LensFlare object.

Version:
$Id: FlareQuad.java,v 1.4 2006/05/11 19:39:37 nca Exp $
Author:
Joshua Slack
See Also:
Serialized Form

Nested Class Summary
 
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.Geometry
states
 
Fields inherited from class com.jme.scene.Spatial
LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, queueDistance
 
Constructor Summary
FlareQuad()
           
FlareQuad(String name, float width, float height)
          Creates a new Quad to act as a single lens flare reflection in a LensFlare.
 
Method Summary
 void read(JMEImporter e)
           
 void setOffset(float amountX, float amountY)
          Set the offset of this FlareQuad from the center point of the screen using a ratio where 1.0f (100%) = the position of the light source (or screen position of the worldTranslation of the LensFlare.) A negative value for x or y flips it across the axis from the light position.
 void updatePosition(Vector3f flarePoint, Vector2f midPoint)
          Updates worldTranslation of this FlareQuad.
 void write(JMEExporter e)
           
 
Methods inherited from class com.jme.scene.shape.Quad
getCenter, getHeight, getWidth, initialize, resize
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, hasCollision, hasTriangleCollision, randomPointOnTriangles, reconstruct, setIndexBuffer, setMode, setTriangleQuantity
 
Methods inherited from class com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, clearTextureBuffers, 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, getClassTag, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, 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, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateWorldData, updateWorldVectors, updateWorldVectors, worldToLocal
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Constructor Detail

FlareQuad

public FlareQuad()

FlareQuad

public FlareQuad(String name,
                 float width,
                 float height)
Creates a new Quad to act as a single lens flare reflection in a LensFlare. The width and height of the quad are in ortho terms.

Parameters:
name - String
width - float
height - float
Method Detail

setOffset

public void setOffset(float amountX,
                      float amountY)
Set the offset of this FlareQuad from the center point of the screen using a ratio where 1.0f (100%) = the position of the light source (or screen position of the worldTranslation of the LensFlare.) A negative value for x or y flips it across the axis from the light position.

Parameters:
amountX - float
amountY - float

updatePosition

public void updatePosition(Vector3f flarePoint,
                           Vector2f midPoint)
Updates worldTranslation of this FlareQuad. Called by LensFlare during it's updateWorldData method.

Parameters:
flarePoint - Vector3f
midPoint - Vector2f

write

public void write(JMEExporter e)
           throws IOException
Specified by:
write in interface Savable
Overrides:
write in class TriMesh
Throws:
IOException

read

public void read(JMEImporter e)
          throws IOException
Specified by:
read in interface Savable
Overrides:
read in class TriMesh
Throws:
IOException