Difference between revisions of "LavishNav:lnavregion (Object Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
 +
{{ObjectType-Vitals|lnavregion|[[LavishNav]]|none|Same as ID|[[LavishNav:lnavregionref (Object Type)|lnavregionref]]|no|LNavRegion *}}
  
 
== Members ==
 
== Members ==
Line 11: Line 12:
 
*[[DataType:string|string]] '''FQN''': The Fully-Qualified Name for this region
 
*[[DataType:string|string]] '''FQN''': The Fully-Qualified Name for this region
 
*[[DataType:bool|bool]] '''Unique''': Is this region unique?
 
*[[DataType:bool|bool]] '''Unique''': Is this region unique?
*[[DataType:bool|bool]] '''Avoid''': Is this region marked avoid?
+
*[[DataType:bool|bool]] '''Avoid''': Is this region marked avoid? Note - This flag is NOT exported to the xml/lso, it is a temporary flag
 
*[[DataType:bool|bool]] '''InheritedAvoid''': Is one of this region's ancestors marked avoid, thus allowing this region to inherit avoidance?
 
*[[DataType:bool|bool]] '''InheritedAvoid''': Is one of this region's ancestors marked avoid, thus allowing this region to inherit avoidance?
 
*[[DataType:bool|bool]] '''AnyAvoid''': Is this region marked avoid OR does it inherit avoidance (as above)?
 
*[[DataType:bool|bool]] '''AnyAvoid''': Is this region marked avoid OR does it inherit avoidance (as above)?
*[[DataType:bool|bool]] '''AllPointsValid''': Is this region marked "All points valid", thus allowing safe random point generation within the bounds of this region?
+
*[[DataType:bool|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.
 
*[[DataType:bool|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)?
 
*[[DataType:bool|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)?
 
*[[DataType:string|string]] '''Type''': The region type (point, rect, radius, box, etc)
 
*[[DataType:string|string]] '''Type''': The region type (point, rect, radius, box, etc)
Line 24: Line 25:
 
*... '''CoordinateSystem''': The ancestor region that defines the coordinate system for this particular region
 
*... '''CoordinateSystem''': The ancestor region that defines the coordinate system for this particular region
 
*[[DataType:bool|bool]] '''IsCoordinateSystem''': TRUE if this region defines a coordinate system for its descendant regions
 
*[[DataType:bool|bool]] '''IsCoordinateSystem''': TRUE if this region defines a coordinate system for its descendant regions
 +
*[[DataType:uint|uint]] '''ConnectionCount''': Number of connections to other regions
 
*[[LavishNav:lnavconnection (Object Type)|lnavconnection]] '''Connect['''search''']''': Connects to a given region, using a relative [[LavishNav:Region Name Search|Region Name Search]]
 
*[[LavishNav:lnavconnection (Object Type)|lnavconnection]] '''Connect['''search''']''': Connects to a given region, using a relative [[LavishNav:Region Name Search|Region Name Search]]
 
*[[LavishNav:lnavconnection (Object Type)|lnavconnection]] '''GetConnection['''search''']''': Retrieves a pre-existing connection, using a relative [[LavishNav:Region Name Search|Region Name Search]]
 
*[[LavishNav:lnavconnection (Object Type)|lnavconnection]] '''GetConnection['''search''']''': Retrieves a pre-existing connection, using a relative [[LavishNav:Region Name Search|Region Name Search]]
 
*[[DataType:bool|bool]] '''IsDescendantOf['''search''']''': TRUE if this region is a descendant of the given region
 
*[[DataType:bool|bool]] '''IsDescendantOf['''search''']''': TRUE if this region is a descendant of the given region
*... '''BestContainer['''x''','''y''','''z''']''': Finds the [[LavishNav:Best Container|best container]] of this point, if any, which may be this region or any of its children
+
*... '''BestContainer['''x''','''y''','''z''']''': Finds the [[LavishNav:Best Container|best container]] of the given point, if any
*... '''NearestChild['''x''','''y''','''z''']''': Finds the nearest child to this 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)
 +
*[[DataType:uint|uint]] '''NearestChildren['''[[ObjectType:index|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
 +
*[[DataType:uint|uint]] '''DescendantsWithin['''[[ObjectType:index|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
 +
*[[DataType:uint|uint]] '''ChildrenWithin['''[[ObjectType:index|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 ==
 
== Methods ==
Line 35: Line 41:
 
*'''Export['''filename''']''': Exports this region and its children to a LavishNav XML file
 
*'''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
 
*'''ExportChildren['''filename''']''': Exports this region's children to a LavishNav XML file
 +
*'''Import[-lso,'''filename''']''': Imports a LavishNav [[LavishSO|LSO]] file as children of this region
 +
*'''Export[-lso,'''filename''']''': Exports this region and its children to a LavishNav [[LavishSO|LSO]] file
 +
*'''ExportChildren[-lso,'''filename''']''': Exports this region's children to a LavishNav [[LavishSO|LSO]] file
 
*'''Remove''': Removes the region
 
*'''Remove''': Removes the region
 
*'''Disconnect['''search''']''': not yet implemented
 
*'''Disconnect['''search''']''': not yet implemented
Line 43: Line 52:
 
*'''SetAvoid['''value''']''': Sets the avoid 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.
 
*'''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 [[LavishNav:Region Name Search|Region Name Search]]
+
*'''Connect['''search''']''': Connects this region to the given region, using a relative [[LavishNav:Region Name Search|Region Name Search]].  Please note that the most efficient way to do this is to use FQN's in your connection criteria.
*'''ListConnections['''object''']''': Adds all connections from this region into a specified index:uint object
+
*'''GetConnectionIterator['''[[ObjectType:iterator|iterator object]]''']''': Initializes an iterator object for iterating connections
 
 
== Inherits ==
 
''none''
 
 
 
== Returns ==
 
Same as ID
 
  
 
== Examples ==
 
== Examples ==
Line 56: Line 59:
 
== See Also ==
 
== See Also ==
 
* [[LavishNav]]
 
* [[LavishNav]]
* [[LavishScript:Data Types|LavishScript Object Types]]
+
* [[LavishScript:Object Types|LavishScript Object Types]]
* [[LavishNav:Object Types]]
+
* [[LavishNav:Object Types|LavishNav Object Types]]
  
 
[[Category:LavishNav]]
 
[[Category:LavishNav]]

Latest revision as of 20:18, 5 March 2010

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