|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.SceneGraphObject org.j3d.aviatrix3d.Node org.j3d.aviatrix3d.BaseNode org.j3d.aviatrix3d.BaseGroup org.j3d.renderer.aviatrix3d.nodes.Billboard
public class Billboard
A class that automatically orients its children towards the camera location.
This class is design to operate in a shared scene graph structure. It works with the Cullable interface to make sure that regardless of the traversal path, it will have the children pointing towards the camera location. This makes it safe to share between layers as well as normal scene graph usage. Correctness is ensured regardless of culling traversal.
Bounds of this object is represented as a spherical object that is based on the largest dimension of all the children combined.
In order to use this node effectively, you will need to use the
FrustumCullStage
to process the
children. It uses custom culling routines internally and that is the only cull
stage that will do something useful with ths node.
Field Summary |
---|
Fields inherited from class org.j3d.aviatrix3d.BaseGroup |
---|
childList, dirtyBoundsCount, lastChild |
Fields inherited from class org.j3d.aviatrix3d.Node |
---|
bounds, implicitBounds, parent |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickTarget |
---|
CUSTOM_PICK_TYPE, GROUP_PICK_TYPE, LEAF_PICK_TYPE, SINGLE_PICK_TYPE |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickableObject |
---|
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
Constructor Summary | |
---|---|
Billboard()
Construct a default billboard that uses point mode for the default axis. |
|
Billboard(boolean pointMode)
Create a new billboard with the option of rotating around a point in space or any nominal axis. |
Method Summary | |
---|---|
boolean |
checkPickMask(int mask)
Check the given pick mask against the node's internal pick mask representation. |
void |
cullChildren(CullInstructions output,
javax.vecmath.Matrix4f vworldTx,
javax.vecmath.Matrix4f viewTransform,
javax.vecmath.Vector4f[] frustumPlanes,
float angularRes)
Check this node for children to traverse. |
void |
getAxisOfRotation(float[] axis)
Fetch the currently set axis of rotation. |
BoundingVolume |
getPickableBounds()
Get the bounds of this picking target so that testing can be performed on the object. |
int |
getPickMask()
Get the current pickable state mask of this object. |
int |
getPickTargetType()
Return the type constant that represents the type of pick target this is. |
boolean |
isPointMode()
Check to see whether this billboard is operating as a point in space or along an axis. |
void |
pickBatch(PickRequest[] reqs,
int numRequests)
Check for all intersections against this geometry and it's children to see if there is an intersection with the given set of requests. |
void |
pickChildren(PickInstructions output,
javax.vecmath.Matrix4f vworldTx,
PickRequest req)
This node is being subjected to picking, so process the provided data and return the instructions on the list of available children and any transformation information to the system. |
void |
pickSingle(PickRequest req)
Check for all intersections against this geometry and it's children to see if there is an intersection with the given set of requests. |
protected void |
recomputeBounds()
Implementation of recompute bounds. |
void |
setAxisOfRotation(float[] axis)
Set the axis of rotation used when the billboard is not operating in point mode. |
void |
setPickMask(int state)
Set the node as being pickable currently using the given bit mask. |
Methods inherited from class org.j3d.aviatrix3d.BaseGroup |
---|
addChild, checkForCyclicChild, getAllChildren, getChild, indexOfChild, markBoundsDirty, numChildren, removeAllChildren, removeChild, removeChild, requestBoundsUpdate, setBounds, setChild, setLive, setUpdateHandler, updateBounds |
Methods inherited from class org.j3d.aviatrix3d.BaseNode |
---|
checkForCyclicChild, checkForCyclicParent, clearUpdateHandler, removeParent, setLive, setParent, setUpdateHandler |
Methods inherited from class org.j3d.aviatrix3d.Node |
---|
boundsChanged, checkForCyclicParent, getBounds, getParent, removeParent, setParent, updateParentBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Billboard()
public Billboard(boolean pointMode)
pointMode
- true if this should be rotating around a point in spaceMethod Detail |
---|
public void cullChildren(CullInstructions output, javax.vecmath.Matrix4f vworldTx, javax.vecmath.Matrix4f viewTransform, javax.vecmath.Vector4f[] frustumPlanes, float angularRes)
cullChildren
in interface CustomCullable
output
- Fill in the child information herevworldTx
- The transformation from the root of the scene to
this node according to the current traversal pathviewTransform
- The transformation from the root of the scene
graph to the active viewpointfrustumPlanes
- Listing of frustum planes in the order: right,
left, bottom, top, far, nearangularRes
- Angular resolution of the screen, or 0 if not
calculable from the available data.public void pickChildren(PickInstructions output, javax.vecmath.Matrix4f vworldTx, PickRequest req)
pickChildren
in interface CustomPickTarget
output
- Fill in the picking results herevworldTx
- The transformation from the root of the scene to this node
according to the current traversal pathreq
- The details of the picking request that are to be processedpublic boolean checkPickMask(int mask)
checkPickMask
in interface PickTarget
mask
- The bit mask to check against
public BoundingVolume getPickableBounds()
getPickableBounds
in interface PickTarget
public int getPickTargetType()
getPickTargetType
in interface PickTarget
public void setPickMask(int state)
setPickMask
in interface PickableObject
state
- A bit mask of available options to pick forpublic int getPickMask()
getPickMask
in interface PickableObject
public void pickBatch(PickRequest[] reqs, int numRequests) throws NotPickableException, InvalidPickTimingException
pickBatch
in interface PickableObject
reqs
- The list of picks to be made, starting at this objectnumRequests
- The number of valid pick requests to process
NotPickableException
- This object has been marked as non pickable,
but you decided to try to call the method anyway
InvalidPickTimingException
- An attempt was made to pick outside
of the ApplicationUpdateObserver callback methodpublic void pickSingle(PickRequest req) throws NotPickableException, InvalidPickTimingException
pickSingle
in interface PickableObject
req
- The details of the pick to be made
NotPickableException
- This object has been marked as non pickable,
but you decided to try to call the method anyway
InvalidPickTimingException
- An attempt was made to pick outside
of the ApplicationUpdateObserver callback methodprotected void recomputeBounds()
recomputeBounds
in class BaseGroup
public boolean isPointMode()
public void setAxisOfRotation(float[] axis)
axis
- An array containing the 3 axis coordinatespublic void getAxisOfRotation(float[] axis)
axis
- An array of at least length 3 to copy the rotation axis into
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |