BRL-CAD
#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include "bnetwork.h"
#include "tcl.h"
#include "bu/cv.h"
#include "vmath.h"
#include "db.h"
#include "nmg.h"
#include "rtgeom.h"
#include "raytrace.h"
#include "bot.h"
#include "vds.h"
#include "tie.h"
#include "btg.h"
#include "./g_bot_include.c"
Include dependency graph for bot.c:

Go to the source code of this file.

Data Structures

struct  bot_fold_data
 
struct  bot_edge
 
struct  tri_edges
 
struct  tri_pts
 

Macros

#define GLUE(_a, _b)   _a ## _b
 
#define XGLUE(_a, _b)   GLUE(_a, _b)
 
#define MAXHITS   128
 
#define BOT_MIN_DN   1.0e-9
 
#define BOT_UNORIENTED_NORM(_ap, _hitp, _out)
 
#define TRI_TYPE   float
 
#define NORM_TYPE   signed char
 
#define NORMAL_SCALE   127.0
 
#define ONE_OVER_SCALE   (1.0/127.0)
 
#define TRI_TYPE   double
 
#define NORM_TYPE   fastf_t
 
#define NORMAL_SCALE   1.0
 
#define ONE_OVER_SCALE   1.0
 
#define RT_BOT_TESS_MAX_FACES   1024
 
#define MAX_AFFECTED_FACES   128
 
#define REMAP_BOT_VERTS(_oldbot, _newbot, _vmap, _vcount, _ovi, _i)
 

Functions

int rt_bot_makesegs (struct hit *hits, size_t nhits, struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead, struct rt_piecestate *psp)
 
HIDDEN int rt_bot_unoriented_segs (struct hit *hits, size_t nhits, struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead, struct bot_specific *bot)
 
size_t rt_botface_w_normals (struct soltab *stp, struct bot_specific *bot, fastf_t *ap, fastf_t *bp, fastf_t *cp, fastf_t *vertex_normals, size_t face_no, const struct bn_tol *tol)
 
size_t rt_botface (struct soltab *stp, struct bot_specific *bot, fastf_t *ap, fastf_t *bp, fastf_t *cp, size_t face_no, const struct bn_tol *tol)
 
void rt_bot_prep_pieces (struct bot_specific *bot, struct soltab *stp, size_t ntri, const struct bn_tol *tol)
 
int rt_bot_bbox (struct rt_db_internal *ip, point_t *min, point_t *max)
 
int rt_bot_prep (struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip)
 
void rt_bot_print (const struct soltab *stp)
 
HIDDEN int rt_bot_plate_segs (struct hit *hits, size_t nhits, struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead, struct bot_specific *bot)
 
int rt_bot_shot (struct soltab *stp, struct xray *rp, struct application *ap, struct seg *seghead)
 
int rt_bot_piece_shot (struct rt_piecestate *psp, struct rt_piecelist *plp, double dist_corr, struct xray *rp, struct application *ap, struct seg *seghead)
 
void rt_bot_piece_hitsegs (struct rt_piecestate *psp, struct seg *seghead, struct application *ap)
 
void rt_bot_norm (struct hit *hitp, struct soltab *stp, struct xray *rp)
 
void rt_bot_curve (struct curvature *cvp, struct hit *hitp, struct soltab *stp)
 
void rt_bot_uv (struct application *ap, struct soltab *stp, struct hit *hitp, struct uvcoord *uvp)
 
void rt_bot_free (struct soltab *stp)
 
int rt_bot_class (const struct soltab *stp, const fastf_t *min, const fastf_t *max, const struct bn_tol *tol)
 
vdsNode * build_vertex_tree (struct rt_bot_internal *bot)
 
int rt_bot_adaptive_plot (struct rt_db_internal *ip, const struct rt_view_info *info)
 
int rt_bot_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_bot_plot_poly (struct bu_list *vhead, struct rt_db_internal *ip, const struct rt_tess_tol *ttol, const struct bn_tol *tol)
 
void rt_bot_centroid (point_t *cent, const struct rt_db_internal *ip)
 
int rt_bot_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_bot_import4 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_bot_export4 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_bot_import5 (struct rt_db_internal *ip, const struct bu_external *ep, const fastf_t *mat, const struct db_i *dbip)
 
int rt_bot_export5 (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip)
 
int rt_bot_describe (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local)
 
HIDDEN void bot_ifree2 (struct rt_bot_internal *bot_ip)
 
void rt_bot_ifree (struct rt_db_internal *ip)
 
int rt_bot_xform (struct rt_db_internal *op, const fastf_t *mat, struct rt_db_internal *ip, const int release, struct db_i *dbip)
 
int rt_bot_find_v_nearest_pt2 (const struct rt_bot_internal *bot, const point_t pt2, const mat_t mat)
 
size_t rt_bot_get_edge_list (const struct rt_bot_internal *bot, size_t **edge_list)
 
int rt_bot_edge_in_list (const size_t v1, const size_t v2, const size_t edge_list[], const size_t edge_count)
 
int rt_bot_find_e_nearest_pt2 (int *vert1, int *vert2, const struct rt_bot_internal *bot, const point_t pt2, const mat_t mat)
 
int rt_bot_get (struct bu_vls *logstr, const struct rt_db_internal *intern, const char *attr)
 
int bot_check_vertex_indices (struct bu_vls *logstr, struct rt_bot_internal *bot)
 
int rt_bot_adjust (struct bu_vls *logstr, struct rt_db_internal *intern, int argc, const char **argv)
 
int rt_bot_form (struct bu_vls *logstr, const struct rt_functab *ftp)
 
int rt_bot_params (struct pc_pc_set *ps, const struct rt_db_internal *ip)
 
int buildEdgeTable (struct rt_bot_internal *bot, struct bot_edge ***edges)
 
float minEdge (struct rt_bot_internal *bot)
 
float maxEdge (struct rt_bot_internal *bot)
 
fastf_t rt_bot_propget (struct rt_bot_internal *bot, const char *property)
 
int rt_bot_vertex_fuse (struct rt_bot_internal *bot, const struct bn_tol *tol)
 
int rt_bot_same_orientation (const int *a, const int *b)
 
int rt_bot_face_fuse (struct rt_bot_internal *bot)
 
int rt_bot_condense (struct rt_bot_internal *bot)
 
int find_closest_face (fastf_t **centers, int *piece, int *old_faces, size_t num_faces, fastf_t *vertices)
 
void Add_unique_verts (int *piece_verts, int *v)
 
int rt_bot_sort_faces (struct rt_bot_internal *bot, size_t tris_per_piece)
 
HIDDEN void delete_edge (int v1, int v2, struct bot_edge **edges)
 
HIDDEN int decimate_edge (int v1, int v2, struct bot_edge **edges, size_t num_edges, int *faces, size_t num_faces, int face_del1, int face_del2)
 
HIDDEN int edge_can_be_decimated (struct rt_bot_internal *bot, int *faces, struct bot_edge **edges, int v1, int v2, int *face_del1, int *face_del2, fastf_t max_chord_error, fastf_t max_normal_error, fastf_t min_edge_length_sq)
 
int rt_bot_decimate (struct rt_bot_internal *bot, fastf_t max_chord_error, fastf_t max_normal_error, fastf_t min_edge_length)
 
HIDDEN int bot_smooth_miss (struct application *ap)
 
HIDDEN int bot_smooth_hit (struct application *ap, struct partition *PartHeadp, struct seg *seg)
 
int rt_bot_smooth (struct rt_bot_internal *bot, const char *bot_name, struct db_i *dbip, fastf_t norm_tol_angle)
 
int rt_bot_flip (struct rt_bot_internal *bot)
 
void rt_bot_sync_func (struct rt_bot_internal *bot, struct tri_edges *tep, struct tri_edges *headTep, struct tri_edges *usedTep)
 
int rt_bot_sync (struct rt_bot_internal *bot)
 
void rt_bot_split_func (struct rt_bot_internal *bot, struct tri_pts *tpp, struct tri_pts *headTpp, struct tri_pts *usedTpp)
 
struct rt_bot_internal * rt_bot_create (struct rt_bot_internal *bot, struct tri_pts *newTpp)
 
struct rt_bot_list * rt_bot_split (struct rt_bot_internal *bot)
 
struct rt_bot_list * rt_bot_patches (struct rt_bot_internal *bot)
 
void rt_bot_list_free (struct rt_bot_list *headRblp, int fbflag)
 
void rt_bot_volume (fastf_t *volume, const struct rt_db_internal *ip)
 
void rt_bot_surf_area (fastf_t *area, const struct rt_db_internal *ip)
 

Detailed Description

Intersect a ray with a bag o' triangles.

Definition in file bot.c.

Macro Definition Documentation

#define RT_BOT_TESS_MAX_FACES   1024

Referenced by rt_bot_tess().