Create a solid 3D cone. The base of the cone is parallel to the XY plane of the coordinate system and has its center at coordinates 0,0,0. The height is perpendicular to the base and parallel to the Z-axis.

syntaxSyntax:
new DlxCone(radius, height, style, slices=0)

Parameters

Parameter Description
radius The cone radius.
height The height corresponds to the Z-axis.
style A Dlx3DStyle object or the index of the style. There are 10 styles available with indexes from 0 to 9.
slices Indicates the number of slices. Specify 0 for the default value.

Example

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

See also