LavishNav:Sphere (Region Type)
What is a Sphere?
A sphere is a point with a given size in 3 dimensions.
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 behavior is not presently implemented for spheres. The nearest point to any given point is the center point for the time being.
The center point within this region is the defined location of the sphere.
- X-coordinate. Defaults to 0.
- Y-coordinate. Defaults to 0.
- Z-coordinate. Defaults to 0.
- The size in 3 dimensions (i.e. the radius of the sphere)
Programming with spheres
; This code creates a sphere of radius 5 at point 1,1,1. It also uses automatic name generation. LavishNav.Tree:AddChild[sphere,"auto",5,1,1,1]
Example XML code
<Sphere Name="Banker"> <X>1.234</X> <Y>2.34567</Y> <Z>3.14159</Z> <Size>10</Size> </Sphere>