![]() |
OpenLB 1.8.1
|
#include <stlReader.h>
Inheritance diagram for olb::STLreader< T >:
Collaboration diagram for olb::STLreader< T >:Public Member Functions | |
| STLreader (const std::string fName, T voxelSize, T stlSize=1, RayMode method=RayMode::FastRayZ, bool verbose=false, T overlap=0., T max=0.) | |
| Constructs a new STLreader from a file. | |
| STLreader (const std::vector< std::vector< T > > meshPoints, T voxelSize, T stlSize=1, RayMode method=RayMode::FastRayZ, bool verbose=false, T overlap=0., T max=0.) | |
| Constructs a new STLreader from a file. | |
| ~STLreader () override | |
| bool | operator() (bool output[], const T input[]) override |
| Returns whether node is inside or not. | |
| bool | isInsideRootTree (const T input[]) |
| Returns whether node is inside the top-level octree or not. | |
| Vector< T, 3 > | closestPointInBoundingBox (const Vector< T, 3 > &input) |
Returns the closest point in the bounding box If input is already inside, then it returns input. | |
| bool | distance (T &distance, const Vector< T, 3 > &origin, const Vector< T, 3 > &direction, int iC=-1) override |
| Computes distance to closest triangle intersection. | |
| T | distanceToClosestSurfacePoint (Vector< T, 3 > physR) |
| Vector< T, 3 > | normalAtClosestSurfacePoint (Vector< T, 3 > physR) |
| T | signedDistance (const Vector< T, 3 > &input) override |
| Computes signed distance to closest triangle in direction of the surface normal Using the cached information (faster, but less accurate) | |
| T | signedDistanceExact (const Vector< T, 3 > &input) override |
| Computes exact signed distance to closest triangle in direction of the surface normal Much slower, but more accurate. | |
| template<SignMode SIGNMODE> | |
| T | signedDistance (const Vector< T, 3 > &input) |
| Computes signed distance to closest triangle in direction of the surface normal. | |
| Vector< T, 3 > | surfaceNormal (const Vector< T, 3 > &pos, const T meshSize=0) override |
| Finds and returns normal of the closest surface (triangle) Using the cached information (faster, but less accurate) | |
| Vector< T, 3 > | surfaceNormalExact (const Vector< T, 3 > &pos, const T meshSize=0) override |
| Finds and returns normal of the closest surface (triangle) Much slower, but more accurate. | |
| template<SignMode SIGNMODE> | |
| Vector< T, 3 > | surfaceNormal (const Vector< T, 3 > &pos, const T meshSize=0) |
| Finds and returns normal of the closest surface (triangle) | |
| void | print () |
| Prints console output. | |
| void | writeSTL (std::string stlName="") |
| Writes STL mesh in Si units. | |
| void | writeOctree () |
| Writes Octree. | |
| void | setNormalsOutside () |
| Rearranges normals of triangles to point outside of geometry. | |
| void | setBoundaryInsideNodes () |
| Every octree leaf intersected by the STL will be part of the inside nodes. | |
| Octree< T > * | getTree () const |
| Returns tree. | |
| STLmesh< T > & | getMesh () |
| Returns mesh. | |
| STLreader (const std::string fName, T voxelSize, T stlSize=1, RayMode method=RayMode::FastRayZ, bool verbose=false, T overlap=0., T max=0.) | |
| Constructs a new STLreader from a file. | |
| STLreader (const std::vector< std::vector< T > > meshPoints, T voxelSize, T stlSize=1, RayMode method=RayMode::FastRayZ, bool verbose=false, T overlap=0., T max=0.) | |
| Constructs a new STLreader from a file. | |
| ~STLreader () override | |
| bool | operator() (bool output[], const T input[]) override |
| Returns whether node is inside or not. | |
| bool | isInsideRootTree (const T input[]) |
| Returns whether node is inside the top-level octree or not. | |
| Vector< T, 3 > | closestPointInBoundingBox (const Vector< T, 3 > &input) |
Returns the closest point in the bounding box If input is already inside, then it returns input. | |
| bool | distance (T &distance, const Vector< T, 3 > &origin, const Vector< T, 3 > &direction, int iC=-1) override |
| Computes distance to closest triangle intersection. | |
| T | signedDistance (const Vector< T, 3 > &input) override |
| Computes signed distance to closest triangle in direction of the surface normal Using the cached information (faster, but less accurate) | |
| T | signedDistanceExact (const Vector< T, 3 > &input) override |
| Computes exact signed distance to closest triangle in direction of the surface normal Much slower, but more accurate. | |
| template<SignMode SIGNMODE> | |
| T | signedDistance (const Vector< T, 3 > &input) |
| Computes signed distance to closest triangle in direction of the surface normal. | |
| Vector< T, 3 > | surfaceNormal (const Vector< T, 3 > &pos, const T meshSize=0) override |
| Finds and returns normal of the closest surface (triangle) Using the cached information (faster, but less accurate) | |
| Vector< T, 3 > | surfaceNormalExact (const Vector< T, 3 > &pos, const T meshSize=0) override |
| Finds and returns normal of the closest surface (triangle) Much slower, but more accurate. | |
| template<SignMode SIGNMODE> | |
| Vector< T, 3 > | surfaceNormal (const Vector< T, 3 > &pos, const T meshSize=0) |
| Finds and returns normal of the closest surface (triangle) | |
| void | print () |
| Prints console output. | |
| void | writeSTL (std::string stlName="") |
| Writes STL mesh in Si units. | |
| void | writeOctree () |
| Writes Octree. | |
| void | setNormalsOutside () |
| Rearranges normals of triangles to point outside of geometry. | |
| void | setBoundaryInsideNodes () |
| Every octree leaf intersected by the STL will be part of the inside nodes. | |
| Octree< T > * | getTree () const |
| Returns tree. | |
| STLmesh< T > & | getMesh () |
| Returns mesh. | |
Public Member Functions inherited from olb::IndicatorF3D< T > | |
| virtual Vector< S, 3 > & | getMin () |
| virtual Vector< S, 3 > & | getMax () |
| virtual bool | distance (S &distance, const Vector< S, 3 > &origin, S precision, const Vector< S, 3 > &direction) |
| virtual bool | distance (S &distance, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, S precision, S pitch) |
| virtual bool | distance (S &distance, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, int iC=-1) |
| virtual bool | distance (S &distance, const Vector< S, 3 > &origin) |
| virtual bool | distance (S &distance, const S input[]) |
| virtual bool | normal (Vector< S, 3 > &normal, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, int iC=-1) |
| returns true and the normal if there was one found for an given origin and direction | |
| virtual bool | rotOnAxis (Vector< S, 3 > &vec_rot, const Vector< S, 3 > &vec, const Vector< S, 3 > &axis, S &theta) |
| Rotate vector around axis by angle theta. | |
| virtual bool | operator() (bool output[1], const S input[3]) |
| Returns true if input is inside the indicator. | |
| virtual S | signedDistance (const Vector< S, 3 > &input) |
| Returns signed distance to the nearest point on the indicator surface Uses the fastest, but potentially less accurate method. | |
| virtual S | signedDistanceExact (const Vector< S, 3 > &input) |
| Returns exact signed distance to the nearest point on the indicator surface Uses the most accurate, but slower method This is usually sufficient for fluid-wall interactions. | |
| virtual Vector< S, 3 > | surfaceNormal (const Vector< S, 3 > &pos, const S meshSize) |
| Return surface normal Uses the fastest, but potentially less accurate method. | |
| virtual Vector< S, 3 > | surfaceNormalExact (const Vector< S, 3 > &pos, const S meshSize) |
| Return surface normal Uses the most accurate, but slower method This is likely necessary for particle-wall interactions. | |
| Vector< S, 3 > | surfaceNormal (const Vector< S, 3 > &pos, const S meshSize, std::function< Vector< S, 3 >(const Vector< S, 3 > &)> transformPos) |
| Return surface normal after possible translation and rotation Uses the fastest, but potentially less accurate method. | |
| Vector< S, 3 > | surfaceNormalExact (const Vector< S, 3 > &pos, const S meshSize, std::function< Vector< S, 3 >(const Vector< S, 3 > &)> transformPos) |
| Return surface normal after possible translation and rotation Uses the fastest, but potentially less accurate method. | |
| bool | isInsideBox (Vector< S, 3 > point) |
Returns true if point is inside a cube with corners _myMin and _myMax | |
| virtual Vector< S, 3 > | getSample (const std::function< S()> &randomness) const |
Public Member Functions inherited from olb::GenericF< bool, S > | |
| virtual | ~GenericF ()=default |
| int | getSourceDim () const |
| read only access to member variable _m | |
| int | getTargetDim () const |
| read only access to member variable _n | |
| std::string & | getName () |
| read and write access to name | |
| std::string const & | getName () const |
| read only access to name | |
| virtual bool | operator() (bool output[], const S input[])=0 |
| has to be implemented for 'every' derived class | |
| bool | operator() (bool output[]) |
| wrapper that call the pure virtual operator() (T output[], const S input[]) from above | |
| bool | operator() (bool output[], S input0) |
| bool | operator() (bool output[], S input0, S input1) |
| bool | operator() (bool output[], S input0, S input1, S input2) |
| bool | operator() (bool output[], S input0, S input1, S input2, S input3) |
Additional Inherited Members | |
Public Types inherited from olb::GenericF< bool, S > | |
| using | targetType |
| using | sourceType |
Public Attributes inherited from olb::GenericF< bool, S > | |
| std::shared_ptr< GenericF< bool, S > > | _ptrCalcC |
| memory management, frees resouces (calcClass) | |
Protected Member Functions inherited from olb::IndicatorF3D< T > | |
| IndicatorF3D () | |
Protected Member Functions inherited from olb::GenericF< bool, S > | |
| GenericF (int targetDim, int sourceDim) | |
Protected Attributes inherited from olb::IndicatorF3D< T > | |
| Vector< S, 3 > | _myMin |
| Vector< S, 3 > | _myMax |
Definition at line 240 of file STLreaderForSubgridParticleWallContact.h.
| olb::STLreader< T >::STLreader | ( | const std::string | fName, |
| T | voxelSize, | ||
| T | stlSize = 1, | ||
| RayMode | method = RayMode::FastRayZ, | ||
| bool | verbose = false, | ||
| T | overlap = 0., | ||
| T | max = 0. ) |
Constructs a new STLreader from a file.
| fName | The STL file name |
| voxelSize | Voxelsize in SI units |
| stlSize | Conversion factor for STL (e.g. STL in mm stlSize=10^-3) |
| method | Choose indication method 0: fast, less stable 1: slow, more stable (for untight STLs) |
| verbose | Get additional information. |
Find center of tree and move by _voxelSize/4.
Create tree
Compute _myMin, _myMax such that they are the smallest (greatest) Voxel inside the STL.
Indicate nodes of the tree. (Inside/Outside)
Find center of tree and move by _voxelSize/4.
Create tree
Compute _myMin, _myMax such that they are the smallest (greatest) Voxel inside the STL.
Indicate nodes of the tree. (Inside/Outside)
Definition at line 848 of file stlReader.hh.
References olb::IndicatorF3D< T >::_myMax, olb::IndicatorF3D< T >::_myMin, olb::DoubleRay, olb::FastRayX, olb::FastRayY, olb::GenericF< bool, S >::getName(), olb::max(), olb::util::max(), olb::util::nearZero(), olb::util::pow(), olb::STLreader< T >::print(), and olb::Robust.
Here is the call graph for this function:| olb::STLreader< T >::STLreader | ( | const std::vector< std::vector< T > > | meshPoints, |
| T | voxelSize, | ||
| T | stlSize = 1, | ||
| RayMode | method = RayMode::FastRayZ, | ||
| bool | verbose = false, | ||
| T | overlap = 0., | ||
| T | max = 0. ) |
Constructs a new STLreader from a file.
| fName | The STL file name |
| voxelSize | Voxelsize in SI units |
| stlSize | Conversion factor for STL (e.g. STL in mm stlSize=10^-3) |
| method | Choose indication method 0: fast, less stable 1: slow, more stable (for untight STLs) |
| verbose | Get additional information. |
Find center of tree and move by _voxelSize/4.
Create tree
Compute _myMin, _myMax such that they are the smallest (greatest) Voxel inside the STL.
Find center of tree and move by _voxelSize/4.
Create tree
Compute _myMin, _myMax such that they are the smallest (greatest) Voxel inside the STL.
Definition at line 929 of file stlReader.hh.
References olb::IndicatorF3D< T >::_myMax, olb::IndicatorF3D< T >::_myMin, olb::DoubleRay, olb::FastRayX, olb::FastRayY, olb::GenericF< bool, S >::getName(), olb::max(), olb::util::max(), olb::util::nearZero(), olb::util::pow(), olb::STLreader< T >::print(), olb::Robust, and olb::STLreader< T >::setNormalsOutside().
Here is the call graph for this function:
|
override |
Definition at line 1023 of file stlReader.hh.
| olb::STLreader< T >::STLreader | ( | const std::string | fName, |
| T | voxelSize, | ||
| T | stlSize = 1, | ||
| RayMode | method = RayMode::FastRayZ, | ||
| bool | verbose = false, | ||
| T | overlap = 0., | ||
| T | max = 0. ) |
Constructs a new STLreader from a file.
| fName | The STL file name |
| voxelSize | Voxelsize in SI units |
| stlSize | Conversion factor for STL (e.g. STL in mm stlSize=10^-3) |
| method | Choose indication method 0: fast, less stable 1: slow, more stable (for untight STLs) |
| verbose | Get additional information. |
| olb::STLreader< T >::STLreader | ( | const std::vector< std::vector< T > > | meshPoints, |
| T | voxelSize, | ||
| T | stlSize = 1, | ||
| RayMode | method = RayMode::FastRayZ, | ||
| bool | verbose = false, | ||
| T | overlap = 0., | ||
| T | max = 0. ) |
Constructs a new STLreader from a file.
| fName | The STL file name |
| voxelSize | Voxelsize in SI units |
| stlSize | Conversion factor for STL (e.g. STL in mm stlSize=10^-3) |
| method | Choose indication method 0: fast, less stable 1: slow, more stable (for untight STLs) |
| verbose | Get additional information. |
|
override |
| Vector< T, 3 > olb::STLreader< T >::closestPointInBoundingBox | ( | const Vector< T, 3 > & | input | ) |
Returns the closest point in the bounding box If input is already inside, then it returns input.
Definition at line 1383 of file stlReader.hh.
References olb::util::max(), and olb::util::min().
Here is the call graph for this function:| Vector< T, 3 > olb::STLreader< T >::closestPointInBoundingBox | ( | const Vector< T, 3 > & | input | ) |
Returns the closest point in the bounding box If input is already inside, then it returns input.
|
override |
Computes distance to closest triangle intersection.
Definition at line 1396 of file stlReader.hh.
References olb::Octree< T >::closestIntersection(), olb::util::fabs(), olb::Octree< T >::find(), olb::Octree< T >::intersectRayNode(), olb::norm(), and olb::normalize().
Here is the call graph for this function:
|
override |
Computes distance to closest triangle intersection.
|
inline |
Definition at line 356 of file stlReader.h.
References olb::norm().
Here is the call graph for this function:
|
inline |
Returns mesh.
Definition at line 439 of file stlReader.h.
Here is the caller graph for this function:
|
inline |
Returns mesh.
Definition at line 421 of file STLreaderForSubgridParticleWallContact.h.
|
inline |
|
inline |
Returns tree.
Definition at line 414 of file STLreaderForSubgridParticleWallContact.h.
| bool olb::STLreader< T >::isInsideRootTree | ( | const T | input[] | ) |
Returns whether node is inside the top-level octree or not.
Definition at line 1373 of file stlReader.hh.
| bool olb::STLreader< T >::isInsideRootTree | ( | const T | input[] | ) |
Returns whether node is inside the top-level octree or not.
|
inline |
Definition at line 372 of file stlReader.h.
References olb::norm().
Here is the call graph for this function:
|
override |
Returns whether node is inside or not.
Definition at line 1361 of file stlReader.hh.
|
override |
Returns whether node is inside or not.
| void olb::STLreader< T >::print | ( | ) |
Prints console output.
Definition at line 1821 of file stlReader.hh.
Here is the caller graph for this function:| void olb::STLreader< T >::print | ( | ) |
Prints console output.
| void olb::STLreader< T >::setBoundaryInsideNodes | ( | ) |
Every octree leaf intersected by the STL will be part of the inside nodes.
Artificially enlarges all details that would otherwise be cut off by the voxelSize.
Definition at line 1872 of file stlReader.hh.
| void olb::STLreader< T >::setBoundaryInsideNodes | ( | ) |
Every octree leaf intersected by the STL will be part of the inside nodes.
Artificially enlarges all details that would otherwise be cut off by the voxelSize.
| void olb::STLreader< T >::setNormalsOutside | ( | ) |
Rearranges normals of triangles to point outside of geometry.
Definition at line 1850 of file stlReader.hh.
References olb::util::sqrt().
Here is the call graph for this function:
Here is the caller graph for this function:| void olb::STLreader< T >::setNormalsOutside | ( | ) |
Rearranges normals of triangles to point outside of geometry.
| T olb::STLreader< T >::signedDistance | ( | const Vector< T, 3 > & | input | ) |
Computes signed distance to closest triangle in direction of the surface normal.
Definition at line 1758 of file stlReader.hh.
References olb::Vector< T, Size >::data(), olb::util::min(), olb::norm(), olb::norm_squared(), and olb::util::sqrt().
Here is the call graph for this function:| T olb::STLreader< T >::signedDistance | ( | const Vector< T, 3 > & | input | ) |
Computes signed distance to closest triangle in direction of the surface normal.
|
override |
Computes signed distance to closest triangle in direction of the surface normal Using the cached information (faster, but less accurate)
Definition at line 1742 of file stlReader.hh.
|
override |
Computes signed distance to closest triangle in direction of the surface normal Using the cached information (faster, but less accurate)
|
override |
Computes exact signed distance to closest triangle in direction of the surface normal Much slower, but more accurate.
Definition at line 1748 of file stlReader.hh.
|
override |
Computes exact signed distance to closest triangle in direction of the surface normal Much slower, but more accurate.
| Vector< T, 3 > olb::STLreader< T >::surfaceNormal | ( | const Vector< T, 3 > & | pos, |
| const T | meshSize = 0 ) |
Finds and returns normal of the closest surface (triangle)
Definition at line 1815 of file stlReader.hh.
| Vector< T, 3 > olb::STLreader< T >::surfaceNormal | ( | const Vector< T, 3 > & | pos, |
| const T | meshSize = 0 ) |
Finds and returns normal of the closest surface (triangle)
|
override |
Finds and returns normal of the closest surface (triangle) Using the cached information (faster, but less accurate)
Definition at line 1802 of file stlReader.hh.
|
override |
Finds and returns normal of the closest surface (triangle) Using the cached information (faster, but less accurate)
|
override |
Finds and returns normal of the closest surface (triangle) Much slower, but more accurate.
Definition at line 1808 of file stlReader.hh.
|
override |
Finds and returns normal of the closest surface (triangle) Much slower, but more accurate.
| void olb::STLreader< T >::writeOctree | ( | ) |
| void olb::STLreader< T >::writeOctree | ( | ) |
Writes Octree.
| void olb::STLreader< T >::writeSTL | ( | std::string | stlName = "" | ) |
Writes STL mesh in Si units.
Definition at line 1839 of file stlReader.hh.
| void olb::STLreader< T >::writeSTL | ( | std::string | stlName = "" | ) |
Writes STL mesh in Si units.