ksnav_meshed_space

A more complex behavior is achieved by the ksnav_meshed_space navigator, which is intended to be used in highly detailed three-dimensional geometries where it has better performance over the default navigator. An example of this is shown in the PhotoMultiplierTubeSimulation.xml file. Its configuration is more complicated as it performs the navigations on the meshed boundaries of spaces and surfaces. It requires the construction of an octree spatial partition (which may be cached for later re-use). The user must specify the depth of the octree (max_octree_depth) and the number of elements allowed in a octree node before a subdivision is required (n_allowed_elements). In addition, the root of the geometry tree must also be specified with the parameter root_space, which is typically the world volume:

<ksnav_meshed_space name="nav_meshed_space" root_space="space_world" max_octree_depth="9" n_allowed_elements="1"/>

Though they are not shown here (they default to false), the exit and entrance split parameters may also be set for the ksnav_meshed_space navigator. Because the ksnav_meshed_space navigator requires a boundary mesh in order to operate, all geometric objects (spaces, surfaces) which have navigation commands attached to them must also have a mesh extension in the geometry specification. Furthermore, since ksnav_meshed_space requires access to the root space space_world and all of the navigation commands associated with the shapes it contains, it must be declared after the definition of the simulation command structure element <ksgeo_space>.

The mesh navigator can also be used together with geometry from external files, as shown in the MeshSimulation.xml example.

XML element: <ksnav_meshed_space>
C++ type: KSNavMeshedSpace
Attributes

Attribute

Type

Description

absolute_tolerance

double

enter_split

bool

exit_split

bool

fail_check

bool

max_octree_depth

unsigned int

n_allowed_elements

unsigned int

name

string

octree_file

string

path

string

relative_tolerance

double

root_space

string

Refers to the name of one of: <ksgeo_space>.

spatial_resolution

double

Used as:

Can be referenced by:

More information

Explained in: Navigation

Appears in the documentation:

Used in example configurations: