nurb_eval.c File Reference
#include "common.h"
#include <math.h>
#include "bio.h"
#include "vmath.h"
#include "nmg.h"
#include "raytrace.h"
#include "nurb.h"
Include dependency graph for nurb_eval.c:

Go to the source code of this file.


void rt_nurb_s_eval (const struct face_g_snurb *srf, fastf_t u, fastf_t v, fastf_t *final_value)
void rt_nurb_c_eval (const struct edge_g_cnurb *crv, fastf_t param, fastf_t *final_value)
fastf_trt_nurb_eval_crv (register fastf_t *crv, int order, fastf_t param, const struct knot_vector *k_vec, int k_index, int coords)
void rt_nurb_pr_crv (fastf_t *crv, int c_size, int coords)

Detailed Description

Evaluate a Non Uniform Rational B-spline curve or at the given (u, v) values.

Definition in file nurb_eval.c.

Function Documentation

void rt_nurb_s_eval ( const struct face_g_snurb *  srf,
fastf_t  u,
fastf_t  v,
fastf_t final_value 

Algorithm -

The algorithm uses the traditional COX-deBoor approach found in the book "Practical Guide to Splines" Carl de Boor, pg 147 to evaluate a parametric value on a curve. This is expanded to the surface.

Definition at line 49 of file nurb_eval.c.

References bu_bomb(), bu_free(), bu_log(), bu_malloc(), rt_nurb_eval_crv(), rt_nurb_knot_index(), and rt_nurb_s_print().

Referenced by isect_ray_snurb_face(), nmg_cnurb_to_vlist(), nmg_eval_linear_trim_curve(), nmg_eval_trim_curve(), nmg_snurb_fu_eval(), rt_nurb_curvature(), rt_nurb_intersect(), and rt_nurb_s_norm().

Here is the call graph for this function:

void rt_nurb_c_eval ( const struct edge_g_cnurb *  crv,
fastf_t  param,
fastf_t final_value 

Definition at line 125 of file nurb_eval.c.

References bu_bomb(), bu_free(), bu_log(), bu_malloc(), rt_nurb_c_print(), rt_nurb_eval_crv(), and rt_nurb_knot_index().

Referenced by nmg_cnurb_to_vlist(), nmg_eval_trim_curve(), nmg_snurb_calc_lu_uv_orient(), and seg_to_vlist().

Here is the call graph for this function:

fastf_t* rt_nurb_eval_crv ( register fastf_t crv,
int  order,
fastf_t  param,
const struct knot_vector *  k_vec,
int  k_index,
int  coords 

Definition at line 161 of file nurb_eval.c.

References ZERO.

Referenced by rt_nurb_c_eval(), and rt_nurb_s_eval().

void rt_nurb_pr_crv ( fastf_t crv,
int  c_size,
int  coords 

Definition at line 195 of file nurb_eval.c.