BRL-CAD
nmg.h
Go to the documentation of this file.
1/* N M G . H
2 * BRL-CAD
3 *
4 * Copyright (c) 2004-2023 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20/** @addtogroup libnmg
21 *
22 * @brief
23 * "Non-Manifold Geometry" (NMG) models are BRL-CAD's primary mechanism
24 * for storing and manipulating planar mesh geometry. The design is
25 * based on work from the 1980s by Kevin J. Weiler.
26 *
27 * Original development was based on "Non-Manifold Geometric Boundary
28 * Modeling" by Kevin Weiler, 5/7/87 (SIGGraph 1989 Course #20 Notes)
29 *
30 * See also "Topological Structures for Geometric Modeling"
31 * by Kevin J. Weiler - RPI Phd thesis from 1986:
32 * https://www.scorec.rpi.edu/REPORTS/1986-1.pdf
33 *
34 * Documentation of BRL-CAD's implementation was published as part of
35 * Combinatorial Solid Geometry, Boundary Representations, and Non-Manifold
36 * Geometry by Michael John Muuss and Lee A. Butler, originally published in
37 * State of the Art in Computer Graphics: Visualization and Modeling D. F.
38 * Rogers, R. A. Earnshaw editors, Springer-Verlag, New York, 1991, pages
39 * 185-223:
40 * https://ftp.arl.army.mil/~mike/papers/90nmg/joined.html
41 */
42/** @{ */
43/** @brief Main header file for the BRL-CAD Non-Manifold Geometry Library, LIBNMG. */
44/** @file nmg.h */
45/** @} */
46
47/*
48 * TODO: since this original work, there have been a number of subsequent
49 * papers published on ways of representing non-manifold geometry. In
50 * particular, the "partial entity" structure is purported to have essentially
51 * the same representation power as Weiler's radial edge approach but with
52 * more compact storage:
53 *
54 * Sang Hun Lee and Kunwoo Lee, Partial Entity Structure: A Compact Boundary
55 * Representation for Non-Manifold Geometric Modeling, J. Comput. Inf. Sci.
56 * Eng 1(4), 356-365 (Nov 01, 2001)
57 *
58 * Sang Hun Lee and Kunwoo Lee, Partial entity structure: a compact
59 * non-manifold boundary representation based on partial topological entities,
60 * SMA '01 Proceedings of the sixth ACM symposium on Solid modeling and
61 * applications Pages 159-170
62 *
63 * Also, from a design perspective, it would be nice if we could set this up so
64 * that the more general non-manifold data structures include less general
65 * containers and just extend them with the necessary extra information...
66 * Don't know if that's possible, but it would be really nice from a data
67 * conversion standpoint...
68 *
69 * TODO: This paper may be worth a look from an API design perspective:
70 * Topological Operators for Non-Manifold Modeling (1995)
71 * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.50.1961
72 *
73 * also potentially useful:
74 * https://www.cs.purdue.edu/homes/cmh/distribution/books/geo.html
75 * https://cs.nyu.edu/faculty/yap/book/egc/
76 *
77 */
78
79#ifndef NMG_H
80#define NMG_H
81
82#include "common.h"
83
84/* system headers */
85#include <stdio.h> /* for FILE */
86
87/* interface headers */
88#include "vmath.h"
89#include "bu/list.h"
90#include "bu/log.h"
91#include "bu/magic.h"
92#include "bu/ptbl.h"
93#include "bg/plane.h"
94#include "bn/tol.h"
95#include "bv/vlist.h"
96#include "vmath.h"
97
98__BEGIN_DECLS
99
100/* Standard BRL-CAD definitions for libraries, and common definitions used
101 * broadly in libnmg logic. */
102#include "nmg/defines.h"
103
104/* Fundamental data structures used to represent NMG information */
105#include "nmg/topology.h"
106
107#include "nmg/debug.h"
108#include "nmg/globals.h"
109#include "nmg/vertex.h"
110#include "nmg/edge.h"
111#include "nmg/loop.h"
112#include "nmg/face.h"
113#include "nmg/shell.h"
114#include "nmg/region.h"
115#include "nmg/model.h"
116#include "nmg/nurb.h"
117#include "nmg/ray.h"
118#include "nmg/plot.h"
119#include "nmg/print.h"
120#include "nmg/index.h"
121#include "nmg/radial.h"
122#include "nmg/visit.h"
123#include "nmg/isect.h"
124#include "nmg/check.h"
125#include "nmg/io.h"
126
127__END_DECLS
128
129#endif /* NMG_H */
130
131/*
132 * Local Variables:
133 * mode: C
134 * tab-width: 8
135 * indent-tabs-mode: t
136 * c-file-style: "stroustrup"
137 * End:
138 * ex: shiftwidth=4 tabstop=8
139 */
Header file for the BRL-CAD common definitions.
Global registry of recognized magic numbers.
fundamental vector, matrix, quaternion math macros