ImFusion SDK 4.3
PointsOnData Class Referenceabstract

#include <ImFusion/Base/PointsOnData.h>

Interface class for points linked to Data. More...

+ Inheritance diagram for PointsOnData:

Detailed Description

Interface class for points linked to Data.

Implementations of this class handle the addition of points and update of such points when the data changes. This class supports selection of a subset of points. Be default all the points are selected, selection can be changed using the setSelected method

Public Member Functions

const std::vector< vec3 > & points () const
 Return all the points in world coordinates whether they are selected or not.
 
std::vector< vec3 > selectedPoints () const
 Return the selected points in world coordinates.
 
virtual const std::vector< vec3 > & allPoints () const =0
 Return all the points in world coordinates whether they are selected or not.
 
virtual const Datadata () const =0
 Return the underlying data.
 
virtual void remove (int first, int last)=0
 Remove the points in range [first,last)
 
void remove (int index)
 Remove the point at index
 
virtual int size () const
 Number of stored points ignoring the selection.
 
virtual bool empty () const
 Check if the list of points is empty.
 
virtual void clear ()
 Remove all the points.
 
virtual const vec3 & point (int which) const
 Get a point in world coordinates. The index can be negative, in which case it is counted from the end.
 
std::string name (int which) const
 Get the name of a point.
 
void setName (std::string name, int which)
 Set the name of a point.
 
bool isSelected (int which) const
 Checks whether a point is selected. By default all points are selected.
 
void setSelected (int which, bool selected)
 Sets whether a point is selected or not. By default all points are selected.
 
int find (const std::string &name, int start=0) const
 Get the first index of a point with the given name, starting from index start. Return -1 if not found.
 
virtual void configurePoint (const Properties *p)=0
 Add the point described by the properties.
 
virtual void pointConfiguration (Properties *p, int which) const =0
 Extract the configuration of the point at index
 
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
 
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
 
- Public Member Functions inherited from Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Public Attributes

Signal< int, int > signalPointsChanged
 Signal emitted when the points in range [first, last) are updated.
 
Signal< int, int > signalPointsAdded
 Signal emitted when points are added. The range [first, last) contains the new points.
 
Signal< int, int > signalPointsRemoved
 Signal emitted when the points in range [first, last) are removed.
 
Signal< int, int > signalPointsRenamed
 Signal emitted when the points in range [first, last) are renamed.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Protected Attributes

std::vector< std::stringm_names
 
std::vector< bool > m_selection
 < names of the points
 
std::string m_pointSetName
 Optional name of the point set.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ points()

const std::vector< vec3 > & points ( ) const
inline

Return all the points in world coordinates whether they are selected or not.

Deprecated
"If you want to ignore selection use allPoints(), otherwise use selectedPoints()"

◆ allPoints()

virtual const std::vector< vec3 > & allPoints ( ) const
pure virtual

Return all the points in world coordinates whether they are selected or not.

Implemented in PointsOnImage, and PointsOnTrackingStream.

◆ data()

virtual const Data * data ( ) const
pure virtual

Return the underlying data.

Implemented in PointsOnImage, and PointsOnTrackingStream.

◆ remove()

virtual void remove ( int first,
int last )
pure virtual

Remove the points in range [first,last)

Implemented in PointsOnImage, and PointsOnTrackingStream.

◆ configurePoint()

virtual void configurePoint ( const Properties * p)
pure virtual

Add the point described by the properties.

Implemented in PointsOnImage, and PointsOnTrackingStream.

◆ pointConfiguration()

virtual void pointConfiguration ( Properties * p,
int which ) const
pure virtual

Extract the configuration of the point at index

Implemented in PointsOnImage, and PointsOnTrackingStream.

◆ configure()

void configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.

Reimplemented in PointsOnTrackingStream.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from Configurable.

Reimplemented in PointsOnTrackingStream.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close