LavishNav:Radius (Region Type)

From Lavish Software Wiki
Jump to navigation Jump to search

Introduction

What is a Radius?

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

Radius Behaviors

Containment

A radius contains a given point if the distance from the radius' point to the given point in 2 dimensions is less than or equal to the size of the radius.

Nearest Point

If the radius 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 radius 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 the defined location of the radius.

Radius Characteristics

Radii are descendants of the base region type. Any characteristics of the base region type may be applied in addition to the radius-specific characteristics described below.

Radius-Specific Properties

  • X
X-coordinate. Defaults to 0.
  • Y
Y-coordinate. Defaults to 0.
  • Z
Z-coordinate. Defaults to 0.
  • Size
The size in 2 dimensions (i.e. the radius of ... the radius)

Programming with radii

LavishScript
lnavradius Object Type
.NET
Radius class

Examples

Example AddChild

; This code creates a radius region of radius 5 at point 1,2,3.  It also uses automatic name generation.
LavishNav.Tree:AddChild[radius,"auto",5,1,2,3]

Example XML code

<Radius Name="Banker">
   <X>1.234</X>
   <Y>2.34567</Y>
   <Z>3.14159</Z>
   <Size>10</Size>
</Radius>

See Also