Class dnx.lr.node.CylinderNode
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.lr.node.CylinderNode

java.lang.Object
   |
   +----dnx.util.DNXObject
           |
           +----dnx.lr.Node
                   |
                   +----dnx.lr.SubsidiaryNode
                           |
                           +----dnx.lr.GeometryNode
                                   |
                                   +----dnx.lr.node.CylinderNode

public class CylinderNode
extends GeometryNode
implements ModelSource
 Cylinder {
    field        SFBool       bottom          TRUE
    field        SFFloat      height          2
    field        SFFloat      radius          1
    field        SFBool       side            TRUE
    field        SFBool       top             TRUE
 }

The Cylinder node specifies a capped cylinder centered at (0,0,0) in the local coordinate system and with a central axis oriented along the local Y-axis. By default, the cylinder is sized at -1 to +1 in all three dimensions. The radius field specifies the cylinder's radius and the height field specifies the cylinder's height along the central axis. Both radius and height must be greater than 0.0.

The cylinder has three parts: the side, the top (Y = +height) and the bottom (Y = -height). Each part has an associated SFBool field that indicates whether the part exists (TRUE) or does not exist (FALSE). If the parts do not exist, the they are not considered during collision detection.

When a texture is applied to a cylinder, it is applied differently to the sides, top, and bottom. On the sides, the texture wraps counterclockwise (from above) starting at the back of the cylinder. The texture has a vertical seam at the back, intersecting the YZ plane. For the top and bottom caps, a circle is cut out of the unit texture square centered at (0, +/- height, 0) with dimensions 2*radius by 2*radius. The top texture appears right side up when the top of the cylinder is tilted toward the +Z axis, and the bottom texture appears right side up when the top of the cylinder is tilted toward the -Z axis. TextureTransform affects the texture coordinates of the Cylinder.

The Cylinder geometry is considered to be solid and thus requires outside faces only. When viewed from the inside the results are undefined.


Variable Index

 o bottom
 o height
 o radius
 o side
 o top

Constructor Index

 o CylinderNode()

Method Index

 o boundingBoxHasChanged(Field)
Meant to be overridden by subclasses.
 o createNodeDefinition(NodeDefinition)
Create the node definition.
 o initFields()
Initialize field values.
 o pick(PickTraversal, PickDetail)
 o recomputeBoundingBox(BoundingBox3)
Meant to be overridden by subclasses; compute the bounding box and store into the argument.
 o sendModelData(Model)

Variables

 o bottom
  public SFBool bottom
 o height
  public SFFloat height
 o radius
  public SFFloat radius
 o side
  public SFBool side
 o top
  public SFBool top

Constructors

 o CylinderNode
  public CylinderNode()

Methods

 o createNodeDefinition
  protected void createNodeDefinition(NodeDefinition def)
Create the node definition.
Overrides:
createNodeDefinition in class Node
 o initFields
  protected void initFields()
Initialize field values.
Overrides:
initFields in class Node
 o sendModelData
  public int sendModelData(Model model)
Overrides:
sendModelData in class GeometryNode
 o pick
  public boolean pick(PickTraversal traversal,
                      PickDetail detail)
Overrides:
pick in class GeometryNode
 o recomputeBoundingBox
  public void recomputeBoundingBox(BoundingBox3 box)
Meant to be overridden by subclasses; compute the bounding box and store into the argument.
Overrides:
recomputeBoundingBox in class Node
 o boundingBoxHasChanged
  protected boolean boundingBoxHasChanged(Field f)
Meant to be overridden by subclasses.
Overrides:
boundingBoxHasChanged in class Node

All Packages  Class Hierarchy  This Package  Previous  Next  Index