You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EBGeometry uses the following convention for the sign:
23
+
``EBGeometry`` uses the following convention for the sign:
24
24
25
25
.. math::
26
26
@@ -60,7 +60,7 @@ DCEL
60
60
Principle
61
61
---------
62
62
63
-
EBGeometry uses a doubly-connected edge list (DCEL) structure for storing surface meshes.
63
+
``EBGeometry`` uses a doubly-connected edge list (DCEL) structure for storing surface meshes.
64
64
The DCEL structures consist of the following objects:
65
65
66
66
* Planar polygons (facets).
@@ -79,7 +79,7 @@ From the DCEL structure we can easily obtain all edges or vertices belonging to
79
79
DCEL mesh structure. Each half-edge stores references to next half-edge, the pair edge, and the starting vertex.
80
80
Vertices store a coordinate as well as a reference to one of the outgoing half-edges.
81
81
82
-
In EBGeometry the half-edge data structure is implemented in its own namespace.
82
+
In ``EBGeometry`` the half-edge data structure is implemented in its own namespace.
83
83
This is a comparatively standard implementation of the DCEL structure, supplemented by functions that permit signed distance computations to various features on such a mesh.
84
84
85
85
.. important::
@@ -111,7 +111,7 @@ Three cases can be distinguished:
111
111
112
112
.. tip::
113
113
114
-
EBGeometry uses the crossing number algorithm by default.
114
+
``EBGeometry`` uses the crossing number algorithm by default.
115
115
116
116
If the point projects to the inside of the face, the signed distance is just :math:`\mathbf{n}_f\cdot\left(\mathbf{x} - \mathbf{x}_f\right)` where :math:`\mathbf{n}_f` is the face normal and :math:`\mathbf{x}_f` is a point on the face plane (e.g., a vertex).
117
117
If the point projects to *outside* the polygon face, the closest feature is either an edge or a vertex.
@@ -188,7 +188,7 @@ For example, analytic signed distance functions can also be embedded in BVHs, pr
188
188
189
189
.. note::
190
190
191
-
EBGeometry is not limited to binary trees, but supports :math:`k` -ary trees where each regular node has :math:`k` child nodes.
191
+
``EBGeometry`` is not limited to binary trees, but supports :math:`k` -ary trees where each regular node has :math:`k` child nodes.
192
192
193
193
Construction
194
194
------------
@@ -203,7 +203,7 @@ Although the rules for BVH construction are highly flexible, performant BVHs are
203
203
* **Balanced**, in the sense that the tree depth does not vary greatly through the tree, and there is approximately the same number of primitives in each leaf node.
204
204
205
205
Construction of a BVH is usually done recursively, from top to bottom (so-called top-down construction).
206
-
Alternative construction methods also exist, but are not used in EBGeometry.
206
+
Alternative construction methods also exist, but are not used in ``EBGeometry``.
207
207
In this case one can represent the BVH construction of a :math:`k` -ary tree is done through a single function:
208
208
209
209
.. math::
@@ -255,7 +255,7 @@ For the traversal algorithm we consider the following steps:
255
255
For example, it is necessary to traverse almost the entire tree when one tries to compute the signed distance at the origin of a tessellated sphere.
256
256
257
257
Note that types of tree traversal (that do not compute the signed distance) are also possible, e.g. we may want to compute the union :math:`I\left(\mathbf{x}\right) = \min\left(I_1\left(\mathbf{x}\right), I_2\left(\mathbf{x}\right), .\ldots\right)`.
258
-
EBGeometry supports a fairly flexible approach to the tree traversal and update algorithms.
258
+
``EBGeometry`` supports a fairly flexible approach to the tree traversal and update algorithms.
259
259
260
260
Octree
261
261
======
@@ -268,7 +268,7 @@ Octree construction can be done in (at least) two ways:
268
268
#. In depth-first order where entire sub-trees are built first.
269
269
#. In breadth-first order where tree levels are added one at a time.
270
270
271
-
EBGeometry supports both of these methods.
271
+
``EBGeometry`` supports both of these methods.
272
272
Octree traversal is generally speaking quite similar to the traversal algorithms used for BVH trees.
273
273
274
274
Constructive solid geometry
@@ -278,7 +278,7 @@ Basic transformations
278
278
---------------------
279
279
280
280
Implicit functions, and by extension also signed distance fields, can be manipulated using basic transformations (like rotations).
281
-
EBGeometry supports many of these:
281
+
``EBGeometry`` supports many of these:
282
282
283
283
* Rotations.
284
284
* Translations.
@@ -294,11 +294,11 @@ EBGeometry supports many of these:
294
294
Combining objects
295
295
-----------------
296
296
297
-
EBGeometry supports standard operations in which implicit functions can be combined:
297
+
``EBGeometry`` supports standard operations in which implicit functions can be combined:
298
298
299
299
* Union.
300
300
* Intersection.
301
301
* Difference.
302
302
303
303
Some of these CSG operations also have smooth equivalents, i.e. for smoothing the transition between combined objects.
304
-
Fast CSG operations are also supported by EBGeometry, e.g. the BVH-accelerated CSG union where one uses the BVH when searching for the relevant geometric primitive(s).
304
+
Fast CSG operations are also supported by ``EBGeometry``, e.g. the BVH-accelerated CSG union where one uses the BVH when searching for the relevant geometric primitive(s).
:caption: Header section of the BVH implementation.
61
61
62
62
The optional input arguments to ``topDownSortAndPartition`` are polymorphic functions of type indicated above, and have the following responsibilities:
@@ -73,7 +73,7 @@ Default arguments for these are provided, bubt users are free to partition their
73
73
Compact form
74
74
------------
75
75
76
-
In addition to the standard BVH node ``NodeT<T, P, BV, K>``, EBGeometry provides a more compact formulation of the BVH hierarchy where the nodes are stored in depth-first order.
76
+
In addition to the standard BVH node ``NodeT<T, P, BV, K>``, ``EBGeometry`` provides a more compact formulation of the BVH hierarchy where the nodes are stored in depth-first order.
77
77
The "linearized" BVH can be automatically constructed from the standard BVH but not vice versa.
Copy file name to clipboardexpand all lines: Docs/Sphinx/source/ImplemDCEL.rst
+9-6
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The DCEL functionality exists under the namespace ``EBGeometry::DCEL`` and conta
10
10
11
11
.. important::
12
12
13
-
The DCEL functionality is *not* restricted to triangles, but supports N-sided polygons.
13
+
The DCEL functionality is *not* restricted to triangles, but supports N-sided polygons, including *meta-data* attached to the vertices, edges, and facets.
14
14
15
15
Main types
16
16
----------
@@ -21,7 +21,7 @@ The main DCEL functionality (vertices, edges, faces) is provided by the followin
21
21
22
22
.. code-block:: c++
23
23
24
-
template <class T>
24
+
template <class T, class Meta>
25
25
class VertexT
26
26
27
27
The DCEL vertex class stores the vertex position, normal vector, and the outgoing half-edge from the vertex.
@@ -33,7 +33,7 @@ The main DCEL functionality (vertices, edges, faces) is provided by the followin
33
33
34
34
.. code-block:: c++
35
35
36
-
template <class T>
36
+
template <class T, class Meta>
37
37
class EdgeT
38
38
39
39
The half-edges store a reference to their face, as well as pointers to the next edge, pair edge, and starting vertex.
@@ -44,7 +44,7 @@ The main DCEL functionality (vertices, edges, faces) is provided by the followin
44
44
45
45
.. code-block:: c++
46
46
47
-
template <class T>
47
+
template <class T, class Meta>
48
48
class FaceT
49
49
50
50
Faces also store
@@ -62,7 +62,7 @@ The main DCEL functionality (vertices, edges, faces) is provided by the followin
62
62
63
63
.. code-block:: c++
64
64
65
-
template <class T>
65
+
template <class T, class Meta>
66
66
class MeshT : public SignedDistanceFunction<T>
67
67
68
68
The mesh stores all the vertices, half-edges, and faces, and if it is watertight and orientable it is also a signed distance function.
@@ -77,10 +77,13 @@ The above DCEL classes have member functions of the type:
77
77
78
78
which can be used to compute the distance to the various features on the mesh.
79
79
80
+
Meta-data can be attached to the DCEL primitives by selecting an appropriate type for ``Meta`` above (which defaults to ``short``).
81
+
82
+
80
83
.. _Chap:BVHIntegration:
81
84
82
85
BVH integration
83
86
---------------
84
87
85
88
DCEL grids can easily be embedded in BVHs by enclosing bounding volumes around the polygons (e.g., triangles).
86
-
Partitioning and bounding volume constructors are provided in :file:`Source/EBGeometry_DCEL_BVH.hpp`.
89
+
Partitioning and bounding volume constructors are provided in :file:`Source/EBGeometry_MeshDistanceFunctions.hpp`.
The input functions to ``buildDepthFirst`` and ``buildBreadthFirst`` are as follows:
40
40
41
-
#. ``StopFunction`` determines if the node should be split or not. If it returns true, the node will *not* be split.
41
+
#. ``StopFunction`` determines if the node should be split or not. If it returns true, the node will *not* be split.
42
42
#. ``MetaConstructor`` constructs meta-data in the child nodes. This can/should include the physical corners of the node, but this is not a requirement.
43
43
#. ``DataConstructor`` constructs data in the child node. This can e.g. be a partitioning of the parent data.
Copy file name to clipboardexpand all lines: Docs/Sphinx/source/ImplemVec.rst
+2-2
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Vector types
4
4
============
5
5
6
-
EBGeometry implements its own 2D and 3D vector types ``Vec2T`` and ``Vec3T``.
6
+
``EBGeometry`` implements its own 2D and 3D vector types ``Vec2T`` and ``Vec3T``.
7
7
8
8
``Vec2T`` is a two-dimensional Cartesian vector.
9
9
It is templated as
@@ -19,7 +19,7 @@ It is templated as
19
19
};
20
20
}
21
21
22
-
Most of EBGeometry is written as three-dimensional code, but ``Vec2T`` is needed for DCEL functionality when determining if a point projects onto the interior or exterior of a planar polygon, see :ref:`Chap:DCEL`.
22
+
Most of ``EBGeometry`` is written as three-dimensional code, but ``Vec2T`` is needed for DCEL functionality when determining if a point projects onto the interior or exterior of a planar polygon, see :ref:`Chap:DCEL`.
23
23
``Vec2T`` has "most" common arithmetic operators like the dot product, length, multiplication operators and so on.
24
24
25
25
``Vec3T`` is a three-dimensional Cartesian vector type with precision ``T``.
0 commit comments