BRL-CAD
libbn (numerical functions)
Collaboration diagram for libbn (numerical functions):


This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.

## Modules

Animation

Angle/Distance Cursor

Axis

Clipping

Complex Numbers

Constants

Display Lists

Plot/Draw

Fractal Noise

Matrix/Vector/Quaternion Math

Point/Line/Plane Geometry Math

Convex Hulls

Polynomials

Oriented Bounding Rectangles/Rectangular Cuboids

Random Numbers

libbn Tcl interface

Spherical Maps

Tabulated Data

Tolerances

Triangle/Triangle Intersection Tests

Vertex Trees

Version

Wavelets

## Files

file  bn.h

file  bn_private.h

## Macros

#define BN_AZIMUTH   0
Common definitions for the headers used in bn.h (i.e. the headers found in include/bn) More...

#define BN_ELEVATION   1

#define BN_TWIST   2

## Functions

int coplanar_2d_coord_sys (point_t *origin_pnt, vect_t *u_axis, vect_t *v_axis, const point_t *points_3d, int n)
Find a 2D coordinate system for a set of co-planar 3D points. More...

int coplanar_3d_to_2d (point2d_t **points_2d, const point_t *origin_pnt, const vect_t *u_axis, const vect_t *v_axis, const point_t *points_3d, int n)
Find 2D coordinates for a set of co-planar 3D points. More...

int coplanar_2d_to_3d (point_t **points_3d, const point_t *origin_pnt, const vect_t *u_axis, const vect_t *v_axis, const point2d_t *points_2d, int n)
Find 3D coordinates for a set of 2D points given a coordinate system. More...

## Macro Definition Documentation

 #define BN_AZIMUTH   0

Common definitions for the headers used in bn.h (i.e. the headers found in include/bn)

Definition at line 46 of file defines.h.

 #define BN_ELEVATION   1

Definition at line 47 of file defines.h.

 #define BN_TWIST   2

Definition at line 48 of file defines.h.

## Function Documentation

 int coplanar_2d_coord_sys ( point_t * origin_pnt, vect_t * u_axis, vect_t * v_axis, const point_t * points_3d, int n )

Find a 2D coordinate system for a set of co-planar 3D points.

Based on the planar normal and the vector from the center point to the point furthest from that center, find vectors describing a 2D coordinate system.

Parameters
 [out] origin_pnt Origin of 2D coordinate system in 3 space [out] u_axis 3D vector describing the U axis of the 2D coordinate system in 3 space [out] v_axis 3D vector describing the V axis of the 2D coordinate system in 3 space points_3d Array of 3D points n the number of points in the input set
Returns
0 if successful

Definition at line 29 of file util.c.

References bn_mk_plane_3pts(), BN_TOL_DIST, BN_TOL_MAGIC, VSET, and VSETALL.

Referenced by bn_3d_coplanar_chull(), and bn_3d_coplanar_obr().

Here is the call graph for this function:

 int coplanar_3d_to_2d ( point2d_t ** points_2d, const point_t * origin_pnt, const vect_t * u_axis, const vect_t * v_axis, const point_t * points_3d, int n )

Find 2D coordinates for a set of co-planar 3D points.

Parameters
 [out] points_2d Array of parameterized 2D points origin_pnt Origin of 2D coordinate system in 3 space u_axis 3D vector describing the U axis of the 2D coordinate system in 3 space v_axis 3D vector describing the V axis of the 2D coordinate system in 3 space points_3d 3D input points n the number of points in the input set
Returns
0 if successful

Definition at line 93 of file util.c.

References OSL::Strings::u, and OSL::Strings::v.

Referenced by bn_3d_coplanar_chull(), and bn_3d_coplanar_obr().

 int coplanar_2d_to_3d ( point_t ** points_3d, const point_t * origin_pnt, const vect_t * u_axis, const vect_t * v_axis, const point2d_t * points_2d, int n )

Find 3D coordinates for a set of 2D points given a coordinate system.

Parameters
 [out] points_3d Array of 3D points origin_pnt Origin of 2D coordinate system in 3 space u_axis 3D vector describing the U axis of the 2D coordinate system in 3 space v_axis 3D vector describing the V axis of the 2D coordinate system in 3 space points_2d 2D input points n the number of points in the input set
Returns
0 if successful

Definition at line 113 of file util.c.

References VSET.

Referenced by bn_3d_coplanar_chull(), and bn_3d_coplanar_obr().