All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.Billboard

java.lang.Object
   |
   +----java.media.j3d.SceneGraphObject
           |
           +----java.media.j3d.Node
                   |
                   +----java.media.j3d.Leaf
                           |
                           +----java.media.j3d.Behavior
                                   |
                                   +----java.media.j3d.Billboard

public class Billboard
extends Behavior
The Billboard behavior node operates on a TransformGroup node to specify a transform that always aligns itself perpendicular to an axis as specified in world-coordinates or to a viewer's view vector---regardless, in either case, of transforms above the specified transform node in the scene graph. Billboard nodes provide the most benefit for complex, roughly-symmetric objects. A typical use might consist of a quadrilateral that contains a texture of a tree.


Variable Index

 o ROTATE_ABOUT_AXIS
Specifies that rotation should be about the specified axis.
 o ROTATE_ABOUT_POINT
Specifies that rotation should be about the specified point and that the children's Y-axis should match the view object's Y-axis.

Constructor Index

 o Billboard()
Constructs a Billboard node with default parameters.
 o Billboard(TransformGroup)
Constructs a Billboard node with default parameters that operates on the specified TransformGroup node.
 o Billboard(TransformGroup, int, Vector3f)
Constructs a Billboard node with the specified axis and mode that operates on the specified TransformGroup node.

Method Index

 o getAlignmentAxis(Vector3f)
Gets the alignment axis and sets the parameter to this value
 o getAlignmentMode()
Gets the alignment mode.
 o initialize()
Initialize method that sets up initial wakeup criteria.
 o processStimulus(Enumeration)
Process stimulus method that computes appropriate level of detail.
 o setAlignmentAxis(float, float, float)
Sets the alignment axis.
 o setAlignmentAxis(Vector3f)
Sets the alignment axis.
 o setAlignmentMode(int)
Sets the alignment mode.

Variables

 o ROTATE_ABOUT_AXIS
 public static final int ROTATE_ABOUT_AXIS
Specifies that rotation should be about the specified axis.

 o ROTATE_ABOUT_POINT
 public static final int ROTATE_ABOUT_POINT
Specifies that rotation should be about the specified point and that the children's Y-axis should match the view object's Y-axis.

Constructors

 o Billboard
 public Billboard()
Constructs a Billboard node with default parameters. The default alignment mode is ROTATE_ABOUT_AXIS rotation with the axis pointing along the Y axis. The TransformGroup node is null.

 o Billboard
 public Billboard(TransformGroup tg)
Constructs a Billboard node with default parameters that operates on the specified TransformGroup node. The default alignment mode is ROTATE_ABOUT_AXIS rotation with the axis pointing along the Y axis.

Parameters:
tg - the TransformGroup node that this Billboard node operates upon
 o Billboard
 public Billboard(TransformGroup tg,
                  int mode,
                  Vector3f axis)
Constructs a Billboard node with the specified axis and mode that operates on the specified TransformGroup node.

Parameters:
tg - the TransformGroup node that this Billboard node operates upon
mode - alignment mode, one of ROTATE_AXIS or ROTATE_ABOUT_POINT
axis - the ray about which the billboard rotates

Methods

 o setAlignmentMode
 public final void setAlignmentMode(int mode)
Sets the alignment mode.

Parameters:
mode - one of: ROTATE_ABOUT_AXIS or ROTATE_ABOUT_POINT
 o getAlignmentMode
 public final int getAlignmentMode()
Gets the alignment mode.

Returns:
one of: ROTATE_ABOUT_AXIS or ROTATE_ABOUT_POINT
 o setAlignmentAxis
 public final void setAlignmentAxis(Vector3f axis)
Sets the alignment axis.

Parameters:
axis - the ray about which the billboard rotates
 o setAlignmentAxis
 public final void setAlignmentAxis(float x,
                                    float y,
                                    float z)
Sets the alignment axis.

Parameters:
x - the x component of the ray about which the billboard rotates
y - the y component of the ray about which the billboard rotates
z - the z component of the ray about which the billboard rotates
 o getAlignmentAxis
 public final void getAlignmentAxis(Vector3f axis)
Gets the alignment axis and sets the parameter to this value

Parameters:
axis - the vector that will contain the ray about which the billboard rotates
 o initialize
 public void initialize()
Initialize method that sets up initial wakeup criteria.

Overrides:
initialize in class Behavior
 o processStimulus
 public void processStimulus(Enumeration criteria)
Process stimulus method that computes appropriate level of detail.

Parameters:
criteria - an enumeration of the criteria that caused the stimulus
Overrides:
processStimulus in class Behavior

All Packages  Class Hierarchy  This Package  Previous  Next  Index