|
||||||||||
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.jme.scene.ImposterNode
public class ImposterNode
ImposterNode
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary | |
---|---|
protected boolean |
byCamera
|
protected boolean |
byTime
|
protected float |
cameraDistance
|
protected float |
cameraThreshold
|
protected float |
elapsed
|
protected boolean |
haveDrawn
|
(package private) static int |
inode_val
|
protected float |
lastAngle
|
protected float |
oldAngle
|
protected Node |
quadScene
|
protected float |
redrawRate
|
protected Quad |
standIn
|
protected Texture2D |
texture
|
protected TextureRenderer |
tRenderer
|
protected Vector3f |
worldUpVector
|
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 | |
---|---|
ImposterNode()
|
|
ImposterNode(java.lang.String name,
float size,
int twidth,
int theight)
|
Method Summary | |
---|---|
int |
attachChild(Spatial child)
attachChild attaches a child to this node. |
void |
draw(Renderer r)
draw calls the onDraw method for each child maintained by
this node. |
float |
getCameraDistance()
Get the distance we want the render camera to stay away from the render scene. |
float |
getCameraThreshold()
Get the camera threshold (see setCameraThreshold() ) |
float |
getRedrawRate()
Get how often (in seconds) we want the texture updated. |
Quad |
getStandIn()
Get the Quad used as a standin for the scene being faked. |
TextureRenderer |
getTextureRenderer()
Get the Underlying texture renderer used by this imposter. |
Vector3f |
getWorldUpVector()
|
void |
read(JMEImporter e)
|
void |
renderTexture()
force the underlying texture renderer to render the scene. |
void |
resetTexture()
Resets and applies the texture, texture state and blend state on the standin Quad. |
void |
setCameraDistance(float cameraDistance)
Set the distance we want the render camera to stay away from the render scene. |
void |
setCameraThreshold(float threshold)
Set how much the viewers camera position has to change (in terms of angle to the imposter) before an update is called. |
void |
setRedrawRate(float rate)
Set the redraw rate (see getRedrawRate() ) |
void |
setTextureRenderer(TextureRenderer tRenderer)
Set the Underlying texture renderer used by this imposter. |
void |
setWorldUpVector(Vector3f worldUpVector)
|
void |
updateCamera(Vector3f eyeLocation)
Force the texture camera to update its position and direction based on the given eyeLocation |
void |
updateScene(float timePassed)
Updates the scene the texture represents. |
void |
updateWorldBound()
updateWorldBound merges the bounds of all the children
maintained by this node. |
void |
updateWorldData(float time)
updateWorldData updates the world transforms from the
parent down to the leaf. |
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, 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 |
Field Detail |
---|
protected TextureRenderer tRenderer
protected Texture2D texture
protected Node quadScene
static int inode_val
protected Quad standIn
protected float redrawRate
protected float elapsed
protected float cameraDistance
protected float cameraThreshold
protected float oldAngle
protected float lastAngle
protected boolean haveDrawn
protected boolean byCamera
protected boolean byTime
protected Vector3f worldUpVector
Constructor Detail |
---|
public ImposterNode()
public ImposterNode(java.lang.String name, float size, int twidth, int theight)
Method Detail |
---|
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 void updateCamera(Vector3f eyeLocation)
eyeLocation
- The location the viewer is looking from in the real world.public int attachChild(Spatial child)
attachChild
attaches a child to this node. This node
becomes the child's parent. The current number of children maintained is
returned.
attachChild
in class Node
child
- the child to attach to this node.
public void setTextureRenderer(TextureRenderer tRenderer)
tRenderer
- TextureRendererpublic TextureRenderer getTextureRenderer()
public float getCameraDistance()
public void setCameraDistance(float cameraDistance)
cameraDistance
- floatpublic float getRedrawRate()
public void setRedrawRate(float rate)
getRedrawRate()
)
rate
- floatpublic Quad getStandIn()
public void setCameraThreshold(float threshold)
threshold
- angle in radianspublic float getCameraThreshold()
setCameraThreshold()
)
public void resetTexture()
public void updateScene(float timePassed)
timePassed
- floatpublic void renderTexture()
public void updateWorldBound()
updateWorldBound
merges the bounds of all the children
maintained by this node. This will allow for faster culling operations.
updateWorldBound
in class Node
Spatial.updateWorldBound()
public void updateWorldData(float time)
updateWorldData
updates the world transforms from the
parent down to the leaf.
updateWorldData
in class Node
time
- the frame time.public Vector3f getWorldUpVector()
public void setWorldUpVector(Vector3f worldUpVector)
worldUpVector
- The worldUpVector to set.public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |