rtexample(1)
DESCRIPTION
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 reflected ray.
EXAMPLE
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.
COPYRIGHT
This software is Copyright (c) 1989-2021 by the United States Government as represented by U.S. Army Research Laboratory.
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org