Difference between revisions of "LavishNav:Regions"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 25: Line 25:
 
: Regions may be identified as Unique to prevent any other region from being created with the same name.  Note that it is possible to create regions with the same name before a Unique region is defined with that name, however they may become difficult to access.
 
: Regions may be identified as Unique to prevent any other region from being created with the same name.  Note that it is possible to create regions with the same name before a Unique region is defined with that name, however they may become difficult to access.
 
==== Notes on Region Names ====
 
==== Notes on Region Names ====
A <tt>Fully-Qualified Name</tt> (FQN) is made up of a region's name and each of its parents' names (from this region to its outermost parent), separated by the . character.  For example, if an region named "Bank" resides in a top-level region named "SomeCity", the region's FQN is "Bank.SomeCity".
+
A <tt>Fully-Qualified Name</tt> (FQN) is made up of a region's name and each of its parents' names (from this region to its outermost parent), separated by the . character.  For example, if an region named "Bank" resides in a top-level region named "SomeCity", the region's FQN is "Bank.SomeCity". See [[LavishNav:Region Name Search|Region Name Search]]
  
 
=== Properties ===
 
=== Properties ===

Revision as of 20:51, 7 March 2006

Introduction

What is a region?

A region is an individual area or point in 3-dimensional space. LavishNav defines 6 efficient region types: point, radius, rect, sphere, box, universe.

All types of regions can have any number of sub-regions (children) without restriction, regardless of whether they are inside the defined area of the parent region. Certain characreristics of parent regions are inherited by child regions (such as avoidance flags).

Regions with no parents are actually children of an inaccessible "root" region.

Region Behaviors

All types of regions have several defined behaviors that can be used both internally by the navigation system as well as via script to generate further useful information. These behaviors are undefined for the base region type, so the sections below will describe what the behaviors are or how they are used, not how the base region type will behave.

Containment

Containment is a condition that a given point resides within the bounds of a region. This behavior might be accessed, for example, to narrow a search for the nearest region to a given location (such as a player's location), or find the region that most strongly contains a given location.

Nearest Point

This behavior will get the nearest point within the bounds of the region to a given location.

Center Point

This behavior will get the logical center point of the region.

Region Characteristics

Note on terms used
Attributes and Properties collectively describe characteristics of the region. The difference is that attributes are defined inside the region tag in XML, and properties would be sub-tags contained by the region tag.

Attributes

  • Name
All regions must have a name. The name must not be the same as any of its siblings, but may be the same as another region elsewhere (including this region's parent and children)
  • Unique
Regions may be identified as Unique to prevent any other region from being created with the same name. Note that it is possible to create regions with the same name before a Unique region is defined with that name, however they may become difficult to access.

Notes on Region Names

A Fully-Qualified Name (FQN) is made up of a region's name and each of its parents' names (from this region to its outermost parent), separated by the . character. For example, if an region named "Bank" resides in a top-level region named "SomeCity", the region's FQN is "Bank.SomeCity". See Region Name Search

Properties

  • Data
Any number of custom data may be defined with a given Name as an attribute, and its value contained by the Data tag. Example: Some Value
  • Children
Any number of child regions can be defined within a Children container

See individual region types. Other characteristics are be available through the lnavregion object type

See Also