BRL-CAD
|
#include "common.h"
#include "vmath.h"
#include "bu/color.h"
#include "bn/tol.h"
#include "bv/defines.h"
#include "bg/defines.h"
#include "bg/polygon_types.h"
Go to the source code of this file.
Data Structures | |
struct | bv_polygon |
Macros | |
#define | CLIPPER_MAX 1518500249 |
Functions for working with polygons. More... | |
#define | BV_POLYGON_GENERAL 0 |
#define | BV_POLYGON_CIRCLE 1 |
#define | BV_POLYGON_ELLIPSE 2 |
#define | BV_POLYGON_RECTANGLE 3 |
#define | BV_POLYGON_SQUARE 4 |
#define | BV_POLYGON_UPDATE_DEFAULT 0 |
#define | BV_POLYGON_UPDATE_PROPS_ONLY 1 |
#define | BV_POLYGON_UPDATE_PT_SELECT 2 |
#define | BV_POLYGON_UPDATE_PT_MOVE 3 |
#define | BV_POLYGON_UPDATE_PT_APPEND 4 |
Enumerations | |
enum | triangulation_t { TRI_ANY = 0 , TRI_EAR_CLIPPING , TRI_CONSTRAINED_DELAUNAY , TRI_MONOTONE , TRI_HERTEL_MEHLHORN , TRI_KEIL_SNOEYINK , TRI_DELAUNAY } |
Functions | |
fastf_t | bg_find_polygon_area (struct bg_polygon *gpoly, fastf_t sf, matp_t model2view, fastf_t size) |
int | bg_polygons_overlap (struct bg_polygon *polyA, struct bg_polygon *polyB, matp_t model2view, const struct bn_tol *tol, fastf_t iscale) |
struct bg_polygon * | bg_clip_polygon (bg_clip_t op, struct bg_polygon *subj, struct bg_polygon *clip, fastf_t sf, matp_t model2view, matp_t view2model) |
struct bg_polygon * | bg_clip_polygons (bg_clip_t op, struct bg_polygons *subj, struct bg_polygons *clip, fastf_t sf, matp_t model2view, matp_t view2model) |
struct bg_polygon * | bg_polygon_fill_segments (struct bg_polygon *poly, vect2d_t line_slope, fastf_t line_spacing) |
void | bg_polygon_free (struct bg_polygon *gpp) |
void | bg_polygons_free (struct bg_polygons *gpp) |
void | bg_polygon_cpy (struct bg_polygon *dest, struct bg_polygon *src) |
int | bg_polygon_direction (size_t npts, const point2d_t *pts, const int *pt_indices) |
Test whether a polygon is clockwise (CW) or counter clockwise (CCW) More... | |
int | bg_pnt_in_polygon (size_t npts, const point2d_t *pts, const point2d_t *test_pt) |
test whether a point is inside a 2d polygon More... | |
int | bg_nested_polygon_triangulate (int **faces, int *num_faces, point2d_t **out_pts, int *num_outpts, const int *poly, const size_t poly_npts, const int **holes_array, const size_t *holes_npts, const size_t nholes, const int *steiner, const size_t steiner_npts, const point2d_t *pts, const size_t npts, triangulation_t type) |
Triangulate a 2D polygon with holes. More... | |
int | bg_polygon_triangulate (int **faces, int *num_faces, point2d_t **out_pts, int *num_outpts, const int *steiner, const size_t steiner_npts, const point2d_t *pts, const size_t npts, triangulation_t type) |
Triangulate a 2D polygon without holes. More... | |
int | bg_poly2tri_test (int **faces, int *num_faces, point2d_t **out_pts, int *num_outpts, const int *poly, const size_t poly_pnts, const int **holes_array, const size_t *holes_npts, const size_t nholes, const int *steiner, const size_t steiner_npts, const point2d_t *pts) |
int | bg_3d_polygon_area (fastf_t *area, size_t npts, const point_t *pts) |
Calculate the interior area of a polygon in a 3D plane in space. More... | |
int | bg_3d_polygon_centroid (point_t *cent, size_t npts, const point_t *pts) |
Calculate the centroid of a non self-intersecting polygon in a 3D plane in space. More... | |
int | bg_3d_polygon_sort_ccw (size_t npts, point_t *pts, plane_t cmp) |
Sort an array of point_ts, building a convex polygon, counter-clockwise. More... | |
int | bg_3d_polygon_make_pnts_planes (size_t *npts, point_t **pts, size_t neqs, const plane_t *eqs) |
Calculate for an array of plane_eqs, which build a polyhedron, the point_t's for each face. More... | |
void | bg_polygon_plot_2d (const char *filename, const point2d_t *pnts, int npnts, int r, int g, int b) |
void | bg_polygon_plot (const char *filename, const point_t *pnts, int npnts, int r, int g, int b) |
void | bg_tri_plot_2d (const char *filename, const int *faces, int num_faces, const point2d_t *pnts, int r, int g, int b) |
struct bv_scene_obj * | bv_create_polygon_obj (struct bview *v, struct bv_polygon *p) |
struct bv_scene_obj * | bv_create_polygon (struct bview *v, int type, int x, int y) |
int | bv_update_polygon (struct bv_scene_obj *s, struct bview *v, int utype) |
void | bv_polygon_vlist (struct bv_scene_obj *s) |
struct bv_scene_obj * | bv_select_polygon (struct bu_ptbl *objs, struct bview *v) |
int | bv_move_polygon (struct bv_scene_obj *s) |
struct bv_scene_obj * | bg_dup_view_polygon (const char *nname, struct bv_scene_obj *s) |
int | bv_polygon_csg (struct bu_ptbl *objs, struct bv_scene_obj *p, bg_clip_t op, int merge) |