LavishNav:Sphere (Region Type)
Jump to navigation
Jump to search
Contents
Introduction
What is a Sphere?
A sphere is a point with a given size in 3 dimensions.
Sphere Behaviors
Containment
A sphere contains a given point if the distance from the sphere's point to the given point in 3 dimensions is less than or equal to the size of the sphere.
Nearest Point
Nearest point behavior is not presently implemented for spheres. The nearest point to any given point is the center point for the time being.
Center Point
The center point within this region is the defined location of the sphere.
Sphere Characteristics
Spheres are descendants of the base region type. Any characteristics of the base region type may be applied in addition to the sphere-specific characteristics described below.
Sphere-Specific Properties
- X
- X-coordinate. Defaults to 0.
- Y
- Y-coordinate. Defaults to 0.
- Z
- Z-coordinate. Defaults to 0.
- Size
- The size in 3 dimensions (i.e. the radius of the sphere)
Programming with spheres
- LavishScript
- LavishNav:lnavsphere_(Object_Type)
- .NET
- Sphere class
Examples
Example XML code
<Sphere Name="Banker"> <X>1.234</X> <Y>2.34567</Y> <Z>3.14159</Z> <Size>10</Size> </Sphere>