Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.geom
Class Cone

java.lang.Object
  extended by org.j3d.aviatrix3d.SceneGraphObject
      extended by org.j3d.aviatrix3d.Node
          extended by org.j3d.aviatrix3d.Leaf
              extended by org.j3d.aviatrix3d.Shape3D
                  extended by org.j3d.renderer.aviatrix3d.geom.Cone
All Implemented Interfaces:
java.lang.Comparable, NodeUpdateListener, PickableObject, PickTarget, SinglePickTarget, Cullable, LeafCullable, ObjectRenderable, Renderable, ShapeRenderable

public class Cone
extends Shape3D
implements NodeUpdateListener

A simple cone that uses triangles.

As we assume you may want to use this as a collidable object, we store the GeometryData instance that is used to create the object in the userData of the underlying TriangleArray. The geometry does not have texture coordinates set.

Version:
$Revision: 1.4 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.Node
bounds, implicitBounds, INVALID_BOUNDS, parent
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler
 
Fields inherited from interface org.j3d.aviatrix3d.picking.PickableObject
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT
 
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.rendering.LeafCullable
AUDIO_CULLABLE, CLIP_CULLABLE, FOG_CULLABLE, GEOMETRY_CULLABLE, LIGHT_CULLABLE, OVERRIDE_CULLABLE
 
Constructor Summary
Cone()
          Construct a default cone with no appearance set.
Cone(Appearance app)
          Construct a default cone with the given appearance.
Cone(float height, float radius)
          Construct a default cone with no appearance set.
Cone(float height, float radius, Appearance app)
          Construct a default cone with the given appearance.
Cone(float height, float radius, int faces, Appearance app)
          Construct a cone with all the values customisable
Cone(int faces)
          Construct a default cone with no appearance set and a custom number of faces.
Cone(int faces, Appearance app)
          Construct a default cone with the given appearance and a custom number of faces.
 
Method Summary
 void setDimensions(float height, float radius)
          Change the radius and height of the cone to the new values.
 void setFacetCount(int faces)
          Set the facet count of the cone to the new value.
 void updateNodeBoundsChanges(java.lang.Object src)
          Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.
 void updateNodeDataChanges(java.lang.Object src)
          Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.
 
Methods inherited from class org.j3d.aviatrix3d.Shape3D
checkForCyclicChild, checkPickMask, compareTo, compareTo, equals, equals, getAppearance, getAppearanceRenderable, getCenter, getCullableType, getGeometry, getGeometryRenderable, getPickableBounds, getPickableChild, getPickMask, getPickTargetType, getRenderable, is2D, isVisible, pickBatch, pickSingle, postRender, recomputeBounds, render, requestBoundsUpdate, setAppearance, setGeometry, setLive, setPickMask, setUpdateHandler, updateBounds
 
Methods inherited from class org.j3d.aviatrix3d.Node
boundsChanged, checkForCyclicParent, getBounds, getParent, markBoundsDirty, removeParent, setBounds, 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.LeafCullable
getBounds
 

Constructor Detail

Cone

public Cone()
Construct a default cone with no appearance set. The default size of the cone is:
Height: 2.0
Radius: 1.0
Faces: 16


Cone

public Cone(Appearance app)
Construct a default cone with the given appearance. The default size of the cone is:
Height: 2.0
Radius: 1.0
Faces: 16

Parameters:
app - The appearance to use

Cone

public Cone(int faces)
Construct a default cone with no appearance set and a custom number of faces.
Height: 2.0
Radius: 1.0

Parameters:
faces - The number of faces to use around the side

Cone

public Cone(float height,
            float radius)
Construct a default cone with no appearance set. The height and radius as set to the new value and uses the default face count of 16.

Parameters:
height - The height of the cone
radius - The radius of the base of the cone

Cone

public Cone(int faces,
            Appearance app)
Construct a default cone with the given appearance and a custom number of faces.
Height: 2.0
Radius: 1.0

Parameters:
faces - The number of faces to use around the side
app - The appearance to use

Cone

public Cone(float height,
            float radius,
            Appearance app)
Construct a default cone with the given appearance. The height and radius as set to the new value and uses the default face count of 16.

Parameters:
height - The height of the cone
radius - The radius of the base of the cone
app - The appearance to use

Cone

public Cone(float height,
            float radius,
            int faces,
            Appearance app)
Construct a cone with all the values customisable

Parameters:
height - The height of the cone
radius - The radius of the base of the cone
faces - The number of faces to use around the side
app - The appearance to use
Method Detail

updateNodeBoundsChanges

public void updateNodeBoundsChanges(java.lang.Object src)
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.

Specified by:
updateNodeBoundsChanges in interface NodeUpdateListener
Parameters:
src - The node or Node Component that is to be updated.

updateNodeDataChanges

public void updateNodeDataChanges(java.lang.Object src)
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.

Specified by:
updateNodeDataChanges in interface NodeUpdateListener
Parameters:
src - The node or Node Component that is to be updated.

setDimensions

public void setDimensions(float height,
                          float radius)
Change the radius and height of the cone to the new values. If the geometry write capability has been turned off, this will not do anything.

Parameters:
height - The height of the cone
radius - The radius of the base of the cone

setFacetCount

public void setFacetCount(int faces)
Set the facet count of the cone to the new value. If the geometry write capability has been turned off, this will not do anything.

Parameters:
faces - The number of faces to use around the side

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org