Revision as of 16:04, 1 February 2006 by Abergstrom (Talk | contribs)

Jump to: navigation, search


CADAssembly : X3DGroupingNode, X3DProductStructureChildNode {
  MFNode   [in]     addChildren
  MFNode   [in]     removeChildren
  MFNode   [in,out] children       []       [X3DProductStructureChildNode]
  SFNode   [in,out] metadata       NULL     [X3DMetadataObject]
  Cone : X3DGeometryNode { 
  SFNode  [in,out] metadata     NULL [X3DMetadataObject]
  SFBool  []       bottom       TRUE
  SFFloat []       bottomRadius 1    (0,∞)
  SFFloat []       height       2    (0,∞)
  SFBool  []       side         TRUE
  SFBool  []       solid        TRUE

The Cone node specifies a cone which is centred in the local coordinate system and whose central axis is aligned with the local Y-axis. The bottomRadius field specifies the radius of the cone's base, and the height field specifies the height of the cone from the centre 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 = height/2 and its bottom at y = -height/2. Both bottomRadius and height shall be greater than zero. Figure 1 illustrates the Cone node.

Figure 1 - Cone node

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 or eligible for collision or sensor intersection tests).

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 X=0 plane, from the apex (0, height/2, 0) to the point (0, -height/2, -bottomRadius). For the bottom cap, a circle is cut out of the texture square centred 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 (see 18.4.8 TextureTransform).

The solid field determines whether the cone is visible when viewed from the inside. The Common geometry fields section of the X3D specification provides a complete description of the solid field.