com.jme.effects
Class FlareQuad

java.lang.Object
  extended bycom.jme.scene.Spatial
      extended bycom.jme.scene.Geometry
          extended bycom.jme.scene.TriMesh
              extended bycom.jme.scene.shape.Quad
                  extended bycom.jme.effects.FlareQuad
All Implemented Interfaces:
java.io.Serializable

public class FlareQuad
extends Quad

FlareQuad represents a single light reflection in a LensFlare object.

Version:
$Id: FlareQuad.java,v 1.2 2004/12/10 19:27:14 mojomonkey Exp $
Author:
Joshua Slack
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jme.scene.TriMesh
indices, triangleQuantity
 
Fields inherited from class com.jme.scene.Geometry
bound, color, colorBuf, normal, normBuf, texBuf, texture, vertBuf, vertex, vertQuantity
 
Fields inherited from class com.jme.scene.Spatial
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
FlareQuad(java.lang.String name, float width, float height)
          Creates a new Quad to act as a single lens flare reflection in a LensFlare.
 
Method Summary
 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.
 
Methods inherited from class com.jme.scene.shape.Quad
getCenter, initialize, resize
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, drawBounds, findCollisions, findTriangleCollision, findTrianglePick, findWorldRotMat, getIndexAsBuffer, getIndices, getMeshAsTriangles, getTriangle, getTriangle, getTriangleQuantity, hasCollision, hasTriangleCollision, putClone, reconstruct, setIndexBuffer, setIndices, updateCollisionTree, updateIndexBuffer
 
Methods inherited from class com.jme.scene.Geometry
applyRenderState, applyStates, copyTextureCoords, findPick, getAllTextures, getCloneID, getColorAsFloatBuffer, getColors, getModelBound, getNormalAsFloatBuffer, getNormals, getNumberOfUnits, getTextureAsFloatBuffer, getTextureAsFloatBuffer, getTextures, getTextures, getVBOColorID, getVBONormalID, getVBOTextureID, getVBOVertexID, getVerticeAsFloatBuffer, getVertices, getVertQuantity, isVBOColorEnabled, isVBONormalEnabled, isVBOTextureEnabled, isVBOVertexEnabled, randomVertice, reconstruct, setAllTextures, setColor, setColors, setFloatBuffer, setForceView, setModelBound, setNormal, setNormalBuffer, setNormals, setRandomColors, setSolidColor, setTexture, setTexture, setTextureBuffer, setTextureCoord, setTextures, setTextures, setVBOColorEnabled, setVBOColorID, setVBONormalEnabled, setVBONormalID, setVBOTextureEnabled, setVBOTextureID, setVBOVertexEnabled, setVBOVertexID, setVertex, setVertexBuffer, setVertices, updateColorBuffer, updateColorBuffer, updateModelBound, updateNormalBuffer, updateNormalBuffer, updateTextureBuffer, updateTextureBuffer, updateTextureBuffer, updateVertexBuffer, updateVertexBuffer, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, isForceCulled, isForceView, onDraw, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setWorldBound, setZOrder, toString, updateGeometricState, updateRenderState, updateRenderState, updateWorldData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlareQuad

public FlareQuad(java.lang.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