esp::metadata::attributes::LinkSet class

This class provides an alias for the nested Configuration tree used for a single link's 1 or more MarkerSets that should be attached to the named link.

Base classes

class esp::core::config::Configuration
This class holds Configuration data in a map of ConfigValues, and also supports nested Configurations via a map of smart pointers to this type.

Constructors, destructors, conversion operators

LinkSet()

Public functions

auto getNumMarkerSets() const -> int
Returns the number of existing MarkerSets in this LinkSet.
auto hasMarkerSet(const std::string& markerSetName) const -> bool
whether the given markerSetName exists as a MarkerSet in this LinkSet.
auto getAllMarkerSetNames() const -> std::vector<std::string>
Retrieve a listing of all the MarkerSet handles in this LinkSet.
auto getMarkerSetCopy(const std::string& markerSetName) -> MarkerSet::ptr
Retrivess a copy of the named MarkerSet, if it exists, and nullptr if it does not.
auto getMarkerSetView(const std::string& markerSetName) const -> MarkerSet::cptr
Retrieve a view of the named MarkerSet, if it exists, and nullptr if it does not.
auto editMarkerSet(const std::string& markerSetName) -> MarkerSet::ptr
Retrieves a reference to a (potentially newly created) MarkerSet with the given markerSetName , which can be modified and the modifications will be retained.
void removeMarkerSet(const std::string& markerSetName)
Removes named MarkerSet. Does nothing if DNE.
void setMarkerSetPoints(const std::string& markerSetName, const std::vector<Mn::Vector3>& markerList)
Set the specified MarkerSet's points to the given values.
void setAllMarkerPoints(const std::unordered_map<std::string, std::vector<Mn::Vector3>>& markerMap)
Set the marker points of all the MarkerSets specified by name in the passed map.
auto getMarkerSetPoints(const std::string& key) const -> std::vector<Mn::Vector3>
Retrieve all the marker points for the specified MarkerSet in this LinkSet.
auto getAllMarkerPoints() const -> std::unordered_map<std::string, std::vector<Mn::Vector3>>
Retrieve all the marker points across all MarkerSets for this link, as a map.
auto rekeyAllMarkers() -> int
Rekeys all marker collections to have vector IDXs as string keys.

Function documentation

bool esp::metadata::attributes::LinkSet::hasMarkerSet(const std::string& markerSetName) const

whether the given markerSetName exists as a MarkerSet in this LinkSet.

Parameters
markerSetName The desired marker set's name.
Returns whether the name is found as a MarkerSet subConfiguration.

MarkerSet::ptr esp::metadata::attributes::LinkSet::editMarkerSet(const std::string& markerSetName)

Retrieves a reference to a (potentially newly created) MarkerSet with the given markerSetName , which can be modified and the modifications will be retained.

Parameters
markerSetName The desired MarkerSet name.
Returns a reference to the MarkerSet.

void esp::metadata::attributes::LinkSet::setMarkerSetPoints(const std::string& markerSetName, const std::vector<Mn::Vector3>& markerList)

Set the specified MarkerSet's points to the given values.

Parameters
markerSetName the name of the MarkerSet
markerList the list of the specified MarkerSet's points.

void esp::metadata::attributes::LinkSet::setAllMarkerPoints(const std::unordered_map<std::string, std::vector<Mn::Vector3>>& markerMap)

Set the marker points of all the MarkerSets specified by name in the passed map.

Parameters
markerMap a map holding all the MarkerSet points within this LinkSet, with MarkerSet name as the key, referncing a vector of 3d points,

std::vector<Mn::Vector3> esp::metadata::attributes::LinkSet::getMarkerSetPoints(const std::string& key) const

Retrieve all the marker points for the specified MarkerSet in this LinkSet.

Returns a vector of 3d points

std::unordered_map<std::string, std::vector<Mn::Vector3>> esp::metadata::attributes::LinkSet::getAllMarkerPoints() const

Retrieve all the marker points across all MarkerSets for this link, as a map.

Returns a map holding all the MarkerSet points within this LinkSet, with MarkerSet name as the key, referncing a vector of 3d points

int esp::metadata::attributes::LinkSet::rekeyAllMarkers()

Rekeys all marker collections to have vector IDXs as string keys.

Returns returns how many markers have been processed with new keys in this LinkSet's MarkerSets.