LavishNav:Sphere (Region Type)

From Lavish Software Wiki
Jump to: navigation, search


What is a Sphere?

A sphere is a point with a given size in 3 dimensions.

Sphere Behaviors


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

Sphere class


Example AddChild

; This code creates a sphere of radius 5 at point 1,1,1.  It also uses automatic name generation.

Example XML code

<Sphere Name="Banker">

See Also