LavishNav:Box (Region Type)
From Lavish Software Wiki
Contents |
[edit]
Introduction
[edit]
What is a Box?
A box is a rectangle with a given size in 3 dimensions.
[edit]
Box Behaviors
[edit]
Containment
A box contains a given point if the point is within the bounds of the defined box.
[edit]
Nearest Point
If the box contains the given point, the nearest point will be that point. Otherwise, the nearest point within this region to a given point will be a point on the edge of the box that is closest to the given point in 3 dimensions.
[edit]
Center Point
The center point within this region is halfway between X1 and X2, Y1 and Y2 and Z1 and Z2.
[edit]
Box Characteristics
Boxes are descendants of the base region type. Any characteristics of the base region type may be applied in addition to the rect-specific characteristics described below.
[edit]
Box-Specific Properties
- X1
- X1-coordinate. Defaults to 0.
- X2
- X2-coordinate. Defaults to 0.
- Y1
- Y1-coordinate. Defaults to 0.
- Y2
- Y2-coordinate. Defaults to 0.
- Z1
- Z1-coordinate. Defaults to 0.
- Z2
- Z2-coordinate. Defaults to 0.
[edit]
Programming with boxes
- LavishScript
- lnavbox Object Type
- .NET
- Box class
[edit]
Examples
[edit]
Example AddChild
; This code creates a box region with end points 1,2,3 and 4,5,6. It also uses automatic name generation. LavishNav.Tree:AddChild[box,"auto",1,4,2,5,3,6]
[edit]
Example XML code
<Box Name="Boxtacular"> <X1>1</X1> <X2>2</X2> <Y1>1</Y1> <Y2>2</Y2> <Z1>1</Z1> <Z2>2</Z2> </Box>
[edit]
