BRL-CAD
nurb_util.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_util.c:

Go to the source code of this file.

Functions

struct face_g_snurb * rt_nurb_new_snurb (int u_order, int v_order, int n_u, int n_v, int n_rows, int n_cols, int pt_type, struct resource *res)
 
struct edge_g_cnurb * rt_nurb_new_cnurb (int order, int n_knots, int n_pts, int pt_type)
 
void rt_nurb_clean_snurb (struct face_g_snurb *srf, struct resource *res)
 
void rt_nurb_free_snurb (struct face_g_snurb *srf, struct resource *res)
 
void rt_nurb_clean_cnurb (struct edge_g_cnurb *crv)
 
void rt_nurb_free_cnurb (struct edge_g_cnurb *crv)
 
void rt_nurb_c_print (const struct edge_g_cnurb *crv)
 
void rt_nurb_s_print (char *c, const struct face_g_snurb *srf)
 
void rt_nurb_pr_kv (const struct knot_vector *kv)
 
void rt_nurb_pr_mesh (const struct face_g_snurb *m)
 
void rt_nurb_print_pt_type (int c)
 

Detailed Description

Utilities for NURB curves and surfaces.

Definition in file nurb_util.c.

Function Documentation

struct face_g_snurb* rt_nurb_new_snurb ( int  u_order,
int  v_order,
int  n_u,
int  n_v,
int  n_rows,
int  n_cols,
int  pt_type,
struct resource res 
)

Create a place holder for a nurb surface.

Definition at line 42 of file nurb_util.c.

References bu_malloc(), and RT_CK_RESOURCE.

Referenced by rt_nurb_adjust(), rt_nurb_import4(), rt_nurb_import5(), rt_nurb_project_srf(), rt_nurb_s_diff(), and rt_nurb_scopy().

Here is the call graph for this function:

struct edge_g_cnurb* rt_nurb_new_cnurb ( int  order,
int  n_knots,
int  n_pts,
int  pt_type 
)

Create a place holder for a new nurb curve.

Definition at line 77 of file nurb_util.c.

References bu_malloc().

Referenced by rt_arc2d_to_cnurb(), rt_join_cnurbs(), rt_nurb_c_diff(), rt_nurb_c_refine(), and rt_nurb_crv_copy().

Here is the call graph for this function:

void rt_nurb_clean_snurb ( struct face_g_snurb *  srf,
struct resource res 
)

Clean up the storage use of an snurb, but don't release the pointer. Often used by routines that allocate an array of nurb pointers, or use automatic variables to hold one.

Definition at line 107 of file nurb_util.c.

References bu_free(), and RT_CK_RESOURCE.

Here is the call graph for this function:

void rt_nurb_free_snurb ( struct face_g_snurb *  srf,
struct resource res 
)

Definition at line 127 of file nurb_util.c.

References bu_free(), and RT_CK_RESOURCE.

Referenced by isect_ray_snurb_face(), nmg_snurb_to_vlist(), rt_nurb_adjust(), rt_nurb_bbox(), rt_nurb_bezier(), rt_nurb_curvature(), rt_nurb_free(), rt_nurb_ifree(), rt_nurb_intersect(), rt_nurb_par_edge(), rt_nurb_plot(), and rt_nurb_s_norm().

Here is the call graph for this function:

void rt_nurb_clean_cnurb ( struct edge_g_cnurb *  crv)

Clean up the storage use of a cnurb, but don't release the pointer. Often used by routines that allocate an array of nurb pointers, or use automatic variables to hold one.

Definition at line 152 of file nurb_util.c.

References bu_free().

Referenced by rt_nurb_sinterp().

Here is the call graph for this function:

void rt_nurb_free_cnurb ( struct edge_g_cnurb *  crv)

Release a cnurb and all the storage that it references.

Definition at line 170 of file nurb_util.c.

References bu_free().

Referenced by nurb_c_to_bezier(), rt_clip_cnurb(), rt_cnurb_par_edge(), and rt_process_casec().

Here is the call graph for this function:

void rt_nurb_c_print ( const struct edge_g_cnurb *  crv)

Definition at line 181 of file nurb_util.c.

References bu_log(), and rt_nurb_print_pt_type().

Referenced by nmg_cnurb_is_linear(), rt_join_cnurbs(), and rt_nurb_c_eval().

Here is the call graph for this function:

void rt_nurb_s_print ( char *  c,
const struct face_g_snurb *  srf 
)

Definition at line 214 of file nurb_util.c.

References bu_log(), rt_nurb_pr_kv(), and rt_nurb_pr_mesh().

Referenced by nmg_snurb_is_planar(), rt_nurb_intersect(), rt_nurb_print(), and rt_nurb_s_eval().

Here is the call graph for this function:

void rt_nurb_pr_kv ( const struct knot_vector *  kv)

Definition at line 235 of file nurb_util.c.

References bu_log().

Referenced by rt_nurb_kvmult(), and rt_nurb_s_print().

Here is the call graph for this function:

void rt_nurb_pr_mesh ( const struct face_g_snurb *  m)

Definition at line 251 of file nurb_util.c.

References bu_log().

Referenced by rt_nurb_s_print().

Here is the call graph for this function:

void rt_nurb_print_pt_type ( int  c)

Definition at line 277 of file nurb_util.c.

References bu_log().

Referenced by rt_nurb_c_print().

Here is the call graph for this function: