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

Go to the source code of this file.

Data Structures

struct  half_specific
 

Macros

#define HALF_NULL   ((struct half_specific *)0)
 
#define RT_HALF_SEG_MISS(SEG)   (SEG).seg_stp=RT_SOLTAB_NULL
 

Functions

int rt_hlf_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_hlf_print (register const struct soltab *stp)
 
int rt_hlf_shot (struct soltab *stp, register struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_hlf_vshot (struct soltab **stp, struct xray **rp, struct seg *segp, int n, struct application *ap)
 
void rt_hlf_norm (register struct hit *hitp, struct soltab *stp, register struct xray *rp)
 
void rt_hlf_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_hlf_uv (struct application *ap, struct soltab *stp, register struct hit *hitp, register struct uvcoord *uvp)
 
void rt_hlf_free (struct soltab *stp)
 
int rt_hlf_class (const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol)
 
int rt_hlf_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_hlf_xform (struct rt_db_internal *op, const mat_t mat, struct rt_db_internal *ip, int release, struct db_i *dbip, struct resource *resp)
 
int rt_hlf_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_hlf_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_hlf_import5 (struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip)
 
int rt_hlf_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_hlf_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
void rt_hlf_ifree (struct rt_db_internal *ip)
 
int rt_hlf_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_hlf_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 

Variables

const struct bu_structparse rt_hlf_parse []
 

Detailed Description

Intersect a ray with a Halfspace.

A HALFSPACE is defined by an outward pointing normal vector, and the distance from the origin to the plane, which is defined by N and d.

With outward pointing normal vectors, the ray enters the half-space defined by a plane when D dot N < 0, is parallel to the plane when D dot N = 0, and exits otherwise.

The inside of the halfspace bounded by the plane consists of all points P such that VDOT(P, N) - N[W] <= 0, where N[W] stores the value d.

Definition in file half.c.