Cylinder Class Reference

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

Classes

struct  ParallelNormalsError
 

Public Types

enum  { RequiredSamples = 2 }
 

Public Member Functions

const Vec3f AngularDirection () const
 
Vec3fAxisDirection ()
 
const Vec3fAxisDirection () const
 
Vec3fAxisPosition ()
 
const Vec3fAxisPosition () const
 
 Cylinder ()
 
 Cylinder (const Vec3f &axisDir, const Vec3f &axisPos, float radius)
 
 Cylinder (const Vec3f &pointA, const Vec3f &pointB, const Vec3f &normalA, const Vec3f &normalB)
 
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 &axisDir, const Vec3f &axisPos, float radius)
 
bool Init (const Vec3f &pointA, const Vec3f &pointB, const Vec3f &normalA, const Vec3f &normalB)
 
void Init (FILE *i)
 
void Init (float *array)
 
bool InitAverage (const MiscLib::Vector< Vec3f > &samples)
 
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 Parameters (const Vec3f &p, std::pair< float, float > *param) const
 
void Project (const Vec3f &p, Vec3f *pp) const
 
floatRadius ()
 
float Radius () const
 
void RotateAngularDirection (float radians)
 
void Serialize (bool binary, std::ostream *o) const
 
void Serialize (FILE *o) const
 
void Serialize (float *array) const
 
float SignedDistance (const Vec3f &p) const
 
void Transform (const GfxTL::MatrixXX< 3, 3, float > &rot, const GfxTL::Vector3Df &trans)
 
void Transform (float scale, const Vec3f &translate)
 

Static Public Member Functions

static bool Interpolate (const MiscLib::Vector< Cylinder > &cylinders, const MiscLib::Vector< float > &weights, Cylinder *ic)
 
static size_t SerializedFloatSize ()
 
static size_t SerializedSize ()
 

Detailed Description

Definition at line 22 of file Cylinder.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
RequiredSamples 

Definition at line 30 of file Cylinder.h.

Constructor & Destructor Documentation

◆ Cylinder() [1/3]

Cylinder ( )

Definition at line 17 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ Cylinder() [2/3]

Cylinder ( const Vec3f & axisDir,
const Vec3f & axisPos,
float radius )

Definition at line 21 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ Cylinder() [3/3]

Cylinder ( const Vec3f & pointA,
const Vec3f & pointB,
const Vec3f & normalA,
const Vec3f & normalB )

Definition at line 27 of file Cylinder.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AngularDirection()

const Vec3f AngularDirection ( ) const

Definition at line 354 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ AxisDirection() [1/2]

Vec3f & AxisDirection ( )

Definition at line 336 of file Cylinder.cpp.

◆ AxisDirection() [2/2]

const Vec3f & AxisDirection ( ) const

Definition at line 330 of file Cylinder.cpp.

◆ AxisPosition() [1/2]

Vec3f & AxisPosition ( )

Definition at line 348 of file Cylinder.cpp.

◆ AxisPosition() [2/2]

const Vec3f & AxisPosition ( ) const

Definition at line 342 of file Cylinder.cpp.

◆ Distance()

float Distance ( const Vec3f & p) const
inline

Definition at line 197 of file Cylinder.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 215 of file Cylinder.h.

+ Here is the call 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 67 of file Cylinder.h.

+ Here is the call graph for this function:

◆ Init() [1/6]

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

Definition at line 227 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ Init() [2/6]

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

Definition at line 40 of file Cylinder.cpp.

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

◆ Init() [3/6]

bool Init ( const Vec3f & axisDir,
const Vec3f & axisPos,
float radius )

Definition at line 180 of file Cylinder.cpp.

◆ Init() [4/6]

bool Init ( const Vec3f & pointA,
const Vec3f & pointB,
const Vec3f & normalA,
const Vec3f & normalB )

Definition at line 191 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ Init() [5/6]

void Init ( FILE * i)

Definition at line 257 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ Init() [6/6]

void Init ( float * array)

Definition at line 270 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ InitAverage()

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

Definition at line 97 of file Cylinder.cpp.

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

◆ Interpolate()

bool Interpolate ( const MiscLib::Vector< Cylinder > & cylinders,
const MiscLib::Vector< float > & weights,
Cylinder * ic )
static

Definition at line 449 of file Cylinder.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 271 of file Cylinder.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 439 of file Cylinder.cpp.

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

◆ LeastSquaresFit() [2/2]

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

Definition at line 239 of file Cylinder.h.

+ Here is the call graph for this function:

◆ Normal()

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

Definition at line 206 of file Cylinder.h.

+ Here is the call graph for this function:

◆ Parameters()

void Parameters ( const Vec3f & p,
std::pair< float, float > * param ) const

Definition at line 298 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ Project()

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

Definition at line 287 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ Radius() [1/2]

float & Radius ( )

Definition at line 324 of file Cylinder.cpp.

◆ Radius() [2/2]

float Radius ( ) const

Definition at line 318 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ RotateAngularDirection()

void RotateAngularDirection ( float radians)

Definition at line 360 of file Cylinder.cpp.

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

◆ Serialize() [1/3]

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

Definition at line 467 of file Cylinder.cpp.

◆ Serialize() [2/3]

void Serialize ( FILE * o) const

Definition at line 510 of file Cylinder.cpp.

◆ Serialize() [3/3]

void Serialize ( float * array) const

Definition at line 491 of file Cylinder.cpp.

◆ SerializedFloatSize()

size_t SerializedFloatSize ( )
static

Definition at line 504 of file Cylinder.cpp.

◆ SerializedSize()

size_t SerializedSize ( )
static

Definition at line 485 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ SignedDistance()

float SignedDistance ( const Vec3f & p) const
inline

Definition at line 229 of file Cylinder.h.

+ Here is the call graph for this function:

◆ Transform() [1/2]

void Transform ( const GfxTL::MatrixXX< 3, 3, float > & rot,
const GfxTL::Vector3Df & trans )

Definition at line 527 of file Cylinder.cpp.

◆ Transform() [2/2]

void Transform ( float scale,
const Vec3f & translate )

Definition at line 519 of file Cylinder.cpp.


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