Create a rectangular fence.
Syntax: |
---|
DlxFence.Box(rect, zMin, height, bBrightinside) DlxFence.Box(center, width, length, zMin, height, bBrightinside) DlxFence.Box(left, bottom, right, top, zMin, height, bBrightinside) |
Parameters
Parameter | Description |
---|---|
rect | A DlxRect object that specify the rectangle. |
center | A DlxPoint object with coordinates specifying the center of the rectangle. |
width | A positive value that defines the width of the rectangle. |
length | A positive value that defines the length of the rectangle. |
left | Specifies the left position of rectangle. |
bottom | Specifies the bottom of rectangle. |
right | Specifies the right position of rectangle. |
top | Specifies the top of rectangle. |
zMin | Value of the Z coordinate of extrusion start. |
height | Height of the extruded surface. |
bBrightinside | Specify true if the bright face is the inner face. |
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 obj = new DlxFence(style);
obj.Box(-10, -5, 10, 5, -5, 10, false);
ctx.Add(obj);
}
|