bestfitobb.h
Go to the documentation of this file.
1 #ifndef BEST_FIT_OBB_H
2 
3 #define BEST_FIT_OBB_H
4 
61 // compute the 'best fit' oriented bounding box of an input point cloud by doing an exhaustive search.
62 // it spins the point cloud around searching for the minimal volume. It keeps narrowing down until
63 // it fails to find a better fit. The only dependency is on 'double_math'
64 //
65 // The inputs are:
66 //
67 // vcount : number of input vertices in the point cloud.
68 // points : a pointer to the first vertex.
69 // pstride : The stride between each point measured in bytes.
70 //
71 // The outputs are:
72 //
73 // sides : The length of the sides of the OBB as X, Y, Z distance.
74 // matrix : A pointer to a 4x4 matrix. This will contain the 3x3 rotation and the translation component.
75 // pos : The center of the OBB
76 // quat : The orientation of the OBB expressed as quaternion in the form of X,Y,Z,W
77 //
78 //
79 // Please email bug fixes or improvements to John W. Ratcliff at mailto:jratcliff@infiniplex.net
80 //
81 // If you find this source code useful donate a couple of bucks to my kid's fund raising website at
82 // www.amillionpixels.us
83 //
84 // More snippets at: www.codesuppository.com
85 //
86 
87 namespace ConvexDecomposition
88 {
89 
90 void computeBestFitOBB(unsigned int vcount,const double *points,unsigned int pstride,double *sides,double *matrix);
91 void computeBestFitOBB(unsigned int vcount,const double *points,unsigned int pstride,double *sides,double *pos,double *quat);
92 void computeBestFitABB(unsigned int vcount,const double *points,unsigned int pstride,double *sides,double *pos);
93 
94 
95 void computeBestFitOBB(unsigned int vcount,const float *points,unsigned int pstride,float *sides,float *pos,float *quat); // the float version of the routine.
96 void computeBestFitABB(unsigned int vcount,const float *points,unsigned int pstride,float *sides,float *pos);
97 
98 };
99 
100 #endif
ConvexDecomposition::computeBestFitOBB
void computeBestFitOBB(unsigned int vcount, const double *points, unsigned int pstride, double *sides, double *matrix)
Definition: bestfitobb.cpp:142
ConvexDecomposition
Definition: bestfit.cpp:75
ConvexDecomposition::computeBestFitABB
void computeBestFitABB(unsigned int vcount, const double *points, unsigned int pstride, double *sides, double *pos)
Definition: bestfitobb.cpp:242


convex_decomposition
Author(s): John W. Ratcliff
autogenerated on Wed Mar 2 2022 00:04:59