ImFusion SDK 4.3
PointsOnTrackingStream Class Reference

#include <ImFusion/Navigation/PointsOnTrackingStream.h>

Manages a collection of points associated with a TrackingStream. More...

+ Inheritance diagram for PointsOnTrackingStream:

Detailed Description

Manages a collection of points associated with a TrackingStream.

Emits signals when points are added, removed, or modified.

Public Member Functions

 PointsOnTrackingStream (TrackingStream &trackingStream)
 
void addWorldPoint (const vec3 &point)
 Adds a point in camera-world coordinates.
 
void setWorldPoint (const vec3 &point, int index)
 Updates an existing point to a new position in camera-world coordinates.
 
const std::vector< vec3 > & allPoints () const override
 Retrieves all points in camera-world coordinates.
 
void remove (int first, int last) override
 Removes points in the range [first, last).
 
void setUseMainInstrument (bool useMainInstrument)
 Specifies whether the selected instrument should be the main instrument or manually assigned via setTrackerId.
 
bool useMainInstrument () const
 
void setTrackerId (std::string trackerId)
 Sets the TrackerID of the primary instrument (e.g., the pointer used to localize registration points).
 
std::string trackerId () const
 Returns the TrackerID of the main instrument.
 
void setRelativeTrackerId (std::optional< std::string > relTrackerId)
 Sets the TrackerID of the relative instrument (e.g., a reference tracker attached to the object of interest).
 
std::optional< std::stringrelativeTrackerId () const
 Returns the TrackerID of the relative instrument.
 
TrackingStreamtrackingStream ()
 Returns the associated TrackingStream instance.
 
const Datadata () const override
 Return the underlying data.
 
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.
 
void configurePoint (const Properties *p) override
 Adds a point using the given Properties definition.
 
void pointConfiguration (Properties *p, int index) const override
 Populates Properties with the configuration of the point at index.
 
void remove (int index)
 Gets remove(int which) from PointsOnData.
 
- Public Member Functions inherited from PointsOnData
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.
 
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.
 
- 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 Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
 
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.
 

Additional Inherited Members

- Public Attributes inherited from PointsOnData
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 Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 
- Protected Attributes inherited from PointsOnData
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

◆ addWorldPoint()

void addWorldPoint ( const vec3 & point)

Adds a point in camera-world coordinates.

Emits the signalPointsAdded signal.

◆ setWorldPoint()

void setWorldPoint ( const vec3 & point,
int index )

Updates an existing point to a new position in camera-world coordinates.

Emits the signalPointsAdded signal.

◆ allPoints()

const std::vector< vec3 > & allPoints ( ) const
inlineoverridevirtual

Retrieves all points in camera-world coordinates.

Implements PointsOnData.

◆ remove()

void remove ( int first,
int last )
overridevirtual

Removes points in the range [first, last).

Implements PointsOnData.

◆ setTrackerId()

void setTrackerId ( std::string trackerId)

Sets the TrackerID of the primary instrument (e.g., the pointer used to localize registration points).

Has no effect if useMainInstrument is true. Otherwise, the call is ignored. Changing the TrackerID will delete existing points.

◆ data()

const Data * data ( ) const
overridevirtual

Return the underlying data.

Implements PointsOnData.

◆ 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 PointsOnData.

◆ 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 PointsOnData.

◆ configurePoint()

void configurePoint ( const Properties * p)
overridevirtual

Adds a point using the given Properties definition.

Implements PointsOnData.

◆ pointConfiguration()

void pointConfiguration ( Properties * p,
int index ) const
overridevirtual

Populates Properties with the configuration of the point at index.

Implements PointsOnData.


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