LavishNav:lnavregion (Object Type)

From Lavish Software Wiki
Revision as of 20:18, 5 March 2010 by CyberTech (talk | contribs) (→‎Members)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to navigation Jump to search

Description

Object Type Vitals
lnavregion
Defined By LavishNav
Inherits none
Reduces To Same as ID
Variable Object Type lnavregionref
Uses Sub-Types no
C/C++ Type LNavRegion *

Members

  • ... Parent: The region immediately containing this one
  • ... Children: The first child region in this region's tree
  • ... Next: The next sibling region
  • ... Previous: The previous sibling region
  • uint ChildCount: Number of children
  • uint ID: This region's unique identifier number
  • string Name: This region's name
  • string FQN: The Fully-Qualified Name for this region
  • bool Unique: Is this region unique?
  • bool Avoid: Is this region marked avoid? Note - This flag is NOT exported to the xml/lso, it is a temporary flag
  • bool InheritedAvoid: Is one of this region's ancestors marked avoid, thus allowing this region to inherit avoidance?
  • bool AnyAvoid: Is this region marked avoid OR does it inherit avoidance (as above)?
  • bool AllPointsValid: Is this region marked "All points valid", thus allowing safe random point generation within the bounds of this region? Not used directly by LavishNav. It is intended to mean that a system using LavishNav can treat this region as a free movement area.
  • bool Contains[x,y,z]: Does this region contain the given point (coordinates may be ommitted to check for x,0,0 or x,y,0)?
  • string Type: The region type (point, rect, radius, box, etc)
  • string Custom[name]: Value of the custom data point with this name
  • ... AddChild[type,name,...]: Adds a child region given a type (such as point) and a name. Extra parameters are used to construct the new region. To construct a unique region, use -unique. To construct a region that defines a coordinate system, use -coordinatesystem. These must be the first extra parameters, before any region type-specific parameters.
  • ... FindRegion[search]: Finds a region with a relative Region Name Search
  • point3f NearestPoint[x,y,z]: Retrieves the nearest point to the given location (coordinates may be ommitted to use x,0,0 or x,y,0)
  • point3f CenterPoint: The center point
  • ... CoordinateSystem: The ancestor region that defines the coordinate system for this particular region
  • bool IsCoordinateSystem: TRUE if this region defines a coordinate system for its descendant regions
  • uint ConnectionCount: Number of connections to other regions
  • lnavconnection Connect[search]: Connects to a given region, using a relative Region Name Search
  • lnavconnection GetConnection[search]: Retrieves a pre-existing connection, using a relative Region Name Search
  • bool IsDescendantOf[search]: TRUE if this region is a descendant of the given region
  • ... BestContainer[x,y,z]: Finds the best container of the given point, if any
  • ... NearestChild[x,y,z]: Finds the nearest child to the given point, if any
  • ... FullContainer[Size,x,y,z]: Finds the Full Container of a given radius, which may be this region or any of its parent regions (within this region's coordinate system)
  • uint NearestChildren[index:lnavregionref object,Count,x,y,z]: Places the nearest (Count) of this region's children to the given location into the given index, sorted by distance, and retrieves the count of those regions
  • uint DescendantsWithin[index:lnavregionref object,Distance,x,y,z]: Places all descendants of this region within a given Distance to the given location into the given index, sorted by distance, and retrieves the count of those regions
  • uint ChildrenWithin[index:lnavregionref object,Distance,x,y,z]: Places all children of this region within a given Distance to the given location into the given index, sorted by distance, and retrieves the count of those regions

Methods

  • Clear: Resets the region such that it will contain no child regions
  • Import[filename]: Imports a LavishNav XML file as children of this region
  • Export[filename]: Exports this region and its children to a LavishNav XML file
  • ExportChildren[filename]: Exports this region's children to a LavishNav XML file
  • Import[-lso,filename]: Imports a LavishNav LSO file as children of this region
  • Export[-lso,filename]: Exports this region and its children to a LavishNav LSO file
  • ExportChildren[-lso,filename]: Exports this region's children to a LavishNav LSO file
  • Remove: Removes the region
  • Disconnect[search]: not yet implemented
  • SetCustom[name,text]: Creates a custom data point with this name and value
  • UnsetCustom[name]: Removes a custom data point
  • SetAllPointsValid[value]: Sets the "All points valid" flag
  • SetUnique[value]: Sets the unique flag
  • SetAvoid[value]: Sets the avoid flag
  • AddChild[type,name,...]: Adds a child region given a type (such as point) and a name. Extra parameters are used to construct the new region. To construct a unique region, use -unique. To construct a region that defines a coordinate system, use -coordinatesystem. These must be the first extra parameters, before any region type-specific parameters.
  • Connect[search]: Connects this region to the given region, using a relative Region Name Search. Please note that the most efficient way to do this is to use FQN's in your connection criteria.
  • GetConnectionIterator[iterator object]: Initializes an iterator object for iterating connections

Examples

See Also