![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Miscellaneous useful functions (geometrical elements handling) More...
#include <CVMiscTools.h>


Static Public Member Functions | |
| static void | EnlargeBox (CCVector3 &dimMin, CCVector3 &dimMax, double coef) |
| Proportionally enlarges a 3D box. More... | |
| static void | MakeMinAndMaxCubical (CCVector3 &dimMin, CCVector3 &dimMax, double enlargeFactor=0.01) |
| Transforms a 3D box into a 3D cube. More... | |
| static void | ComputeBaseVectors (const CCVector3 &N, CCVector3 &X, CCVector3 &Y) |
| Computes base vectors for a given 3D plane. More... | |
| static void | ComputeBaseVectors (const CCVector3d &N, CCVector3d &X, CCVector3d &Y) |
| Computes base vectors for a given 3D plane - double version. More... | |
| static bool | TriBoxOverlap (const CCVector3 &boxcenter, const CCVector3 &boxhalfsize, const CCVector3 *triverts[3]) |
| Ovelap test between a 3D box and a triangle. More... | |
| static bool | TriBoxOverlapd (const CCVector3d &boxcenter, const CCVector3d &boxhalfsize, const CCVector3d triverts[3]) |
| Ovelap test between a 3D box and a triangle (double version) More... | |
Miscellaneous useful functions (geometrical elements handling)
Definition at line 16 of file CVMiscTools.h.
Computes base vectors for a given 3D plane.
Determines at least two orthogonal vectors perpendicular to a third one
| [in] | N | a non null vector |
| [out] | X | the first vector (a 3 coordinates array to be updated by the algorithm) |
| [out] | Y | the second vector (a 3 coordinates array to be updated by the algorithm) |
Definition at line 370 of file CVMiscTools.cpp.
References Vector3Tpl< Type >::cross(), Vector3Tpl< Type >::normalize(), Vector3Tpl< Type >::orthogonal(), and X.
Referenced by ccDBRoot::alignCameraWithEntity(), define_CCMiscTools(), and cloudViewer::Neighbourhood::projectPointsOn2DPlane().
|
static |
Computes base vectors for a given 3D plane - double version.
Determines at least two orthogonal vectors perpendicular to a third one
| [in] | N | a non null vector |
| [out] | X | the first vector (a 3 coordinates array to be updated by the algorithm) |
| [out] | Y | the second vector (a 3 coordinates array to be updated by the algorithm) |
Definition at line 384 of file CVMiscTools.cpp.
References Vector3Tpl< Type >::cross(), Vector3Tpl< Type >::normalize(), Vector3Tpl< Type >::orthogonal(), and X.
Proportionally enlarges a 3D box.
| dimMin | the upper-left corner of the box |
| dimMax | the lower-right corner of the box |
| coef | the enlargement coefficient (1.1 <-> +10%) |
Definition at line 114 of file CVMiscTools.cpp.
Referenced by define_CCMiscTools().
|
static |
Transforms a 3D box into a 3D cube.
The cube dimensions will be equal to the largest box dimension.
| dimMin | the upper-left corner of the rectangle |
| dimMax | the lower-right corner of the rectangle |
| enlargeFactor | the resulting box can be automatically enlarged if this parameter is greater than 0 |
Definition at line 88 of file CVMiscTools.cpp.
References max(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by cloudViewer::DistanceComputationTools::computeCloud2MeshDistances(), define_CCMiscTools(), cloudViewer::DistanceComputationTools::synchronizeOctrees(), and cloudViewer::DgmOctree::updateMinAndMaxTables().
|
static |
Ovelap test between a 3D box and a triangle.
| boxcenter | the box center |
| boxhalfsize | the box half dimensions |
| triverts | the 3 triangle vertices |
Definition at line 127 of file CVMiscTools.cpp.
References abs(), AXISTEST_X01, AXISTEST_X2, AXISTEST_Y02, AXISTEST_Y1, AXISTEST_Z0, AXISTEST_Z12, FINDMINMAX, Tuple3Tpl< Type >::u, Vector3Tpl< PointCoordinateType >::vcross(), Vector3Tpl< PointCoordinateType >::vdot(), Vector3Tpl< PointCoordinateType >::vsubstract(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by qVoxFallProcess::Compute(), define_CCMiscTools(), cloudViewer::DistanceComputationTools::intersectMeshWithOctree(), and cloudViewer::Grid3D< Type >::intersectWith().
|
static |
Ovelap test between a 3D box and a triangle (double version)
| boxcenter | the box center |
| boxhalfsize | the box half dimensions |
| triverts | the 3 triangle vertices |
Definition at line 249 of file CVMiscTools.cpp.
References abs(), AXISTEST_X01, AXISTEST_X2, AXISTEST_Y02, AXISTEST_Y1, AXISTEST_Z0, AXISTEST_Z12, FINDMINMAX, Tuple3Tpl< Type >::u, Vector3Tpl< double >::vcross(), Vector3Tpl< double >::vdot(), Vector3Tpl< double >::vsubstract(), Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by define_CCMiscTools(), and cloudViewer::ManualSegmentationTools::segmentMeshWithAABox().