Solar
Public Member Functions | Friends | List of all members
SolAR::datastructure::CloudPoint Class Reference

A 3D point stored in a cloud of points. More...

#include <CloudPoint.h>

Inheritance diagram for SolAR::datastructure::CloudPoint:
Inheritance graph
[legend]
Collaboration diagram for SolAR::datastructure::CloudPoint:
Collaboration graph
[legend]

Public Member Functions

 CloudPoint (const Point3Df &point, float r=0.0f, float g=0.0f, float b=0.0f, float nx=0.0f, float ny=0.0f, float nz=0.0f, double reproj_error=0.0)
 CloudPoint constructor with a Point3Df. More...
 
 CloudPoint (float x, float y, float z, float r=0.0f, float g=0.0f, float b=0.0f, float nx=0.0f, float ny=0.0f, float nz=0.0f, double reproj_error=0.0)
 Cloudpoint constructor. More...
 
 CloudPoint (float x, float y, float z, float r, float g, float b, double reproj_error, const std::map< unsigned int, unsigned int > &visibility)
 Cloudpoint constructor. More...
 
 CloudPoint (float x, float y, float z, float r, float g, float b, float nx, float ny, float nz, double reproj_error, const std::map< unsigned int, unsigned int > &visibility)
 Cloudpoint constructor. More...
 
 CloudPoint (float x, float y, float z, float r, float g, float b, double reproj_error, const std::map< unsigned int, unsigned int > &visibility, SRef< DescriptorBuffer > descriptor)
 Cloudpoint constructor. More...
 
 CloudPoint (float x, float y, float z, float r, float g, float b, float nx, float ny, float nz, double reproj_error, const std::map< unsigned int, unsigned int > &visibility, SRef< DescriptorBuffer > descriptor)
 Cloudpoint constructor. More...
 
 ~CloudPoint ()
 ~CloudPoint
 
const uint32_t & getId () const
 This method returns the id of the cloud point. More...
 
void setId (const uint32_t &id)
 This method sets the id of the cloud point. More...
 
const SRef< DescriptorBuffer > & getDescriptor () const
 This method returns the descriptor of the cloud point. More...
 
void setDescriptor (const SRef< DescriptorBuffer > &descriptor)
 This method sets the descriptor of the cloud point. More...
 
void addNewDescriptor (const DescriptorView &descriptor)
 This method updates the descriptor of the cloud point by taking into account the descriptor of new keyframe. More...
 
const Vector3fgetRGB () const
 These methods returns the color components of the CloudPoint. More...
 
const float & getR () const
 These methods returns the color components of the CloudPoint. More...
 
const float & getG () const
 
const float & getB () const
 
void setRGB (const Vector3f &rgb)
 This method sets the RGB color of the cloud point. More...
 
const Vector3fgetViewDirection () const
 This method returns the view direction of the cloud point. More...
 
void setViewDirection (const Vector3f &viewDirection)
 This method sets the view direction of the cloud point. More...
 
void addNewViewDirection (const Vector3f &viewDirection)
 This method updates the view direction of the cloud point by taking into account the view direction of new keyframe. More...
 
void setReprojError (const double &error)
 This method sets reprojection error of the PointCloud. More...
 
const double & getReprojError () const
 This method returns reprojection error of the PointCloud. More...
 
const std::map< uint32_t, uint32_t > & getVisibility () const
 return the visibility map of the CloudPoint More...
 
void addVisibility (const uint32_t &keyframe_id, const uint32_t &keypoint_id)
 add a keypoint to the visibility map of the CloudPoint More...
 
bool removeVisibility (const uint32_t &keyframe_id)
 remove a keypoint to the visibility map of the CloudPoint More...
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 
- Public Member Functions inherited from SolAR::datastructure::Point3Df
 Point3Df (float x=0, float y=0, float z=0)
 
float getX () const
 
float getY () const
 
float getZ () const
 
float magnitude () const
 
void setX (float x)
 
void setY (float y)
 
void setZ (float z)
 
Point3Df operator+ (const Point3Df &a) const
 
Point3Df operator- (const Point3Df &a) const
 
Point3Df operator* (const float &f) const
 
- Public Member Functions inherited from SolAR::datastructure::PrimitiveInformation
 PrimitiveInformation ()
 PrimitiveInformation constructor.
 
 ~PrimitiveInformation ()=default
 PrimitiveInformation deconstruction.
 
bool isValid () const
 This method is to known an element being valid or not. More...
 
void setInvalid ()
 This method is to set an element being invalid.
 
void updateConfidence (bool isGood)
 This method updates the confident score of the primitive element. More...
 
float getConfidence () const
 This method returns the confident score of the primitive element. More...
 
uint32_t getUsedTime () const
 This method returns the number of used times of the primitive element. More...
 
const std::chrono::system_clock::time_point & getLastUpdateTime () const
 This method returns the last updated time of the primitive element. More...
 
void setLastUpdateTime (const std::chrono::system_clock::time_point &updateTime)
 This method updates the last updated time of the primitive element. More...
 
int getSemanticId () const
 This method returns the semantic id of the primitive element. More...
 
void setSemanticId (const int &semanticId)
 This method sets the semantic id of the primitive element. More...
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

A 3D point stored in a cloud of points.

Constructor & Destructor Documentation

◆ CloudPoint() [1/6]

SolAR::datastructure::CloudPoint::CloudPoint ( const Point3Df point,
float  r = 0.0f,
float  g = 0.0f,
float  b = 0.0f,
float  nx = 0.0f,
float  ny = 0.0f,
float  nz = 0.0f,
double  reproj_error = 0.0 
)
explicit

CloudPoint constructor with a Point3Df.

Parameters
[in]pointa Point3Df
[in]r(optional): r-channel color value of the cloudpoint.
[in]g(optional): g-channel color value of the cloudpoint.
[in]b(optional): b-channel color value of the cloudpoint.
[in]nx(optional): x-coordinate of the view direction vector of the cloudpoint.
[in]ny(optional): y-coordinate of the view direction vector of the cloudpoint.
[in]nz(optional): z-coordinate of the view direction vector of the cloudpoint.

◆ CloudPoint() [2/6]

SolAR::datastructure::CloudPoint::CloudPoint ( float  x,
float  y,
float  z,
float  r = 0.0f,
float  g = 0.0f,
float  b = 0.0f,
float  nx = 0.0f,
float  ny = 0.0f,
float  nz = 0.0f,
double  reproj_error = 0.0 
)
explicit

Cloudpoint constructor.

Parameters
[in]xx-coordinate of the cloudpoint.
[in]yy-coordinate of the cloudpoint.
[in]zz-coordinate of the cloudpoint.
[in]r(optional): r-channel color value of the cloudpoint.
[in]g(optional): g-channel color value of the cloudpoint.
[in]b(optional): b-channel color value of the cloudpoint.
[in]nx(optional): x-coordinate of the view direction vector of the cloudpoint.
[in]ny(optional): y-coordinate of the view direction vector of the cloudpoint.
[in]nz(optional): z-coordinate of the view direction vector of the cloudpoint.

◆ CloudPoint() [3/6]

SolAR::datastructure::CloudPoint::CloudPoint ( float  x,
float  y,
float  z,
float  r,
float  g,
float  b,
double  reproj_error,
const std::map< unsigned int, unsigned int > &  visibility 
)
explicit

Cloudpoint constructor.

Parameters
[in]xx-coordinate of the cloudpoint.
[in]yy-coordinate of the cloudpoint.
[in]zz-coordinate of the cloudpoint.
[in]rr-channel color value of the cloudpoint.
[in]gg-channel color value of the cloudpoint.
[in]bb-channel color value of the cloudpoint.
[in]visibilityvisibility map of the cloudpoint.

◆ CloudPoint() [4/6]

SolAR::datastructure::CloudPoint::CloudPoint ( float  x,
float  y,
float  z,
float  r,
float  g,
float  b,
float  nx,
float  ny,
float  nz,
double  reproj_error,
const std::map< unsigned int, unsigned int > &  visibility 
)
explicit

Cloudpoint constructor.

Parameters
[in]xx-coordinate of the cloudpoint.
[in]yy-coordinate of the cloudpoint.
[in]zz-coordinate of the cloudpoint.
[in]rr-channel color value of the cloudpoint.
[in]gg-channel color value of the cloudpoint.
[in]bb-channel color value of the cloudpoint.
[in]nxx-coordinate of the view direction vector of the cloudpoint.
[in]nyy-coordinate of the view direction vector of the cloudpoint.
[in]nzz-coordinate of the view direction vector of the cloudpoint.
[in]visibilityvisibility map of the cloudpoint.

◆ CloudPoint() [5/6]

SolAR::datastructure::CloudPoint::CloudPoint ( float  x,
float  y,
float  z,
float  r,
float  g,
float  b,
double  reproj_error,
const std::map< unsigned int, unsigned int > &  visibility,
SRef< DescriptorBuffer descriptor 
)
explicit

Cloudpoint constructor.

Parameters
[in]xx-coordinate of the cloudpoint.
[in]yy-coordinate of the cloudpoint.
[in]zz-coordinate of the cloudpoint.
[in]rr-channel color value of the cloudpoint.
[in]gg-channel color value of the cloudpoint.
[in]bb-channel color value of the cloudpoint.
[in]visibilityvisibility map of the cloudpoint.
[in]descriptordescriptor of the cloudpoint.

◆ CloudPoint() [6/6]

SolAR::datastructure::CloudPoint::CloudPoint ( float  x,
float  y,
float  z,
float  r,
float  g,
float  b,
float  nx,
float  ny,
float  nz,
double  reproj_error,
const std::map< unsigned int, unsigned int > &  visibility,
SRef< DescriptorBuffer descriptor 
)
explicit

Cloudpoint constructor.

Parameters
[in]xx-coordinate of the cloudpoint.
[in]yy-coordinate of the cloudpoint.
[in]zz-coordinate of the cloudpoint.
[in]rr-channel color value of the cloudpoint.
[in]gg-channel color value of the cloudpoint.
[in]bb-channel color value of the cloudpoint.
[in]nxx-coordinate of the view direction vector of the cloudpoint.
[in]nyy-coordinate of the view direction vector of the cloudpoint.
[in]nzz-coordinate of the view direction vector of the cloudpoint.
[in]visibilityvisibility map of the cloudpoint.
[in]descriptordescriptor of the cloudpoint.

Member Function Documentation

◆ addNewDescriptor()

void SolAR::datastructure::CloudPoint::addNewDescriptor ( const DescriptorView descriptor)

This method updates the descriptor of the cloud point by taking into account the descriptor of new keyframe.

Parameters
[in]descriptorthe new descriptor

◆ addNewViewDirection()

void SolAR::datastructure::CloudPoint::addNewViewDirection ( const Vector3f viewDirection)

This method updates the view direction of the cloud point by taking into account the view direction of new keyframe.

Parameters
[in]viewDirectionthe new view direction

◆ addVisibility()

void SolAR::datastructure::CloudPoint::addVisibility ( const uint32_t &  keyframe_id,
const uint32_t &  keypoint_id 
)

add a keypoint to the visibility map of the CloudPoint

Parameters
[in]keyframe_idthe id of the keyframe to which the keypoint belong
[in]keypoint_idthe id of the keypoint of the keyframe

◆ getDescriptor()

const SRef< DescriptorBuffer > & SolAR::datastructure::CloudPoint::getDescriptor ( ) const

This method returns the descriptor of the cloud point.

Returns
the descriptor

◆ getId()

const uint32_t & SolAR::datastructure::CloudPoint::getId ( ) const

This method returns the id of the cloud point.

Returns
the id

◆ getR()

const float & SolAR::datastructure::CloudPoint::getR ( ) const

These methods returns the color components of the CloudPoint.

Returns
the color component of the CloudPoint (Red, Green or Blue)

◆ getReprojError()

const double & SolAR::datastructure::CloudPoint::getReprojError ( ) const

This method returns reprojection error of the PointCloud.

Returns
the reprojection error

◆ getRGB()

const Vector3f & SolAR::datastructure::CloudPoint::getRGB ( ) const

These methods returns the color components of the CloudPoint.

Returns
the RGB color of the CloudPoint

◆ getViewDirection()

const Vector3f & SolAR::datastructure::CloudPoint::getViewDirection ( ) const

This method returns the view direction of the cloud point.

Returns
view direction vector

◆ getVisibility()

const std::map< uint32_t, uint32_t > & SolAR::datastructure::CloudPoint::getVisibility ( ) const

return the visibility map of the CloudPoint

Returns
The visibility, a map where the key corresponds to the id of the keyframe, and the value to the id of the keypoint in this keyframe.

◆ removeVisibility()

bool SolAR::datastructure::CloudPoint::removeVisibility ( const uint32_t &  keyframe_id)

remove a keypoint to the visibility map of the CloudPoint

Parameters
[in]keyframe_idthe id of the keyframe to which the keypoint belong
[in]keypoint_idthe id of the keypoint of the keyframe
Returns
true if remove successfully

◆ setDescriptor()

void SolAR::datastructure::CloudPoint::setDescriptor ( const SRef< DescriptorBuffer > &  descriptor)

This method sets the descriptor of the cloud point.

Parameters
[in]descriptorthe descriptor

◆ setId()

void SolAR::datastructure::CloudPoint::setId ( const uint32_t &  id)

This method sets the id of the cloud point.

Parameters
[in]idid of cloud point

◆ setReprojError()

void SolAR::datastructure::CloudPoint::setReprojError ( const double &  error)

This method sets reprojection error of the PointCloud.

Parameters
[in]errorthe reprojection error

◆ setRGB()

void SolAR::datastructure::CloudPoint::setRGB ( const Vector3f rgb)

This method sets the RGB color of the cloud point.

Parameters
[in]rgbrgb color

◆ setViewDirection()

void SolAR::datastructure::CloudPoint::setViewDirection ( const Vector3f viewDirection)

This method sets the view direction of the cloud point.

Parameters
[in]viewDirectionthe view direction

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