Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _menu_load_objects() (line 579 of /home/drbiz/public/tools.realism.com/includes/menu.inc).

Revision of Torus from Thu, 10/22/2015 - 10:04

A new geometric primative that is the torus. See description in Fraunhofer's X3DOM documentation.

Torus : X3DGeometryNode { 
  SFNode  [in,out] metadata            NULL    [X3DMetadataObject]
  SFFloat [in,out] angle               2*pi    [-2*pi,2*pi]
  SFBool  [in,out] caps                TRUE
  SFBool  [in,out] ccw                 TRUE
  SFFloat [in,out] innerRadius         0.5     [0,+inf)
  SFFloat [in,out] insideOutsideRadius FALSE
  SFBool  [in,out] lit                 TRUE
  SFVec2F [in,out] outerRadius         1.0     [0,+inf)
  SFBool  [in,out] solid               TRUE
  SFVec2f []       subdivision         24,24
  SFBool  [in,out] useGeoCache         TRUE
}

The Torus node creates geometry of the same name. The torus is a figure created by rotating a circle about a line external to the circle. The diameter of the circle is given by outerRadius-innerRadius. The line of rotation is innerRadius away from the perimeter of the circle. The circle is defined in the X-Y plane, and the line of rotation is the Y-axis.

angle is the angle from the initial position (in the +X-Y plane.that the circle is rotated through. Positive values rotate the circle counter-clockwise looking towards the -Y axis. If |angle| is not 2*pi, then caps determine if geometry is created for the end of the partial torus.

The resolution of the geometry is specified by subdivision. This field determines the number of faces around the outside perimeter and the rotated circle, respectively.

The insideOutsideRadius is tbd.

The geometry is displayed according the ccw, solid, and lit fields. These define the ordering of vertext coordinates of the external geometry with respot to the user-provided or automatically generated normal vectors (ccw); back-face culling (solid), and whether the external geometry is rendered with (TRUE) or without (FALSE) lighting.

The metadata field is the standard parent for node metadata.

Most geospatial primitives use a geo-chache. The useGeoCache field allows the developer to disable the cache for the created geometry.