|
OpenBEM
Open-source framework for electromagnetic simulation with the boundary element method.
|
Geometry operations class. More...
#include <operations.hpp>
Geometry operations class.
| dim | - The dimension of the geometry operation class (1, 2, or 3). |
Definition at line 46 of file operations.hpp.
|
static |
Transforms polar (2D) or spherical (3D) coordinates to Cartesian.
| [in] | points | - Polar ( \(r\), \(\phi\)) or spherical ( \(r\), \(\phi\), \(\theta\)) coordinates. |
Definition at line 34 of file operations.cpp.
|
static |
Transforms a vector field in Cartesian space to polar (2D) or spherical (3D) space.
| [in] | points | - Cartesian coordinates at which the field is defined. |
| [in] | field | - Vector field values at the given coordinates. |
Definition at line 53 of file operations.cpp.
|
static |
Transforms the given coordinates to a new coordinate system defined by a new origin and orthogonal unit vectors.
| [in] | v_in | - Coordinates in the original system. |
| [in] | new_origin | - Origin of the new system with respect to the original system. |
| [in] | new_uvw | - Orthogonal unit vectors for the new system with respect to the original system. |
Definition at line 103 of file operations.cpp.
|
static |
Returns the angles between pairs of vectors in radians.
| [in] | v1 | - First set of vectors. |
| [in] | v2 | - Second set of vectors. |
Definition at line 114 of file operations.cpp.
|
static |
Returns the directional angles between pairs of vectors in a right-hand system where counter-clockwise angles are positive.
| [in] | v1 | - First set of vectors. |
| [in] | v2 | - Second set of vectors. |
Definition at line 136 of file operations.cpp.
|
static |
Returns the number of vertices common or coinciding between two Triangle objects.
| [in] | triangle1 | - First triangle. |
| [in] | triangle2 | - Second triangle. |
| [in] | tol | - Comparison tolerance to test if vertices coincide (optional). |
Definition at line 173 of file operations.cpp.
|
static |
Returns the number and indices of vertices common or coinciding between two Triangle objects.
| [out] | idx1 | - Indices of common vertices for the first triangle. |
| [out] | idx2 | - Indices of common vertices for the second triangle. |
| [in] | triangle1 | - First triangle. |
| [in] | triangle2 | - Second triangle. |
| [in] | tol | - Comparison tolerance to test if vertices coincide (optional). |
For N common vertices, the first N entries of idx1 and idx2 are populated with common indices of the vertices; the rest are dummy values filled with 10. If there are no common vertices, then idx1 and idx2 will contain 10 in each entry. In the case that one or more vertex does coincide, then the entries of idx1 and idx2 are ordered so that there is a one-to-one correspondence, e.g., the idx1[0] vertex of triangle1 coincides with the idx2[0] vertex of triangle2.
Definition at line 201 of file operations.cpp.
|
static |
Checks if the normal vectors of two triangles are (anti-)parallel.
| [in] | triangle1 | - First Triangle. |
| [in] | triangle2 | - Second Triangle. |
| [in] | tol | - Comparison tolerance (optional). |
Definition at line 235 of file operations.cpp.
|
static |
Checks if the normal vectors of two triangles are perpendicular.
| [in] | triangle1 | - First Triangle. |
| [in] | triangle2 | - Second Triangle. |
| [in] | tol | - Comparison tolerance (optional). |
Definition at line 251 of file operations.cpp.
|
static |
Checks if two triangles are coplanar.
| [in] | triangle1 | - First Triangle. |
| [in] | triangle2 | - Second Triangle. |
| [in] | tol | - Comparison tolerance (optional). |
Definition at line 265 of file operations.cpp.
|
static |
Checks if two edges are (anti-)parallel.
Definition at line 283 of file operations.cpp.
|
static |
Checks if two edges are perpendicular.
Definition at line 298 of file operations.cpp.
|
static |
Checks if a point is inside a polygon using ray casting.
| [in] | point | - Point to test. |
| [in] | polygon | - Polygon vertices. |
| [in] | tol | - Relative tolerance for comparison (optional). |
Reference: https://www.eecs.umich.edu/courses/eecs380/HANDOUTS/PROJ2/InsidePoly.html
Definition at line 311 of file operations.cpp.