![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cSphere.h>
Public Member Functions | |
cSphereWork () | |
void | InitWork () |
void | AddVertex (const cVector3f &vTmp) |
AddVertex For each vertex in the model. 2 passes. More... | |
void | InitPass2 () |
void | AddVertices1 (const cVector3f *pVerts, UINT dwNumVertices, size_t dwStride) |
void | AddVertices2 (const cVector3f *pVerts, UINT dwNumVertices, size_t dwStride) |
cBounds3f | get_Box () const |
cSphere2 | get_Sphere () const |
working data set to compute a tight sphere on some models vertices's. 2 pass. (DVALUE_t = float)
GrayLib::cSphereWork::cSphereWork | ( | ) |
similar to D3DXComputeBoundingSphere An Efficient Bounding Sphere by Jack Ritter from "Graphics Gems", Academic Press, 1990
Routine to calculate tight bounding sphere over a set of points in 3D This contains the routine find_bounding_sphere(), the struct definition, and the globals used for parameters. The ABS() of all coordinates must be < k_FLT_MAX2 Code written by Jack Ritter and Lyle Rains.
void GrayLib::cSphereWork::AddVertex | ( | const cVector3f & | vTmp | ) |
AddVertex For each vertex in the model. 2 passes.
For each vertex in the model.
void GrayLib::cSphereWork::AddVertices1 | ( | const cVector3f * | pVerts, |
UINT | dwNumVertices, | ||
size_t | dwStride | ||
) |
void GrayLib::cSphereWork::AddVertices2 | ( | const cVector3f * | pVerts, |
UINT | dwNumVertices, | ||
size_t | dwStride | ||
) |
Compute bound box and sphere for a point cloud. Do all in 1 call. no need to call AddVertex.
|
inline |
get a box from my first pass data.
|
inline |
ASSUME m_iPass == 2
void GrayLib::cSphereWork::InitPass2 | ( | ) |
we are about to make pass2 on the data set Set xspan = distance between the 2 points xmin & xmax (squared)
void GrayLib::cSphereWork::InitWork | ( | ) |
FIRST PASS: find 6 minima/maxima points