Difference between revisions of "LavishNav:Rect (Region Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 28: Line 28:
 
== Examples ==
 
== Examples ==
 
===Example XML code===
 
===Example XML code===
 
+
<Rect Name="Rectacular">
 +
    <X1>1</X1>
 +
    <X2>2</X2>
 +
    <Y1>1</Y1>
 +
    <Y2>2</Y2>
 +
</Triangle>
  
 
== See Also ==
 
== See Also ==
 
* [[LavishNav]]
 
* [[LavishNav]]
 
[[Category:LavishNav]]
 
[[Category:LavishNav]]

Revision as of 07:44, 4 September 2006

Introduction

What is a Rect?

A rect is a rectangle with a given size in 2 dimensions (X and Y). The 3rd dimension (Z) is generally ignored.

Rect Behaviors

Containment

A rect contains a given point if the point is within the bounds of the defined rectangle.

Nearest Point

If the rect 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 rect that is closest to the given point in 2 dimensions. The Z coordinate of the nearest point is the Z coordinate of the given point.

Center Point

The center point within this region is halfway between X1 and X2, and Y1 and Y2. The Z coordinate is 0.

Rect Characteristics

Rects 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.

Rect-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.

Examples

Example XML code

<Rect Name="Rectacular">
   <X1>1</X1>
   <X2>2</X2>
   <Y1>1</Y1>
   <Y2>2</Y2>
</Triangle>

See Also