BRL-CAD
nurb_bound.c File Reference
#include "common.h"
#include "bio.h"
#include "vmath.h"
#include "raytrace.h"
#include "nurb.h"
Include dependency graph for nurb_bound.c:

Go to the source code of this file.

Functions

int rt_nurb_s_bound (struct face_g_snurb *srf, fastf_t *bmin, fastf_t *bmax)
 
int rt_nurb_c_bound (struct edge_g_cnurb *crv, fastf_t *bmin, fastf_t *bmax)
 
int rt_nurb_s_check (register struct face_g_snurb *srf)
 
int rt_nurb_c_check (register struct edge_g_cnurb *crv)
 

Detailed Description

Find the bounding box for the a NURB surface.

Since a B-Spline surface follows the convex hull property the bounding box can be found by taking the min and max of all points in the control If the surface mesh contains homogeneous points (i.e. [XYZW]) then divide out the W first.

Definition in file nurb_bound.c.

Function Documentation

int rt_nurb_s_bound ( struct face_g_snurb *  srf,
fastf_t bmin,
fastf_t bmax 
)

Calculates the bounding Right Parallel Piped (RPP) of the NURB surface, and returns the minimum and maximum points of the surface.

Definition at line 48 of file nurb_bound.c.

References bu_log(), HPRINT, VSETALL, and ZERO.

Referenced by isect_ray_snurb_face(), nmg_face_bb(), rt_nurb_bbox(), rt_nurb_import4(), rt_nurb_import5(), and rt_nurb_prep().

Here is the call graph for this function:

int rt_nurb_c_bound ( struct edge_g_cnurb *  crv,
fastf_t bmin,
fastf_t bmax 
)

Definition at line 88 of file nurb_bound.c.

References bu_log(), HPRINT, VSETALL, and ZERO.

Here is the call graph for this function:

int rt_nurb_s_check ( register struct face_g_snurb *  srf)

rt_nurb_s_check(srf)

Checks the NURB surface control points to make sure no one point is near INFINITY, which probably means that the surface mesh is bad.

Definition at line 134 of file nurb_bound.c.

References bu_log(), and NEAR_ZERO.

Here is the call graph for this function:

int rt_nurb_c_check ( register struct edge_g_cnurb *  crv)

rt_nurb_c_check(srf)

Checks the NURB curve control points to make sure no one point is near INFINITY, which probably means that the surface mesh is bad.

Definition at line 162 of file nurb_bound.c.

References bu_log(), and NEAR_ZERO.

Here is the call graph for this function: