LavishNav:Triangle (Region Type)

From Lavish Software Wiki
Jump to navigation Jump to search


What is a Triangle?

If you don't know what a triangle is, but you know how to read, well... I'm not sure what to tell you. Here's a link to an official definition.

A LavishNav triangle performs as a 2-dimensional triangle for containment algorithms (e.g. Z is ignored), but retains the Z coordinate to determine the center point and for retrieval of each point.

Triangle Behaviors


A triangle contains a given point if the given point falls within the 3 triangle points in 2 dimensions. Z coordinate is ignored.

Nearest Point

Not yet implemented: The nearest point to a given point will presently be the center point.

Center Point

The center point within this region is the average location of its 3 points (A + B + C / 3), in 3 dimensions.

Triangle Characteristics

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

Triangle-Specific Properties

  • Point
Container element for each individual point for the triangle. Three points define a triangle. If less than three points are given, the remaining points default to 0,0,0.

Point properties

  • X
X-coordinate. Defaults to 0.
  • Y
Y-coordinate. Defaults to 0.
  • Z
Z-coordinate. Defaults to 0.

Programming with triangles

lnavtriangle Object Type
Triangle class


Example XML code

<Triangle Name="Trifecta">

See Also