Defines a portion of the solid with a different style.
Syntax: |
DlxRevolve.AddRing(style, minL, maxL)
|
Parameters
Parameter |
Description |
style |
A Dlx3DStyle object or the index of the style. There are 10 styles available with indexes from 0 to 9. |
minL |
Lower end, lengthwise, of the portion of the solid to which the style is to be applied. |
maxL |
Upper extreme, lengthwise, of the portion of the solid to which the style is to be applied. |
Return Value
If the operation ends correctly it returns true otherwise it returns false.
Example
|
Copy code
|
function OnBuild3DModel()
{
var ctx = FWiz.Get3DModelCtx();
var style = FWiz.Get3DStyle(0);
style.SetStyle("gold");
var style1 = FWiz.Get3DStyle(1);
style1.SetStyle("jade");
var obj = new DlxRevolve(style);
obj.AddRing(style1, 1, 2);
obj.Cylinder(5, 10);
ctx.Add(obj);
}
|
See also