This is an example of a program that uses librt to shoot a single ray at some
geometry in a geometry (.g) database.
librt is a big library with lots of code, but basically all that the programmer
needs to do is include `raytrace.h` and specify the following:
a_rt_i a raytrace instance, from 'rt_dirbuild()'
a_ray ray origin and direction
a_hit function to be called if ray hits something
a_miss function to be called if ray misses everything
rtexample defines simple functions for a_hit and a_miss which simply
output information about hit region (if hit) and log misses. Applications will
typically define more complex tasks to fo if the ray hits, such as describing a
rtexample car.g wheel door
Here, a single ray will be shot at the geometry database car.g and hit reports generated if the ray hits the specified objects.
This software is Copyright (c) 2004-2016 United States Government as represented by the U.S. Army Research Laboratory.