Create a solid 3D torus. A torus is like a ring with a thickness. The torus is drawn parallel to the XY-plane of the coordinate system. The center of the torus is at coordinates 0,0,0.

syntaxSyntax:
new DlxTorus(innerRadius, outerRadius, style, startAngle=0, stopAngle=360, bClockWise=false, rings=18)

Parameters

Parameter Description
innerRadius The inner radius of the torus.
outerRadius The outer radius of the torus.
style A Dlx3DStyle object or the index of the style. There are 10 styles available with indexes from 0 to 9.
startAngle The angle, in degrees, of the arc start.
stopAngle The angle, in degrees, of the end of the arc.
bClockWise If true the arc is drawn clockwise otherwise the arc is drawn counterclockwise.
rings Number of subdivisions.

Example

  Copy codeCopy code
function OnBuild3DModel()
{
  var ctx = FWiz.Get3DModelCtx();
  var style = FWiz.Get3DStyle(0);
  style.SetStyle("gold");
  var obj = new DlxTorus(20, 60, style);
  ctx.Add(obj);
}

See also