GwNavGeneration - stingray.GwNavGeneration object reference - Stingray Lua API Reference

stingray.GwNavGeneration object reference

Description

Functions used for generating NavData.

Only available on desktop (Windows, OSX) and consoles (xb1, ps4).

Enumerations

Functions

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

nav_world :

stingray.GwNavWorld

The world to load the navdata into

navdata_resource_name :

string

navdata name

Returns

stingray.GwNavData

The NavData generated if added successfully, nil otherwise

Parameters

nav_world :

stingray.GwNavWorld

The world to load the navdata into

navdata_filepath :

string

Absolute path to .NavData file to load

Returns

boolean

if the NavData file was added successfully

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

All subsequent calls to push_triangle will have the same NavTag. The applied NavTag is the latest call to set_current_navtag or reset_current_navtag prior to begin_push_triangle.

Parameters

offset_sector :

stingray.Vector3?

The offset applied to the sector in order to generate NavData at the location the level will be loaded at runtime.

The ? notation indicates that this type is optional: there may be zero or one instances of it.

database_id :

integer?

The id of the database the NavData will be loaded into. Default: 0

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns

stingray.GwNavGeneration

The GwNavGeneration used to run the generation

sectors.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

stingray.GwNavGenSectorNeighborsIterator

Allows to iterate over names of sector neighbors

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

integer

The database_id

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

iterator :

stingray.GwNavGenSectorNeighborsIterator

The iterator to destroy

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

enable :

boolean

false to disable file writing. Otherwise, true which is the default.

Returns
This function does not return any values.

Use GwNavGeneration.generate then GwNavGeneration.add_generated_navdata_to_world in order to generate then add the generated NavData.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

actor_shape_template :

string

The name of the physics actor shape template to exclude from the generation

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

sector_name :

string

Name for the sector to generate

Returns

boolean

Tells if the generation was successful

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

sector_name :

string

Name of the sector to set the status

Returns

stingray.GwNavGeneration.GenFlags

The status of the sector

Returns

string

Next sector neighbor name

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

unit :

stingray.Unit

The unit to consume meshes from

consume_physics_mesh :

boolean

Indicates if physics meshes of the unit should be consumed

consume_render_mesh :

boolean

Indicates if render meshes of the unit should be consumed

Returns
This function does not return any values.

Use set_current_navtag to apply a given NavTag to the pushed triangles.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

position :

stingray.Vector3

Position of the seed point

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

polyline :

stingray.Vector3[]

An array of at least 3 Vector3

The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown.

altitude_min :

number

Altitude minimal of the tagvolume

altitude_max :

number

Altitude maximal of the tagvolume

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

integer

Gives the number of sector from .GenIO file.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns

string

Gives the sector name from .GenIO file.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

genio_name :

string

Relative file path from absolute base directory where to load .GenIO file if it exists, and where to save it after the generation.

regenerate_all_navmeshes :

boolean

Indicates if other sectors should be regenerated form their .ClientInput file.

Returns

boolean

True if successful. False otherwise e.g. GwNavGeneration.set_absolute_base_dir was not called previously.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

absoute_base_dir :

string

The directory where the generation will store the NavData and possibly write temporary files

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

In meters.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

In meters.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

is_exclusive :

boolean

Whether the NavTag associated with this obstacle causes the NavMesh to be untraversable.

color :

stingray.Quaternion?

The Color you would like the GwNavTagVolume to tag the NavMesh with. If nil, default color is applied. Unused if is_exclusive is true.

The ? notation indicates that this type is optional: there may be zero or one instances of it.

layer_id :

number?

The layer you would like to associate with this GwNavTagVolume. Unused if is_exclusive is true.

The ? notation indicates that this type is optional: there may be zero or one instances of it.

smartobject_id :

number?

The smartobject you would like to associate with this GwNavTagVolume. Unused if is_exclusive is true.

The ? notation indicates that this type is optional: there may be zero or one instances of it.

user_data_id :

number?

The user data you would like to associate with this GwNavTagVolume. Unused if is_exclusive is true.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns
This function does not return any values.

push_triangle, push_meshes_fromunit, or push_tagvolume_fromvolume)

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

do_log_configuration :

boolean

true to enable the logging of the configuration when log report is enabled.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

do_log_per_sector_report :

boolean

true to get log for each sector.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

do_log_report :

boolean

true to enable log report which is disabled by default.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

do_log_report_details :

boolean

true to get a detailed log report.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

do_multicore :

boolean

false to disable use of multicore while generating. Otherwise, true which is the default on pc platforms.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

do_profile :

boolean

true to enable profiling of the generation.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

In meters.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

In meters.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

If 0, sampling is as accurate as the heightfield. In meters.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

enable :

boolean

true to limit use of memory and rely upon use of temporary disk files.

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

In squared meters.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

In meters.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.

sector_name :

string

Name of the sector to set the status

gen_flags_sector_change :

stingray.GwNavGeneration.GenFlags

Indicates the status of the sector

Returns
This function does not return any values.
Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

In degrees.

Parameters

self :

stingray.GwNavGeneration

Specifies the object instance that this function will act on.

You must always provide this self parameter when you call this function. You must use the dot . calling syntax, not the object-oriented colon : calling syntax.For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.

In meters.