NIRT nged BRL-CAD BRL-CAD MGED Commands
nirt Runs the NIRT program that is distributed with BRL-CAD to intersect a single ray with the displayed objects.
`nirt` nirt_args

## DESCRIPTION

Runs the NIRT program that is distributed with BRL-CAD to intersect a single ray with the displayed objects. By default, NIRT is run using the current database and the currently displayed objects, backing out the start of the ray from current center, and using the current viewing direction as the ray direction. This effectively fires a ray at the center of the MGED display. The resulting collection of intersections between the ray and the objects is listed. Additional arguments may be supplied on the command line. When in the graphics window, the hot key N will run `nirt` command with no arguments at the center of the screen. See the man1 page of the `nirt` for further description of some of the arguments.

## Options

`-A attribute_name...`

  Adds the attribute_name to the list of attributes that will be reported.

`-M`

  Causes `nirt` to read the eye point and either the orientation quaternion (new format) or the view-rotation matrix (old format) from the standard input, and fire a single ray from the point in the specified direction.

`-b`

  (Default behavior) Causes `nirt` to backout before firing the ray (rather than using the center as the start of the ray).

`-B` rt_bot_minpieces

  Causes `nirt` to adjust the setting of rt_bot_minpieces to the indicated value. A value of zero here indicates that the "pieces" methodology should not be used. A value greater than zero indicates that all BOT primitives containing more than rt_bot_minpieces triangles should be broken down into a separate piece for each triangle. This can result in significant improvement in raytrace speed at the cost of more memory use.

`-c`

  Causes `nirt` to use the current center as the starting point when firing the ray.

`-e` script

  Causes `nirt` to run the script string before reading the standard input. Multiple commands in script may be separated with a semicolon ';'. Scripts specified with either the `-e` or `-f` options are executed in the order in which they are specified on the command line.

`-f` format

  Causes `nirt` to load the predefined format (see `-L`) format or script file before reading standard input. Scripts specified with either the `-e` or `-f` options are executed in the order in which they are specified on the command line.

`-E`

  Causes `nirt` to ignore any `-e` or `-f` options specified previously on the command line.

`-L`

  List output formatting options.

`-s`

  (Default behavior) Causes `nirt` to run in silent (that is, non-verbose) mode. In this mode, which is useful in a pipeline, `nirt` does not print its initial lines of output or the prompt.

`-v`

  Causes `nirt` to run in verbose mode.

`-H` n

  Set flag (n) for enable/disable informational header (n=1 [on] by default, always off in silent mode). Useful when combined with verbose mode (`-v`).

`-u` n

  Reports air when n=1 (set to 0 by default).

`-O` n

  Causes `nirt` to handle multiple regions' claims to segments of a ray according to action n. The argument n may be any of the values 0, 1, 2, or 3, or their corresponding key words "resolve", "rebuild_fastgen", "rebuild_all", or "retain". See the discussion of the overlap_claims in the `nirt` entry of the man1 manual.

`-x` v

  Sets the librt 3 debug flags to the hexadecimal bit vector v. See the discussion of the libdebug in the `nirt` entry of the man1 manual.

`-X` v

  Sets `nirt`'s own debug flags to the hexadecimal bit vector v. See the discussion of the debug in the `nirt` entry of the man1 manual.

## EXAMPLES

Run the NIRT program to fire a ray through the MGED display.

mged> `nirt`

Fires a single ray through the center of the MGED display.

Run the NIRT program to fire a ray through the MGED display and report air.

mged> `nirt -u 1`

Fires a single ray through the center of the MGED display and report air regions.

Run the NIRT program to fire a ray through the MGED display and include LOS and material ID per region.

mged> `nirt -A LOS -A material_id`

Fires a single ray through the center of the MGED display and includes LOS and material ID per region.

## AUTHOR

BRL-CAD Team

## BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org