|
BRL-CAD
|
Definitions and functions supporting raytracing BRL-CAD geometry. More...
Modules | |
| The Solids Table | |
| The LIBRT Solids Table. | |
| The Function Table | |
| Object-oriented interface to BRL-CAD geometry. | |
| Generate Rays via Pattern Templates | |
| Functionality for generating patterns of rays. | |
| Shoot Rays | |
| Ray Tracing program shot coordinator. This is the heart of LIBRT's ray-tracing capability. | |
| Booleweave | |
| Boolean weaving of raytracing segments. | |
Files | |
| file | calc.h |
| In memory format for non-geometry objects in BRL-CAD databases. | |
Definitions and functions supporting raytracing BRL-CAD geometry.
|
extern |
apply a matrix transformation to a given input object, setting the resultant transformed object as the output solid. if freeflag is set, the input object will be released.
returns zero if matrix transform was applied, non-zero on failure.
|
extern |
Calculate the bounding RPP for a region given the name of the region node in the database. See remarks in _rt_getregion() above for name conventions. Returns 0 for failure (and prints a diagnostic), or 1 for success.
|
extern |
Compute the intersections of a ray with a rectangular parallelepiped (RPP) that has faces parallel to the coordinate planes
The algorithm here was developed by Gary Kuehl for GIFT. A good description of the approach used can be found in "??" by XYZZY and Barsky, ACM Transactions on Graphics, Vol 3 No 1, January 1984.
Note: The computation of entry and exit distance is mandatory, as the final test catches the majority of misses.
Note: A hit is returned if the intersect is behind the start point.
Returns - 0 if ray does not hit RPP, !0 if ray hits RPP.
Implicit return - rp->r_min = dist from start of ray to point at which ray ENTERS solid rp->r_max = dist from start of ray to point at which ray LEAVES solid
|
extern |
Calculate the bounding RPP of the internal format passed in 'ip'. The bounding RPP is returned in rpp_min and rpp_max in mm
NOTE: this computes a LOOSE axis-aligned RPP. Subtracted (OP_SUBTRACT / negative) members are recursed into but their RPP is discarded, so the returned box IGNORES carved-away material and never shrinks to reflect it. For a bound that accounts for subtractions, evaluate the geometry (e.g. the ray-traced evaluated-geometry path exposed by the "bb -t" command).
Returns - 0 success -1 failure, the model bounds could not be got
|
extern |
Given the info defining a comb tree instance, calculate its bounding box (using ft_plot methods as a fallback.) This routine has its origins in the drawing code
|
extern |
Given an argc/argv list of objects, calculate their collective bounding box.
NOTE: this returns a LOOSE axis-aligned RPP (it is built on rt_bound_tree()). Subtracted (OP_SUBTRACT / negative) members do NOT tighten the result – the box reflects only the positive/union geometry and never shrinks to account for carved-away material. Callers needing a subtraction-aware bound must evaluate the geometry (e.g. via the "bb -t" command, which bounds the ray-traced boolean-evaluated geometry).
|
extern |
Given a region, return a matrix which maps model coordinates into region "shader space". This is a space where points in the model within the bounding box of the region are mapped into "region" space (the coordinate system in which the region is defined). The area occupied by the region's bounding box (in region coordinates) are then mapped into the unit cube. This unit cube defines "shader space".
Returns: 0 OK <0 Failure
|
extern |
|
extern |
|
extern |
Find the roots of a polynomial
WARNING: The polynomial given as input is destroyed by this routine. The caller must save it if it is important!
NOTE : This routine is written for polynomials with real coefficients ONLY. To use with complex coefficients, the Complex Math library should be used throughout. Some changes in the algorithm will also be required.