Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cSphereWork Class Reference

#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
 

Detailed Description

working data set to compute a tight sphere on some models vertices's. 2 pass. (DVALUE_t = float)

Constructor & Destructor Documentation

◆ cSphereWork()

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.

Member Function Documentation

◆ AddVertex()

void GrayLib::cSphereWork::AddVertex ( const cVector3f vTmp)

AddVertex For each vertex in the model. 2 passes.

For each vertex in the model.

◆ AddVertices1()

void GrayLib::cSphereWork::AddVertices1 ( const cVector3f pVerts,
UINT  dwNumVertices,
size_t  dwStride 
)

◆ AddVertices2()

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.

◆ get_Box()

cBounds3f GrayLib::cSphereWork::get_Box ( ) const
inline

get a box from my first pass data.

◆ get_Sphere()

cSphere2 GrayLib::cSphereWork::get_Sphere ( ) const
inline

ASSUME m_iPass == 2

◆ InitPass2()

void GrayLib::cSphereWork::InitPass2 ( )

we are about to make pass2 on the data set Set xspan = distance between the 2 points xmin & xmax (squared)

◆ InitWork()

void GrayLib::cSphereWork::InitWork ( )

FIRST PASS: find 6 minima/maxima points


The documentation for this class was generated from the following files: