|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Node
com.jmex.effects.LensFlare
public class LensFlare
LensFlare
Lens flare effect for jME. Notice that currently, it
doesn't do occlusion culling.
The easiest way to use this class is to use the LensFlareFactory to create
your LensFlare and then attach it as a child to a lightnode. Optionally you
can make it a child or a sibling of an object you wish to have a 'glint' on.
In the case of sibling, use
setLocalTranslation(sibling.getLocalTranslation()) or something similar to
ensure position.
Only FlareQuad objects are acceptable as children.
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 | |
---|---|
LensFlare()
|
|
LensFlare(java.lang.String name)
Creates a new LensFlare node without FlareQuad children. |
Method Summary | |
---|---|
int |
attachChild(Spatial spat)
Calls Node's attachChild after ensuring child is a FlareQuad. |
void |
draw(Renderer r)
draw calls the onDraw method for each child maintained by
this node. |
float |
getIntensity()
Query intensity of the flares. |
Vector2f |
getMidPoint()
Get the flare's reference midpoint, usually the center of the screen. |
Node |
getRootNode()
getter for field rootNode |
void |
onDraw(Renderer r)
onDraw checks the node with the camera to see if it should
be culled, if not, the node's draw method is called. |
void |
read(JMEImporter e)
|
void |
setIntensity(float value)
Set intensity of the flare. |
void |
setMidPoint(Vector2f midPoint)
Set the flare's reference midpoint, the center of the screen by default. |
void |
setRootNode(Node value)
setter for field rootNode |
void |
setTriangleAccurateOcclusion(boolean use)
|
boolean |
useTriangleAccurateOcclusion()
|
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.Node |
---|
applyRenderState, attachChildAt, childChange, detachAllChildren, detachChild, detachChildAt, detachChildNamed, findCollisions, findPick, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, hasCollision, lockBounds, lockMeshes, lockShadows, lockTransforms, setModelBound, sortLights, swapChildren, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldBound, updateWorldData, updateWorldVectors |
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 |
---|
public LensFlare()
public LensFlare(java.lang.String name)
name
- The name of the node.Method Detail |
---|
public Vector2f getMidPoint()
public void setMidPoint(Vector2f midPoint)
midPoint
- Vector2fpublic float getIntensity()
setIntensity(float)
public void setIntensity(float value)
value
- new value between 0 and 1public void onDraw(Renderer r)
onDraw
checks the node with the camera to see if it should
be culled, if not, the node's draw method is called.
onDraw
in class Spatial
r
- the renderer used for display.public void draw(Renderer r)
draw
calls the onDraw method for each child maintained by
this node.
draw
in class Node
r
- the renderer to draw to.Spatial.draw(com.jme.renderer.Renderer)
public int attachChild(Spatial spat)
attachChild
in class Node
spat
- Spatial
Node.attachChild(Spatial)
public Node getRootNode()
public void setRootNode(Node value)
value
- new valuepublic void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class Node
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class Node
java.io.IOException
public boolean useTriangleAccurateOcclusion()
public void setTriangleAccurateOcclusion(boolean use)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |