Difference between revisions of "LavishNav:lnavregion (Object Type)"
Jump to navigation
Jump to search
(23 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 == | ||
− | *... '''Parent''': | + | *... '''Parent''': The region immediately containing this one |
− | *... '''Children''': | + | *... '''Children''': The first child region in this region's tree |
− | *... '''Next''': | + | *... '''Next''': The next sibling region |
− | *... '''Previous''': | + | *... '''Previous''': The previous sibling region |
− | *[[DataType:uint|uint]] '''ID''': | + | *[[DataType:uint|uint]] '''ChildCount''': Number of children |
− | *[[DataType:string|string]] '''Name''': | + | *[[DataType:uint|uint]] '''ID''': This region's unique identifier number |
− | *[[DataType:string|string]] '''FQN''': | + | *[[DataType:string|string]] '''Name''': This region's name |
− | *[[DataType:bool|bool]] '''Unique''': | + | *[[DataType:string|string]] '''FQN''': The Fully-Qualified Name for this region |
− | *[[DataType:bool|bool]] '''Avoid''': | + | *[[DataType:bool|bool]] '''Unique''': Is this region unique? |
− | *[[DataType:bool|bool]] '''InheritedAvoid''': | + | *[[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]] '''AnyAvoid''': | + | *[[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]] '''AllPointsValid''': | + | *[[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:string|string]] '''Type''': | + | *[[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]] '''Custom['''name''']''': | + | *[[DataType:string|string]] '''Type''': The region type (point, rect, radius, box, etc) |
− | *... '''AddChild[...]''': | + | *[[DataType:string|string]] '''Custom['''name''']''': Value of the custom data point with this name |
− | *... '''FindRegion''': | + | *... '''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. |
− | *point3f '''NearestPoint''': | + | *... '''FindRegion['''search''']''': Finds a region with a relative [[LavishNav:Region Name Search|Region Name Search]] |
− | *point3f '''CenterPoint''': | + | *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 | ||
+ | *[[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]] '''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 | ||
+ | *... '''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 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 == | ||
*'''Clear''': Resets the region such that it will contain no child regions | *'''Clear''': Resets the region such that it will contain no child regions | ||
*'''Import['''filename''']''': Imports a LavishNav XML file as children of this region | *'''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 [[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 |
− | + | *'''SetCustom['''name''','''text''']''': Creates a custom data point with this name and value | |
− | *'''SetCustom['''name''','''text''']''': Creates a custom data point | ||
*'''UnsetCustom['''name''']''': Removes a custom data point | *'''UnsetCustom['''name''']''': Removes a custom data point | ||
*'''SetAllPointsValid['''value''']''': Sets the "All points valid" flag | *'''SetAllPointsValid['''value''']''': Sets the "All points valid" flag | ||
*'''SetUnique['''value''']''': Sets the unique flag | *'''SetUnique['''value''']''': Sets the unique flag | ||
*'''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. | |
− | + | *'''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. | |
− | '' | + | *'''GetConnectionIterator['''[[ObjectType:iterator|iterator object]]''']''': Initializes an iterator object for iterating connections |
− | |||
− | |||
− | |||
== Examples == | == Examples == | ||
Line 44: | Line 59: | ||
== See Also == | == See Also == | ||
* [[LavishNav]] | * [[LavishNav]] | ||
− | * [[LavishScript: | + | * [[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
Contents
Description
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