Sphere Class Reference

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

Public Types

enum  { RequiredSamples = 2 }
 

Public Member Functions

const Vec3fCenter () 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 ()
 

Detailed Description

Definition at line 27 of file Sphere.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
RequiredSamples 

Definition at line 30 of file Sphere.h.

Constructor & Destructor Documentation

◆ Sphere() [1/3]

Sphere ( )

Definition at line 155 of file Sphere.cpp.

◆ Sphere() [2/3]

Sphere ( const Vec3f center,
float  radius 
)

Definition at line 158 of file Sphere.cpp.

◆ Sphere() [3/3]

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

Definition at line 163 of file Sphere.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ Center() [1/2]

const Vec3f & Center ( ) const

Definition at line 346 of file Sphere.cpp.

+ Here is the caller graph for this function:

◆ Center() [2/2]

void Center ( const Vec3f center)
inline

Definition at line 49 of file Sphere.h.

◆ Distance()

float Distance ( const Vec3f p) const
inline

Definition at line 219 of file Sphere.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DistanceAndNormal()

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

Definition at line 230 of file Sphere.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Fit()

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

Definition at line 63 of file Sphere.h.

◆ Init() [1/5]

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

Definition at line 305 of file Sphere.cpp.

◆ Init() [2/5]

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

Definition at line 172 of file Sphere.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Init() [3/5]

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

Definition at line 208 of file Sphere.cpp.

+ Here is the call graph for this function:

◆ Init() [4/5]

void Init ( FILE *  i)

Definition at line 323 of file Sphere.cpp.

◆ Init() [5/5]

void Init ( float array)

Definition at line 329 of file Sphere.cpp.

◆ Init2()

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

Definition at line 242 of file Sphere.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Interpolate()

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

Definition at line 398 of file Sphere.cpp.

+ Here is the call graph for this function:

◆ Intersect()

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

Definition at line 268 of file Sphere.h.

+ Here is the call graph for this function:

◆ LeastSquaresFit() [1/2]

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

Definition at line 389 of file Sphere.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LeastSquaresFit() [2/2]

bool LeastSquaresFit ( IteratorT  begin,
IteratorT  end 
)

Definition at line 247 of file Sphere.h.

+ Here is the call graph for this function:

◆ Normal()

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

Definition at line 224 of file Sphere.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Project()

void Project ( const Vec3f p,
Vec3f pp 
) const

Definition at line 338 of file Sphere.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Radius() [1/2]

float Radius ( ) const

Definition at line 351 of file Sphere.cpp.

+ Here is the caller graph for this function:

◆ Radius() [2/2]

void Radius ( float  radius)
inline

Definition at line 54 of file Sphere.h.

◆ Serialize() [1/3]

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

Definition at line 413 of file Sphere.cpp.

+ Here is the caller graph for this function:

◆ Serialize() [2/3]

void Serialize ( FILE *  o) const

Definition at line 438 of file Sphere.cpp.

◆ Serialize() [3/3]

void Serialize ( float array) const

Definition at line 444 of file Sphere.cpp.

◆ SerializedFloatSize()

size_t SerializedFloatSize ( )
static

Definition at line 433 of file Sphere.cpp.

◆ SerializedSize()

size_t SerializedSize ( )
static

Definition at line 427 of file Sphere.cpp.

+ Here is the caller graph for this function:

◆ SignedDistance()

float SignedDistance ( const Vec3f p) const
inline

Definition at line 241 of file Sphere.h.

+ Here is the caller graph for this function:

◆ Transform()

void Transform ( float  scale,
const Vec3f translate 
)

Definition at line 454 of file Sphere.cpp.

+ Here is the caller graph for this function:

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