![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/PointsOnData.h>
Interface class for points linked to Data. More...
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 Data * | data () 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. | |
![]() | |
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 | |
Configurable & | operator= (const Configurable &) |
Configurable & | operator= (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. | |
![]() | |
Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Attributes | |
std::vector< std::string > | m_names |
std::vector< bool > | m_selection |
< names of the points | |
std::string | m_pointSetName |
Optional name of the point set. | |
![]() | |
std::vector< Param > | m_params |
List of all registered Parameter and SubProperty instances. | |
|
inline |
Return all the points in world coordinates whether they are selected or not.
|
pure virtual |
Return all the points in world coordinates whether they are selected or not.
Implemented in PointsOnImage, and PointsOnTrackingStream.
|
pure virtual |
Return the underlying data.
Implemented in PointsOnImage, and PointsOnTrackingStream.
|
pure virtual |
Remove the points in range [first,last)
Implemented in PointsOnImage, and PointsOnTrackingStream.
|
pure virtual |
Add the point described by the properties.
Implemented in PointsOnImage, and PointsOnTrackingStream.
|
pure virtual |
Extract the configuration of the point at index
Implemented in PointsOnImage, and PointsOnTrackingStream.
|
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.
Reimplemented from Configurable.
Reimplemented in PointsOnTrackingStream.
|
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.
Reimplemented from Configurable.
Reimplemented in PointsOnTrackingStream.