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

Go to the source code of this file.

Data Structures

struct  internal_line
 
struct  internal_convex_hull
 

Macros

#define FINDZERO(x0, x1, y0, y1)   (x0 - y0 * (x1 - x0) / (y1-y0))
 
#define SIGN(a)   ((a < 0.0)? -1 : 1)
 

Functions

void rt_nurb_pbound (struct face_g_snurb *srf, fastf_t *vmin, fastf_t *vmax)
 
struct face_g_snurb * rt_nurb_project_srf (const struct face_g_snurb *srf, fastf_t *plane1, fastf_t *plane2, struct resource *res)
 
void rt_nurb_clip_srf (const struct face_g_snurb *srf, int dir, fastf_t *min, fastf_t *max)
 
struct face_g_snurb * rt_nurb_region_from_srf (const struct face_g_snurb *srf, int dir, fastf_t param1, fastf_t param2, struct resource *res)
 
struct rt_nurb_uv_hit * rt_nurb_intersect (const struct face_g_snurb *srf, fastf_t *plane1, fastf_t *plane2, double uv_tol, struct resource *res, struct bu_list *plist)
 

Detailed Description

Functions which support the ray intersection for surfaces.

Definition in file nurb_ray.c.

Macro Definition Documentation

#define FINDZERO (   x0,
  x1,
  y0,
  y1 
)    (x0 - y0 * (x1 - x0) / (y1-y0))

This routine should go away and be changed into a macro but for now I want to be able to useit with debugging.

  • Paul

Definition at line 114 of file nurb_ray.c.

Referenced by rt_nurb_clip_srf().

#define SIGN (   a)    ((a < 0.0)? -1 : 1)

Definition at line 127 of file nurb_ray.c.

Referenced by rt_nurb_clip_srf().

Function Documentation

void rt_nurb_pbound ( struct face_g_snurb *  srf,
fastf_t vmin,
fastf_t vmax 
)

Definition at line 497 of file nurb_ray.c.

Referenced by rt_nurb_intersect().

struct face_g_snurb* rt_nurb_project_srf ( const struct face_g_snurb *  srf,
fastf_t plane1,
fastf_t plane2,
struct resource res 
)

Definition at line 42 of file nurb_ray.c.

References bu_log(), rt_g::NMG_debug, rt_nurb_new_snurb(), RTG, and V3ARGS.

Referenced by rt_nurb_intersect().

Here is the call graph for this function:

void rt_nurb_clip_srf ( const struct face_g_snurb *  srf,
int  dir,
fastf_t min,
fastf_t max 
)
struct face_g_snurb* rt_nurb_region_from_srf ( const struct face_g_snurb *  srf,
int  dir,
fastf_t  param1,
fastf_t  param2,
struct resource res 
)

Definition at line 284 of file nurb_ray.c.

References bu_calloc(), bu_free(), FMAX, and rt_nurb_s_refine().

Referenced by rt_nurb_intersect().

Here is the call graph for this function:

struct rt_nurb_uv_hit* rt_nurb_intersect ( const struct face_g_snurb *  srf,
fastf_t plane1,
fastf_t plane2,
double  uv_tol,
struct resource res,
struct bu_list plist 
)

Definition at line 322 of file nurb_ray.c.

References BU_LIST_APPEND, BU_LIST_DEQUEUE, BU_LIST_INIT, BU_LIST_WHILE, bu_log(), bu_malloc(), DEBUG_SPLINE, hit(), RT_G_DEBUG, rt_nurb_clip_srf(), rt_nurb_free_snurb(), rt_nurb_pbound(), rt_nurb_project_srf(), rt_nurb_region_from_srf(), rt_nurb_s_eval(), rt_nurb_s_print(), rt_nurb_s_split(), OSL::Strings::u, OSL::Strings::v, and V3ARGS.

Referenced by isect_ray_snurb_face(), and rt_nurb_shot().

Here is the call graph for this function: