|
||||||||||
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.BillboardNode
public class BillboardNode
BillboardNode
defines a node that always orients towards the
camera. However, it does not tilt up/down as the camera rises. This keep
geometry from appearing to fall over if the camera rises or lowers.
BillboardNode
is useful to contain a single quad that has a
image applied to it for lowest detail models. This quad, with the texture,
will appear to be a full model at great distances, and save on rendering and
memory. It is important to note that for AXIAL mode, the billboards
orientation will always be up (0,1,0). This means that a "standard" jME
camera with up (0,1,0) is the only camera setting compatible with AXIAL mode.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary | |
---|---|
static int |
AXIAL
Alligns this Billboard Node to the screen, but keeps the Y axis fixed. |
static int |
AXIAL_Y
|
static int |
AXIAL_Z
Alligns this Billboard Node to the screen, but keeps the Z axis fixed. |
static int |
CAMERA_ALIGNED
Alligns this Billboard Node to the camera position. |
static int |
SCREEN_ALIGNED
Alligns this Billboard Node to the screen. |
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 | |
---|---|
BillboardNode()
|
|
BillboardNode(java.lang.String name)
Constructor instantiates a new BillboardNode . |
Method Summary | |
---|---|
void |
draw(Renderer r)
draw updates the billboards orientation then renders the
billboard's children. |
int |
getAlignment()
Returns the alignment this BillboardNode is set too. |
void |
read(JMEImporter e)
|
void |
rotateBillboard(Camera cam)
rotate the billboard based on the type set |
void |
setAlignment(int alignment)
Sets the type of rotation this BillboardNode will have. |
void |
updateWorldData(float time)
updateWorldData defers the updating of the billboards
orientation until rendering. |
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.Node |
---|
applyRenderState, attachChild, 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, 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 |
---|
public static final int SCREEN_ALIGNED
public static final int AXIAL
public static final int AXIAL_Y
public static final int CAMERA_ALIGNED
public static final int AXIAL_Z
Constructor Detail |
---|
public BillboardNode()
public BillboardNode(java.lang.String name)
BillboardNode
. The name of
the node is supplied during construction.
name
- the name of the node.Method Detail |
---|
public void updateWorldData(float time)
updateWorldData
defers the updating of the billboards
orientation until rendering. This keeps the billboard from being
needlessly oriented if the player can not actually see it.
updateWorldData
in class Node
time
- the time between frames.Spatial.updateWorldData(float)
public void draw(Renderer r)
draw
updates the billboards orientation then renders the
billboard's children.
draw
in class Node
r
- the renderer used to draw.Spatial.draw(com.jme.renderer.Renderer)
public void rotateBillboard(Camera cam)
cam
- Camerapublic int getAlignment()
public void setAlignment(int alignment)
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 |