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

Class dnx.lr.node.ConeNode

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

public class ConeNode
extends GeometryNode
implements ModelSource
 Cone {
    field        SFFloat      bottomRadius    1
    field        SFFloat      height          2
    field        SFBool       side            TRUE
    field        SFBool       bottom          TRUE
 }

The Cone node specifies a cone which is centered in the local coordinate system and whose central axis is aligned with the local Y-axis. The bottonRadius field specifies the radius of the cone's base, and the height field specifies the height of the cone from the center of the base to the apex. By default, the cone has a radius of 1.0 at the bottom and a height of 2.0, with its apex at y=1 and its bottom at y=-1. Both bottomRadius and height must be greater than 0.0.

The side field specifies whether sides of the cone are created, and the bottom field specifies whether the bottom cap of the cone is created. A value of TRUE specifies that this part of the cone exists, while a value of FALSE specifies that this part does not exist (not rendered). Parts with field values of FALSE are not collided with during collision detection.

When a texture is applied to the sides of the cone, the texture wraps counterclockwise (from above) starting at the back of the cone. The texture has a vertical seam at the back in the YZ plane, from the apex (0, height/2, 0) to the point (0, 0, -r). For the bottom cap, a circle is cut out of the unit texture square centered at (0, -height/2, 0) with dimensions (2 * bottomRadius) by (2 * bottomRadius). The bottom cap texture appears right side up when the top of the cone is rotated towards the -Z axis. TextureTransform affects the texture coordinates of the Cone.

The Cone 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 bottomRadius
 o height
 o side

Constructor Index

 o ConeNode()

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 bottomRadius
  public SFFloat bottomRadius
 o height
  public SFFloat height
 o side
  public SFBool side
 o bottom
  public SFBool bottom

Constructors

 o ConeNode
  public ConeNode()

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