Plane Class Reference

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

Public Types

enum  { RequiredSamples = 1 }
 

Public Member Functions

float Distance (const Vec3f &pos) const
 
float DistanceAndNormal (const Vec3f &pos, Vec3f *n) const
 
bool equals (Plane plane)
 
bool Fit (const PointCloud &pc, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)
 
float getDistance (const Vec3f &pos) const
 
const Vec3fgetNormal () const
 
const Vec3fgetPosition () const
 
bool Init (bool binary, std::istream *i)
 
bool Init (const MiscLib::Vector< Vec3f > &samples)
 
void Init (FILE *i)
 
void Init (float *array)
 
bool Init (Vec3f p1, Vec3f p2, Vec3f p3)
 
bool InitAverage (const MiscLib::Vector< Vec3f > &samples)
 
float Intersect (const Vec3f &p, const Vec3f &r) 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 &, Vec3f *n) const
 
 Plane ()
 
 Plane (Vec3f p1, Vec3f normal)
 
 Plane (Vec3f p1, Vec3f p2, Vec3f p3)
 
void Serialize (bool binary, std::ostream *o) const
 
void Serialize (FILE *o) const
 
void Serialize (float *array) const
 
float SignedDistance (const Vec3f &pos) const
 
float SignedDistToOrigin () const
 
void Transform (float scale, const Vec3f &translate)
 
virtual ~Plane ()
 

Static Public Member Functions

static bool Interpolate (const MiscLib::Vector< Plane > &planes, const MiscLib::Vector< float > &weights, Plane *ip)
 
static size_t SerializedFloatSize ()
 
static size_t SerializedSize ()
 

Protected Attributes

float m_dist
 
Vec3f m_normal
 
Vec3f m_pos
 

Detailed Description

Definition at line 16 of file Plane.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
RequiredSamples 

Definition at line 19 of file Plane.h.

Constructor & Destructor Documentation

◆ Plane() [1/3]

Plane ( )
inline

Definition at line 20 of file Plane.h.

+ Here is the caller graph for this function:

◆ Plane() [2/3]

Plane ( Vec3f  p1,
Vec3f  p2,
Vec3f  p3 
)

Definition at line 10 of file Plane.cpp.

+ Here is the call graph for this function:

◆ Plane() [3/3]

Plane ( Vec3f  p1,
Vec3f  normal 
)

Definition at line 18 of file Plane.cpp.

+ Here is the call graph for this function:

◆ ~Plane()

~Plane ( )
virtual

Definition at line 25 of file Plane.cpp.

Member Function Documentation

◆ Distance()

float Distance ( const Vec3f pos) const
inline

Definition at line 34 of file Plane.h.

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

◆ DistanceAndNormal()

float DistanceAndNormal ( const Vec3f pos,
Vec3f n 
) const
inline

Definition at line 46 of file Plane.h.

◆ equals()

bool equals ( Plane  plane)

Definition at line 115 of file Plane.cpp.

+ 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 64 of file Plane.h.

◆ getDistance()

float getDistance ( const Vec3f pos) const
inline

Definition at line 30 of file Plane.h.

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

◆ getNormal()

const Vec3f& getNormal ( ) const
inline

Definition at line 51 of file Plane.h.

+ Here is the caller graph for this function:

◆ getPosition()

const Vec3f& getPosition ( ) const
inline

Definition at line 55 of file Plane.h.

+ Here is the caller graph for this function:

◆ Init() [1/5]

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

Definition at line 75 of file Plane.cpp.

◆ Init() [2/5]

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

Definition at line 42 of file Plane.cpp.

+ Here is the call graph for this function:

◆ Init() [3/5]

void Init ( FILE *  i)

Definition at line 108 of file Plane.cpp.

◆ Init() [4/5]

void Init ( float array)

Definition at line 98 of file Plane.cpp.

◆ Init() [5/5]

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

Definition at line 29 of file Plane.cpp.

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

◆ InitAverage()

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

Definition at line 51 of file Plane.cpp.

+ Here is the call graph for this function:

◆ Interpolate()

bool Interpolate ( const MiscLib::Vector< Plane > &  planes,
const MiscLib::Vector< float > &  weights,
Plane ip 
)
static

Definition at line 188 of file Plane.cpp.

+ Here is the call graph for this function:

◆ Intersect()

float Intersect ( const Vec3f p,
const Vec3f r 
) const

Definition at line 273 of file Plane.cpp.

+ 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 179 of file Plane.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 93 of file Plane.h.

+ Here is the call graph for this function:

◆ Normal()

void Normal ( const Vec3f ,
Vec3f n 
) const
inline

Definition at line 42 of file Plane.h.

◆ Serialize() [1/3]

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

Definition at line 203 of file Plane.cpp.

+ Here is the caller graph for this function:

◆ Serialize() [2/3]

void Serialize ( FILE *  o) const

Definition at line 259 of file Plane.cpp.

◆ Serialize() [3/3]

void Serialize ( float array) const

Definition at line 248 of file Plane.cpp.

◆ SerializedFloatSize()

size_t SerializedFloatSize ( )
static

Definition at line 243 of file Plane.cpp.

◆ SerializedSize()

size_t SerializedSize ( )
static

Definition at line 236 of file Plane.cpp.

+ Here is the caller graph for this function:

◆ SignedDistance()

float SignedDistance ( const Vec3f pos) const
inline

Definition at line 38 of file Plane.h.

+ Here is the caller graph for this function:

◆ SignedDistToOrigin()

float SignedDistToOrigin ( ) const
inline

Definition at line 60 of file Plane.h.

+ Here is the caller graph for this function:

◆ Transform()

void Transform ( float  scale,
const Vec3f translate 
)

Definition at line 266 of file Plane.cpp.

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

Member Data Documentation

◆ m_dist

float m_dist
protected

Definition at line 89 of file Plane.h.

◆ m_normal

Vec3f m_normal
protected

Definition at line 87 of file Plane.h.

◆ m_pos

Vec3f m_pos
protected

Definition at line 88 of file Plane.h.


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