BRL-CAD
util.h File Reference
#include "common.h"
#include "bnetwork.h"
#include "bu/cv.h"
#include "bu/endian.h"
#include "bu/log.h"
#include "bu/malloc.h"
#include "bu/parse.h"
#include "brep/defines.h"
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  Serializer
 
class  Deserializer
 
class  PooledObject< T >
 

Functions

void ON_BoundingBox_Plot (FILE *pf, ON_BoundingBox &bb)
 
ON_3dPoint ON_LinePlaneIntersect (ON_Line &line, ON_Plane &plane)
 
void ON_Plane_Plot (FILE *pf, ON_Plane &plane)
 
void ON_MinMaxInit (ON_3dPoint *min, ON_3dPoint *max)
 
bool ON_NearZero (double x, double tolerance=ON_ZERO_TOLERANCE)
 
bool face_GetBoundingBox (const ON_BrepFace &face, ON_BoundingBox &bbox, bool bGrowBox)
 
bool surface_GetBoundingBox (const ON_Surface *surf, const ON_Interval &u_interval, const ON_Interval &v_interval, ON_BoundingBox &bbox, bool bGrowBox)
 
bool surface_EvNormal (const ON_Surface *surf, double s, double t, ON_3dPoint &point, ON_3dVector &normal, int side=0, int *hint=0)
 
ON_Curve * interpolateCurve (ON_2dPointArray &samples)
 
ON_NurbsCurve * interpolateLocalCubicCurve (const ON_3dPointArray &Q)
 
int ON_Curve_PolyLine_Approx (ON_Polyline *polyline, const ON_Curve *curve, double tol)
 
ON_Curve * ON_Surface_Pushup (const ON_Surface *s, const ON_Curve &curve_2d, const ON_Interval *curve_2d_subdomain)
 
const char * ON_ObjectTypeToString (ON::object_type t)
 
int ON_BrepTikz (ON_String &s, const ON_Brep *brep, const char *color, const char *prefix)
 
ON_Curve * sub_curve (const ON_Curve *in, double a, double b)
 
ON_Surface * sub_surface (const ON_Surface *in, int dir, double a, double b)
 
void set_key (struct bu_vls *key, int k, int *karray)
 
int brep_translate_scv (ON_Brep *brep, int surface_index, int i, int j, fastf_t dx, fastf_t dy, fastf_t dz)
 

Function Documentation

◆ ON_BoundingBox_Plot()

void ON_BoundingBox_Plot ( FILE *  pf,
ON_BoundingBox &  bb 
)

◆ ON_LinePlaneIntersect()

ON_3dPoint ON_LinePlaneIntersect ( ON_Line &  line,
ON_Plane &  plane 
)

◆ ON_Plane_Plot()

void ON_Plane_Plot ( FILE *  pf,
ON_Plane &  plane 
)

◆ ON_MinMaxInit()

void ON_MinMaxInit ( ON_3dPoint *  min,
ON_3dPoint *  max 
)

◆ ON_NearZero()

bool ON_NearZero ( double  x,
double  tolerance = ON_ZERO_TOLERANCE 
)

◆ face_GetBoundingBox()

bool face_GetBoundingBox ( const ON_BrepFace &  face,
ON_BoundingBox &  bbox,
bool  bGrowBox 
)

◆ surface_GetBoundingBox()

bool surface_GetBoundingBox ( const ON_Surface *  surf,
const ON_Interval &  u_interval,
const ON_Interval &  v_interval,
ON_BoundingBox &  bbox,
bool  bGrowBox 
)

◆ surface_EvNormal()

bool surface_EvNormal ( const ON_Surface *  surf,
double  s,
double  t,
ON_3dPoint &  point,
ON_3dVector &  normal,
int  side = 0,
int *  hint = 0 
)

◆ interpolateCurve()

ON_Curve * interpolateCurve ( ON_2dPointArray &  samples)

◆ interpolateLocalCubicCurve()

ON_NurbsCurve * interpolateLocalCubicCurve ( const ON_3dPointArray &  Q)

◆ ON_Curve_PolyLine_Approx()

int ON_Curve_PolyLine_Approx ( ON_Polyline *  polyline,
const ON_Curve *  curve,
double  tol 
)

◆ ON_Surface_Pushup()

ON_Curve * ON_Surface_Pushup ( const ON_Surface *  s,
const ON_Curve &  curve_2d,
const ON_Interval *  curve_2d_subdomain 
)

◆ ON_ObjectTypeToString()

const char * ON_ObjectTypeToString ( ON::object_type  t)

◆ ON_BrepTikz()

int ON_BrepTikz ( ON_String &  s,
const ON_Brep *  brep,
const char *  color,
const char *  prefix 
)

◆ sub_curve()

ON_Curve * sub_curve ( const ON_Curve *  in,
double  a,
double  b 
)

Get the curve segment between param a and param b

Parameters
in[in] the curve to split
a[in] either a or b can be the larger one
b[in] either a or b can be the larger one
Returns
the result curve segment. NULL for error.

◆ sub_surface()

ON_Surface * sub_surface ( const ON_Surface *  in,
int  dir,
double  a,
double  b 
)

Get the sub-surface whose u in [a,b] or v in [a, b]

Parameters
in[in] the surface to split
dir[in] 0: u-split, 1: v-split
a[in] either a or b can be the larger one
b[in] either a or b can be the larger one
Returns
the result sub-surface. NULL for error.

◆ set_key()

void set_key ( struct bu_vls key,
int  k,
int *  karray 
)

◆ brep_translate_scv()

int brep_translate_scv ( ON_Brep *  brep,
int  surface_index,
int  i,
int  j,
fastf_t  dx,
fastf_t  dy,
fastf_t  dz 
)