gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Class to project 3D points on a triangulated surface. If a parametrization is available, the UV are interpolated at the triangle projection. Not associated to the mesh elements of a GEntity, so it can be used on mesh sub-patches or on background mesh. More...
#include <meshOctreeLibOL.h>
Public Member Functions | |
SurfaceProjector () | |
SurfaceProjector (GFace *gf) | |
SurfaceProjector (SurfaceProjector const &)=delete | |
SurfaceProjector & | operator= (SurfaceProjector const &)=delete |
~SurfaceProjector () | |
bool | initialize (GFace *gf, const std::vector< MTriangle * > &triangles, bool useCADStl=false) |
Fill the triangles and uvs from the triangles, then build the octree. Overwrite existing triangulation/octree if there is one. More... | |
void | clear () |
Clear the triangulation and delete the octree. More... | |
bool | setAnalyticalProjection (GFace *gf) |
The SurfaceProjector can project with an analytical formula instead of a triangulation and a octree Supported shapes: Sphere. More... | |
GPoint | closestPoint (const double query[3], bool evalOnCAD=false, bool projectOnCAD=false) const |
Get the query closest point on the triangulated surface. More... | |
Public Attributes | |
GFace * | gf |
Protected Attributes | |
std::vector< std::array< double, 3 > > | points |
std::vector< std::array< int32_t, 3 > > | triangles |
std::vector< std::array< std::array< double, 2 >, 3 > > | triangle_uvs |
std::vector< bool > | triangle_no_uv_eval |
int64_t | OctIdx |
bool | useAnalyticalFormula = false |
GFace::GeomType | analyticalShape = GFace::GeomType::Unknown |
std::array< double, 10 > | analyticalParameters |
Class to project 3D points on a triangulated surface. If a parametrization is available, the UV are interpolated at the triangle projection. Not associated to the mesh elements of a GEntity, so it can be used on mesh sub-patches or on background mesh.
Definition at line 24 of file meshOctreeLibOL.h.
|
inline |
Definition at line 26 of file meshOctreeLibOL.h.
SurfaceProjector::SurfaceProjector | ( | GFace * | gf | ) |
|
delete |
SurfaceProjector::~SurfaceProjector | ( | ) |
void SurfaceProjector::clear | ( | ) |
Clear the triangulation and delete the octree.
Definition at line 329 of file meshOctreeLibOL.cpp.
Referenced by initialize(), and ~SurfaceProjector().
GPoint SurfaceProjector::closestPoint | ( | const double | query[3], |
bool | evalOnCAD = false , |
||
bool | projectOnCAD = false |
||
) | const |
Get the query closest point on the triangulated surface.
query[3] | 3D coordinates of the query point |
evalOnCAD | If param available, evaluate the face CAD mapping at the interpolated UV |
projectOnCAD | If param available, call closestPoint from the CAD geometry engine, with the interpolated UV as initial guess |
Definition at line 567 of file meshOctreeLibOL.cpp.
bool SurfaceProjector::initialize | ( | GFace * | gf, |
const std::vector< MTriangle * > & | triangles, | ||
bool | useCADStl = false |
||
) |
Fill the triangles and uvs from the triangles, then build the octree. Overwrite existing triangulation/octree if there is one.
gf | The CAD face containing the triangles |
triangles | The triangles used to build the triangulated geometry support |
useCADStl | If true, build and use the STL of the CAD face |
Definition at line 364 of file meshOctreeLibOL.cpp.
Referenced by SurfaceProjector().
|
delete |
bool SurfaceProjector::setAnalyticalProjection | ( | GFace * | gf | ) |
The SurfaceProjector can project with an analytical formula instead of a triangulation and a octree Supported shapes: Sphere.
gf | The face containing the analytical parameters |
Definition at line 343 of file meshOctreeLibOL.cpp.
|
protected |
Definition at line 88 of file meshOctreeLibOL.h.
Referenced by closestPoint(), and setAnalyticalProjection().
|
protected |
Definition at line 87 of file meshOctreeLibOL.h.
Referenced by closestPoint(), and setAnalyticalProjection().
GFace* SurfaceProjector::gf |
Definition at line 76 of file meshOctreeLibOL.h.
Referenced by closestPoint(), initialize(), setAnalyticalProjection(), and SurfaceProjector().
|
protected |
Definition at line 83 of file meshOctreeLibOL.h.
Referenced by clear(), closestPoint(), and initialize().
|
protected |
Definition at line 79 of file meshOctreeLibOL.h.
Referenced by clear(), closestPoint(), and initialize().
|
protected |
Definition at line 82 of file meshOctreeLibOL.h.
Referenced by closestPoint(), and initialize().
|
protected |
Definition at line 81 of file meshOctreeLibOL.h.
Referenced by clear(), closestPoint(), and initialize().
|
protected |
Definition at line 80 of file meshOctreeLibOL.h.
Referenced by clear(), closestPoint(), initialize(), and SurfaceProjector().
|
protected |
Definition at line 86 of file meshOctreeLibOL.h.
Referenced by closestPoint(), and setAnalyticalProjection().