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 20 of file Cylinder.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
RequiredSamples 

Definition at line 28 of file Cylinder.h.

Constructor & Destructor Documentation

◆ Cylinder() [1/3]

Cylinder ( )

Definition at line 17 of file Cylinder.cpp.

◆ 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 339 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ AxisDirection() [1/2]

Vec3f& AxisDirection ( )

◆ AxisDirection() [2/2]

Vec3f & AxisDirection ( ) const

Definition at line 319 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ AxisPosition() [1/2]

Vec3f& AxisPosition ( )

◆ AxisPosition() [2/2]

Vec3f & AxisPosition ( ) const

Definition at line 329 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ Distance()

float Distance ( const Vec3f p) const
inline

Definition at line 180 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 196 of file Cylinder.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 62 of file Cylinder.h.

◆ Init() [1/6]

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

Definition at line 222 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 37 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 176 of file Cylinder.cpp.

◆ Init() [4/6]

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

Definition at line 186 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ Init() [5/6]

void Init ( FILE *  i)

Definition at line 251 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ Init() [6/6]

void Init ( float array)

Definition at line 263 of file Cylinder.cpp.

+ Here is the call graph for this function:

◆ InitAverage()

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

Definition at line 93 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 431 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 249 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 422 of file Cylinder.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 218 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 188 of file Cylinder.h.

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

◆ Parameters()

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

Definition at line 289 of file Cylinder.cpp.

+ 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 279 of file Cylinder.cpp.

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

◆ Radius() [1/2]

float& Radius ( )

◆ Radius() [2/2]

float & Radius ( ) const

Definition at line 309 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ RotateAngularDirection()

void RotateAngularDirection ( float  radians)

Definition at line 344 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 447 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ Serialize() [2/3]

void Serialize ( FILE *  o) const

Definition at line 490 of file Cylinder.cpp.

◆ Serialize() [3/3]

void Serialize ( float array) const

Definition at line 473 of file Cylinder.cpp.

◆ SerializedFloatSize()

size_t SerializedFloatSize ( )
static

Definition at line 485 of file Cylinder.cpp.

◆ SerializedSize()

size_t SerializedSize ( )
static

Definition at line 465 of file Cylinder.cpp.

+ Here is the caller graph for this function:

◆ SignedDistance()

float SignedDistance ( const Vec3f p) const
inline

Definition at line 209 of file Cylinder.h.

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

◆ Transform() [1/2]

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

Definition at line 506 of file Cylinder.cpp.

◆ Transform() [2/2]

void Transform ( float  scale,
const Vec3f translate 
)

Definition at line 499 of file Cylinder.cpp.

+ Here is the caller graph for this function:

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