LavishNav:Triangle (Region Type)
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. http://dictionary.reference.com/search?q=triangle
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.
A triangle contains a given point if the given point falls within the 3 triangle points in 2 dimensions. Z coordinate is ignored.
Not yet implemented: The nearest point to a given point will presently be the center point.
The center point within this region is the average location of its 3 points (A + B + C / 3), in 3 dimensions.
- 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.
- X-coordinate. Defaults to 0.
- Y-coordinate. Defaults to 0.
- Z-coordinate. Defaults to 0.
Programming with triangles
Example XML code
<Triangle Name="Trifecta"> <Point> <X>1</X> <Y>1</Y> <Z>1</Z> </Point> <Point> <X>2</X> <Y>2</Y> <Z>2</Z> </Point> <Point> <X>3</X> <Y>3</Y> <Z>3</Z> </Point> </Triangle>