BRL-CAD
Loading...
Searching...
No Matches
Collaboration diagram for Bag Of Triangles:

Files

file  bot.h
 

Data Structures

struct  rt_bot_internal
 
struct  rt_bot_list
 
struct  bot_specific
 
struct  _triangle_s
 
struct  rt_bot_edit
 
struct  rt_bot_repair_info
 

Macros

#define RT_BOT_UNORIENTED   1
 unoriented triangles
 
#define RT_BOT_CCW   2
 oriented counter-clockwise
 
#define RT_BOT_CW   3
 oriented clockwise
 
#define RT_BOT_SURFACE   1
 triangles represent a surface (no volume)
 
#define RT_BOT_SOLID   2
 triangles represent the boundary of a solid object
 
#define RT_BOT_PLATE   3
 
#define RT_BOT_PLATE_NOCOS   4
 
#define RT_BOT_HAS_SURFACE_NORMALS   0x01
 Has surface normals at each face vertex.
 
#define RT_BOT_USE_NORMALS   0x02
 Use the surface normals if they exist.
 
#define RT_BOT_USE_FLOATS   0x04
 Use the single precision version of "tri_specific" during prep.
 
#define RT_BOT_HAS_TEXTURE_UVS   0x08
 Has uv texture coordinates at each face vertex.
 
#define RT_BOT_HAS_UNUSED1   0x10
 TBD.
 
#define RT_BOT_HAS_UNUSED2   0x20
 TBD.
 
#define RT_BOT_HAS_UNUSED3   0x40
 TBD.
 
#define RT_BOT_HAS_UNUSED4   0x80
 WARNING: use this flag to denote more bits in the export serialization.
 
#define RT_BOT_CK_MAGIC(_p)   BU_CKMAG(_p, RT_BOT_INTERNAL_MAGIC, "rt_bot_internal")
 
#define RT_BOT_REPAIR_LOST_NORMALS   0x01
 
#define RT_BOT_REPAIR_LOST_UVS   0x02
 
#define RT_BOT_REPAIR_INFO_INIT   {0.0, 5.0, 1, 0, 0, 0.0, 0};
 

Typedefs

typedef todo see if that ever gets and if it doesn t struct _triangle_s triangle_s
 

Functions

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_count0)
 
int rt_bot_plot (struct bu_list *vhead, struct rt_db_internal *ip, const struct bg_tess_tol *ttol, const struct bn_tol *tol, const struct bview *info)
 
int rt_bot_plot_poly (struct bu_list *vhead, struct rt_db_internal *ip, const struct bg_tess_tol *ttol, const struct bn_tol *tol)
 
int rt_bot_find_v_nearest_pt2 (const struct rt_bot_internal *bot, const point_t pt2, const mat_t mat)
 
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)
 
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_face_fuse (struct rt_bot_internal *bot)
 
int rt_bot_condense (struct rt_bot_internal *bot)
 
int rt_bot_smooth (struct rt_bot_internal *bot, const char *bot_name, struct db_i *dbip, fastf_t normal_tolerance_angle)
 
int rt_bot_flip (struct rt_bot_internal *bot)
 
int rt_bot_sync (struct rt_bot_internal *bot)
 
struct rt_bot_internalrt_bot_gc (const struct rt_bot_internal *bot, const int *faces, const int *face_sources, size_t face_count)
 
struct rt_bot_internalrt_bot_subset (const struct rt_bot_internal *bot, const int *face_indices, size_t face_count)
 
struct rt_bot_listrt_bot_split (struct rt_bot_internal *bot)
 
struct rt_bot_listrt_bot_patches (struct rt_bot_internal *bot)
 
void rt_bot_list_free (struct rt_bot_list *headRblp, int fbflag)
 
void rt_bot_internal_free (struct rt_bot_internal *bot)
 
int rt_bot_same_orientation (const int *a, const int *b)
 
int rt_bot_tess (struct nmgregion **r, struct model *m, struct rt_db_internal *ip, const struct bg_tess_tol *ttol, const struct bn_tol *tol)
 
struct rt_bot_internalrt_bot_merge (size_t num_bots, const struct rt_bot_internal *const *bots)
 
int rt_bot_sort_faces (struct rt_bot_internal *bot, size_t tris_per_piece)
 
int rt_bot_decimate (struct rt_bot_internal *bot, fastf_t max_chord_error, fastf_t max_normal_error, fastf_t min_edge_length)
 
size_t rt_bot_decimate_gct (struct rt_bot_internal *bot, fastf_t feature_size)
 
int rt_bot_plate_to_vol (struct rt_bot_internal **obot, struct rt_bot_internal *bot, int round_outer_edges, int quiet_mode, fastf_t max_area_delta, fastf_t min_tri_threshold)
 
int rt_bot_repair (struct rt_bot_internal **obot, struct rt_bot_internal *ibot, struct rt_bot_repair_info *i)
 
int rt_bot_inside_out (struct rt_bot_internal *bot)
 
int rt_bot_thin_check (struct bu_ptbl *ofaces, struct rt_bot_internal *bot, struct rt_i *rtip, fastf_t tol, int verbose)
 
int rt_bot_csg_miss_check (struct bu_ptbl *ofaces, struct rt_bot_internal *bot, struct rt_i *rtip, int verbose)
 
struct rt_bot_internalrt_bot_remove_faces (struct bu_ptbl *rm_face_indices, const struct rt_bot_internal *obot)
 
struct rt_bot_internalrt_bot_dup (const struct rt_bot_internal *bot)
 

Variables

todo see if that ever gets serialized
 

Detailed Description

Macro Definition Documentation

◆ RT_BOT_UNORIENTED

#define RT_BOT_UNORIENTED   1

unoriented triangles

Definition at line 863 of file geom.h.

◆ RT_BOT_CCW

#define RT_BOT_CCW   2

oriented counter-clockwise

Definition at line 864 of file geom.h.

◆ RT_BOT_CW

#define RT_BOT_CW   3

oriented clockwise

Definition at line 865 of file geom.h.

◆ RT_BOT_SURFACE

#define RT_BOT_SURFACE   1

triangles represent a surface (no volume)

Definition at line 868 of file geom.h.

◆ RT_BOT_SOLID

#define RT_BOT_SOLID   2

triangles represent the boundary of a solid object

Definition at line 869 of file geom.h.

◆ RT_BOT_PLATE

#define RT_BOT_PLATE   3

triangles represent plates. Thicknesses are specified in "thickness" array, and face mode is specified in "face_mode" bit vector. This is the FASTGEN "plate" mode. Orientation is ignored.

Definition at line 876 of file geom.h.

◆ RT_BOT_PLATE_NOCOS

#define RT_BOT_PLATE_NOCOS   4

same as plate mode, but LOS is set equal to face thickness, not the thickness divided by the cosine of the obliquity angle.

Definition at line 882 of file geom.h.

◆ RT_BOT_HAS_SURFACE_NORMALS

#define RT_BOT_HAS_SURFACE_NORMALS   0x01

Has surface normals at each face vertex.

Definition at line 885 of file geom.h.

◆ RT_BOT_USE_NORMALS

#define RT_BOT_USE_NORMALS   0x02

Use the surface normals if they exist.

Definition at line 886 of file geom.h.

◆ RT_BOT_USE_FLOATS

#define RT_BOT_USE_FLOATS   0x04

Use the single precision version of "tri_specific" during prep.

Definition at line 887 of file geom.h.

◆ RT_BOT_HAS_TEXTURE_UVS

#define RT_BOT_HAS_TEXTURE_UVS   0x08

Has uv texture coordinates at each face vertex.

Definition at line 888 of file geom.h.

◆ RT_BOT_HAS_UNUSED1

#define RT_BOT_HAS_UNUSED1   0x10

TBD.

Definition at line 889 of file geom.h.

◆ RT_BOT_HAS_UNUSED2

#define RT_BOT_HAS_UNUSED2   0x20

TBD.

Definition at line 890 of file geom.h.

◆ RT_BOT_HAS_UNUSED3

#define RT_BOT_HAS_UNUSED3   0x40

TBD.

Definition at line 891 of file geom.h.

◆ RT_BOT_HAS_UNUSED4

#define RT_BOT_HAS_UNUSED4   0x80

WARNING: use this flag to denote more bits in the export serialization.

Definition at line 892 of file geom.h.

◆ RT_BOT_CK_MAGIC

#define RT_BOT_CK_MAGIC (   _p)    BU_CKMAG(_p, RT_BOT_INTERNAL_MAGIC, "rt_bot_internal")

Definition at line 894 of file geom.h.

◆ RT_BOT_REPAIR_LOST_NORMALS

#define RT_BOT_REPAIR_LOST_NORMALS   0x01

Definition at line 244 of file bot.h.

◆ RT_BOT_REPAIR_LOST_UVS

#define RT_BOT_REPAIR_LOST_UVS   0x02

Definition at line 245 of file bot.h.

◆ RT_BOT_REPAIR_INFO_INIT

#define RT_BOT_REPAIR_INFO_INIT   {0.0, 5.0, 1, 0, 0, 0.0, 0};

Definition at line 255 of file bot.h.

Typedef Documentation

◆ triangle_s

Function Documentation

◆ rt_bot_get_edge_list()

size_t rt_bot_get_edge_list ( const struct rt_bot_internal bot,
size_t **  edge_list 
)
extern

◆ rt_bot_edge_in_list()

int rt_bot_edge_in_list ( const size_t  v1,
const size_t  v2,
const size_t  edge_list[],
const size_t  edge_count0 
)
extern

◆ rt_bot_plot()

int rt_bot_plot ( struct bu_list vhead,
struct rt_db_internal ip,
const struct bg_tess_tol ttol,
const struct bn_tol tol,
const struct bview info 
)
extern

◆ rt_bot_plot_poly()

int rt_bot_plot_poly ( struct bu_list vhead,
struct rt_db_internal ip,
const struct bg_tess_tol ttol,
const struct bn_tol tol 
)
extern

◆ rt_bot_find_v_nearest_pt2()

int rt_bot_find_v_nearest_pt2 ( const struct rt_bot_internal bot,
const point_t  pt2,
const mat_t  mat 
)
extern

◆ rt_bot_find_e_nearest_pt2()

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 
)
extern

◆ rt_bot_propget()

fastf_t rt_bot_propget ( struct rt_bot_internal bot,
const char property 
)
extern

◆ rt_bot_vertex_fuse()

int rt_bot_vertex_fuse ( struct rt_bot_internal bot,
const struct bn_tol tol 
)
extern

◆ rt_bot_face_fuse()

int rt_bot_face_fuse ( struct rt_bot_internal bot)
extern

◆ rt_bot_condense()

int rt_bot_condense ( struct rt_bot_internal bot)
extern

◆ rt_bot_smooth()

int rt_bot_smooth ( struct rt_bot_internal bot,
const char bot_name,
struct db_i dbip,
fastf_t  normal_tolerance_angle 
)
extern

◆ rt_bot_flip()

int rt_bot_flip ( struct rt_bot_internal bot)
extern

◆ rt_bot_sync()

int rt_bot_sync ( struct rt_bot_internal bot)
extern

◆ rt_bot_gc()

struct rt_bot_internal * rt_bot_gc ( const struct rt_bot_internal bot,
const int *  faces,
const int *  face_sources,
size_t  face_count 
)
extern

Build a compact BOT from replacement faces whose vertex indices reference the source BOT. face_sources maps every replacement face to its original source face, allowing thickness, face mode, normals, and texture UVs to be preserved. Replacement triangles must retain the corner ordering of their source faces; face_sources identifies faces but does not describe a separate corner permutation. The caller owns the returned BOT.

Returns NULL for malformed input or an invalid vertex or face reference.

◆ rt_bot_subset()

struct rt_bot_internal * rt_bot_subset ( const struct rt_bot_internal bot,
const int *  face_indices,
size_t  face_count 
)
extern

Build a compact BOT from selected input faces. face_indices identifies the original faces, in output order, so all per-face and per-corner data can be preserved and remapped along with the referenced vertices. This is the convenience form of rt_bot_gc for unchanged source faces. The caller owns the returned BOT.

Returns NULL for malformed input or an invalid face reference.

◆ rt_bot_split()

struct rt_bot_list * rt_bot_split ( struct rt_bot_internal bot)
extern

Split a BOT into edge-connected triangle components. A connected BOT returns an allocated empty list. On success with multiple components, each list entry owns a compact BOT preserving all source face-indexed data. Returns NULL on malformed input or another processing failure.

◆ rt_bot_patches()

struct rt_bot_list * rt_bot_patches ( struct rt_bot_internal bot)
extern

◆ rt_bot_list_free()

void rt_bot_list_free ( struct rt_bot_list headRblp,
int  fbflag 
)
extern

Free a BOT list. If fbflag is non-zero, also free each contained BOT.

◆ rt_bot_internal_free()

void rt_bot_internal_free ( struct rt_bot_internal bot)
extern

◆ rt_bot_same_orientation()

int rt_bot_same_orientation ( const int *  a,
const int *  b 
)
extern

◆ rt_bot_tess()

int rt_bot_tess ( struct nmgregion **  r,
struct model m,
struct rt_db_internal ip,
const struct bg_tess_tol ttol,
const struct bn_tol tol 
)
extern

◆ rt_bot_merge()

struct rt_bot_internal * rt_bot_merge ( size_t  num_bots,
const struct rt_bot_internal *const bots 
)
extern

◆ rt_bot_sort_faces()

int rt_bot_sort_faces ( struct rt_bot_internal bot,
size_t  tris_per_piece 
)
extern

◆ rt_bot_decimate()

int rt_bot_decimate ( struct rt_bot_internal bot,
fastf_t  max_chord_error,
fastf_t  max_normal_error,
fastf_t  min_edge_length 
)
extern

◆ rt_bot_decimate_gct()

size_t rt_bot_decimate_gct ( struct rt_bot_internal bot,
fastf_t  feature_size 
)
extern

◆ rt_bot_plate_to_vol()

int rt_bot_plate_to_vol ( struct rt_bot_internal **  obot,
struct rt_bot_internal bot,
int  round_outer_edges,
int  quiet_mode,
fastf_t  max_area_delta,
fastf_t  min_tri_threshold 
)
extern

◆ rt_bot_repair()

int rt_bot_repair ( struct rt_bot_internal **  obot,
struct rt_bot_internal ibot,
struct rt_bot_repair_info i 
)
extern

◆ rt_bot_inside_out()

int rt_bot_inside_out ( struct rt_bot_internal bot)
extern

◆ rt_bot_thin_check()

int rt_bot_thin_check ( struct bu_ptbl ofaces,
struct rt_bot_internal bot,
struct rt_i rtip,
fastf_t  tol,
int  verbose 
)
extern

◆ rt_bot_csg_miss_check()

int rt_bot_csg_miss_check ( struct bu_ptbl ofaces,
struct rt_bot_internal bot,
struct rt_i rtip,
int  verbose 
)
extern

◆ rt_bot_remove_faces()

struct rt_bot_internal * rt_bot_remove_faces ( struct bu_ptbl rm_face_indices,
const struct rt_bot_internal obot 
)

◆ rt_bot_dup()

struct rt_bot_internal * rt_bot_dup ( const struct rt_bot_internal bot)

Variable Documentation

◆ serialized

todo see if that ever gets serialized

Definition at line 81 of file bot.h.