CCCoreLib 31 May 2022
CloudCompare Core algorithms
|
Miscellaneous useful functions (geometrical elements handling) More...
#include <CCMiscTools.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) |
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)
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) |
|
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) |
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%) |
|
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 |
|
static |
Ovelap test between a 3D box and a triangle.
boxcenter | the box center |
boxhalfsize | the box half dimensions |
triverts | the 3 triangle vertices |
|
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 |