BRL-CAD
#include "common.h"
#include <stdlib.h>
#include <stddef.h>
#include <math.h>
#include <string.h>
#include "bio.h"
#include "bu/cv.h"
#include "bu/parallel.h"
#include "vmath.h"
#include "db.h"
#include "nmg.h"
#include "rtgeom.h"
#include "raytrace.h"
Include dependency graph for hf.c:

Go to the source code of this file.

Data Structures

struct  hf_specific
 

Macros

#define HF_O(m)   bu_offsetof(struct rt_hf_internal, m)
 
#define MAXHITS   128 /* # of surfaces hit, must be even */
 
#define HF_GET(_p, _x, _y)   ((_p)[(_y)*xip->w+(_x)])
 

Functions

int rt_hf_to_dsp (struct rt_db_internal *db_intern)
 
int rt_hf_bbox (struct rt_db_internal *ip, point_t *min_pt, point_t *max_pt, const struct bn_tol *tol)
 
int rt_hf_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_hf_print (const struct soltab *stp)
 
int rt_hf_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_hf_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_hf_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_hf_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_hf_free (struct soltab *stp)
 
int rt_hf_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol, const struct rt_view_info *info)
 
int rt_hf_tess (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol)
 
int rt_hf_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_hf_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_hf_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_hf_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_hf_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_hf_ifree (struct rt_db_internal *ip)
 
int rt_hf_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 

Variables

const struct bu_structparse rt_hf_parse []
 
const struct bu_structparse rt_hf_cparse []
 

Detailed Description

Intersect a ray with a height field, where the heights are imported from an external data file, and where some (or all) of the parameters of that data file may be read in from an external control file.

Description of the external string description of the HF.

There are two versions of this parse table. The string solid in the .g file can set any parameter. The indirect control file (cfile) can only set parameters relating to dfile parameters, and not to the geometric position, orientation, and scale of the HF's bounding RPP.

In general, the cfile should be thought of as describing the data arrangement of the dfile, and the string solid should be thought of as describing the "geometry" of the height field's bounding RPP.

The string solid is parsed first. If a cfile is present, it is parsed second, and any parameters specified in the cfile override the values taken from the string solid.

Definition in file hf.c.

Macro Definition Documentation

#define HF_GET (   _p,
  _x,
  _y 
)    ((_p)[(_y)*xip->w+(_x)])

Referenced by rt_hf_plot().