Sphere Class Reference

#include <VisionX/components/pointcloud_processor/EfficientRANSACPrimitiveExtractor/EfficientRANSAC/Sphere.h>

Public Types

enum  { RequiredSamples = 2 }
 

Public Member Functions

const Vec3f & Center () const
 
void Center (const Vec3f &center)
 
float Distance (const Vec3f &p) const
 
float DistanceAndNormal (const Vec3f &p, Vec3f *normal) const
 
bool Fit (const PointCloud &pc, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)
 
bool Init (bool binary, std::istream *i)
 
bool Init (const MiscLib::Vector< Vec3f > &samples)
 
bool Init (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3, const Vec3f &p4)
 
void Init (FILE *i)
 
void Init (float *array)
 
bool Init2 (const Vec3f &p1, const Vec3f &p2, const Vec3f &n1, const Vec3f &n2)
 
unsigned int Intersect (const Vec3f &p, const Vec3f &r, float *first, float *second) const
 
bool LeastSquaresFit (const PointCloud &pc, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)
 
template<class IteratorT>
bool LeastSquaresFit (IteratorT begin, IteratorT end)
 
void Normal (const Vec3f &p, Vec3f *normal) const
 
void Project (const Vec3f &p, Vec3f *pp) const
 
float Radius () const
 
void Radius (float radius)
 
void Serialize (bool binary, std::ostream *o) const
 
void Serialize (FILE *o) const
 
void Serialize (float *array) const
 
float SignedDistance (const Vec3f &p) const
 
 Sphere ()
 
 Sphere (const Vec3f &center, float radius)
 
 Sphere (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3, const Vec3f &p4)
 
void Transform (float scale, const Vec3f &translate)
 

Static Public Member Functions

static bool Interpolate (const MiscLib::Vector< Sphere > &spheres, const MiscLib::Vector< float > &weights, Sphere *is)
 
static size_t SerializedFloatSize ()
 
static size_t SerializedSize ()
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
RequiredSamples 

Constructor & Destructor Documentation

◆ Sphere() [1/3]

Sphere ( )

◆ Sphere() [2/3]

Sphere ( const Vec3f & center,
float radius )

◆ Sphere() [3/3]

Sphere ( const Vec3f & p1,
const Vec3f & p2,
const Vec3f & p3,
const Vec3f & p4 )

Member Function Documentation

◆ Center() [1/2]

const Vec3f & Center ( ) const

◆ Center() [2/2]

void Center ( const Vec3f & center)
inline

◆ Distance()

float Distance ( const Vec3f & p) const
inline

◆ DistanceAndNormal()

float DistanceAndNormal ( const Vec3f & p,
Vec3f * normal ) const
inline

◆ Fit()

bool Fit ( const PointCloud & pc,
MiscLib::Vector< size_t >::const_iterator begin,
MiscLib::Vector< size_t >::const_iterator end )
inline

◆ Init() [1/5]

bool Init ( bool binary,
std::istream * i )

◆ Init() [2/5]

bool Init ( const MiscLib::Vector< Vec3f > & samples)

◆ Init() [3/5]

bool Init ( const Vec3f & p1,
const Vec3f & p2,
const Vec3f & p3,
const Vec3f & p4 )

◆ Init() [4/5]

void Init ( FILE * i)

◆ Init() [5/5]

void Init ( float * array)

◆ Init2()

bool Init2 ( const Vec3f & p1,
const Vec3f & p2,
const Vec3f & n1,
const Vec3f & n2 )

◆ Interpolate()

bool Interpolate ( const MiscLib::Vector< Sphere > & spheres,
const MiscLib::Vector< float > & weights,
Sphere * is )
static

◆ Intersect()

unsigned int Intersect ( const Vec3f & p,
const Vec3f & r,
float * first,
float * second ) const
inline

◆ LeastSquaresFit() [1/2]

bool LeastSquaresFit ( const PointCloud & pc,
MiscLib::Vector< size_t >::const_iterator begin,
MiscLib::Vector< size_t >::const_iterator end )

◆ LeastSquaresFit() [2/2]

template<class IteratorT>
bool LeastSquaresFit ( IteratorT begin,
IteratorT end )

◆ Normal()

void Normal ( const Vec3f & p,
Vec3f * normal ) const
inline

◆ Project()

void Project ( const Vec3f & p,
Vec3f * pp ) const

◆ Radius() [1/2]

float Radius ( ) const

◆ Radius() [2/2]

void Radius ( float radius)
inline

◆ Serialize() [1/3]

void Serialize ( bool binary,
std::ostream * o ) const

◆ Serialize() [2/3]

void Serialize ( FILE * o) const

◆ Serialize() [3/3]

void Serialize ( float * array) const

◆ SerializedFloatSize()

size_t SerializedFloatSize ( )
static

◆ SerializedSize()

size_t SerializedSize ( )
static

◆ SignedDistance()

float SignedDistance ( const Vec3f & p) const
inline

◆ Transform()

void Transform ( float scale,
const Vec3f & translate )

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