Helper struct containing index conversions (mappings) between {GeoId, PointPos} and MF indices per layer, and VertexId and MF indices per layer. More...
#include <EditModeCoinManagerParameters.h>
Public Member Functions | |
void | clear () |
int | getCurveGeoId (int curveindex, int layerindex) |
given the MF index of a curve and the coin layer in which it is drawn returns the GeoId of the curve More... | |
MultiFieldId | getIndexLayer (int geoid, Sketcher::PointPos pos) |
given the {GeoId, PointPos} of a curve or point, returns MultiFieldId containing the MF index and the coin layer of the curve or point More... | |
MultiFieldId | getIndexLayer (int vertexId) |
given the VertexId of a point, returns MultiFieldId containing the MF index and the coin layer of the point More... | |
int | getPointGeoId (int pointindex, int layerindex) |
given the MF index of a point and the coin layer in which it is drawn returns the GeoId of the point More... | |
int | getPointVertexId (int pointindex, int layerindex) |
given the MF index of a point and the coin layer in which it is drawn returns the VertexId of the point More... | |
Public Attributes | |
std::vector< std::vector< int > > | CurvIdToGeoId |
std::map< Sketcher::GeoElementId, MultiFieldId > | GeoElementId2SetId |
This maps GeoElementId index {GeoId, PointPos} to a {coin layer and MF index} of a curve or point. More... | |
std::vector< std::vector< int > > | PointIdToGeoId |
std::vector< std::vector< int > > | PointIdToVertexId |
Helper struct containing index conversions (mappings) between {GeoId, PointPos} and MF indices per layer, and VertexId and MF indices per layer.
These are updated with every draw of the scenegraph.
void SketcherGui::CoinMapping::clear | ( | void | ) |
References CurvIdToGeoId, GeoElementId2SetId, PointIdToGeoId, and PointIdToVertexId.
Referenced by SketcherGui::EditModeGeometryCoinConverter::convert().
given the MF index of a curve and the coin layer in which it is drawn returns the GeoId of the curve
References CurvIdToGeoId.
Referenced by SketcherGui::EditModeCoinManager::detectPreselection(), and SketcherGui::EditModeGeometryCoinManager::updateGeometryColor().
MultiFieldId SketcherGui::CoinMapping::getIndexLayer | ( | int | geoid, |
Sketcher::PointPos | pos | ||
) |
given the {GeoId, PointPos} of a curve or point, returns MultiFieldId containing the MF index and the coin layer of the curve or point
References GeoElementId2SetId, and SketcherGui::MultiFieldId::Invalid.
Referenced by SketcherGui::EditModeConstraintCoinManager::updateConstraintColor(), and SketcherGui::EditModeGeometryCoinManager::updateGeometryColor().
MultiFieldId SketcherGui::CoinMapping::getIndexLayer | ( | int | vertexId | ) |
given the VertexId of a point, returns MultiFieldId containing the MF index and the coin layer of the point
References DraftVecUtils::find(), SketcherGui::MultiFieldId::Invalid, and PointIdToVertexId.
given the MF index of a point and the coin layer in which it is drawn returns the GeoId of the point
References PointIdToGeoId.
Referenced by SketcherGui::EditModeGeometryCoinManager::updateGeometryColor().
given the MF index of a point and the coin layer in which it is drawn returns the VertexId of the point
References PointIdToVertexId.
Referenced by SketcherGui::EditModeCoinManager::detectPreselection().
std::vector<std::vector<int> > SketcherGui::CoinMapping::CurvIdToGeoId |
Referenced by clear(), SketcherGui::EditModeGeometryCoinConverter::convert(), and getCurveGeoId().
std::map<Sketcher::GeoElementId,MultiFieldId> SketcherGui::CoinMapping::GeoElementId2SetId |
This maps GeoElementId index {GeoId, PointPos} to a {coin layer and MF index} of a curve or point.
Referenced by clear(), SketcherGui::EditModeGeometryCoinConverter::convert(), and getIndexLayer().
std::vector<std::vector<int> > SketcherGui::CoinMapping::PointIdToGeoId |
Referenced by clear(), SketcherGui::EditModeGeometryCoinConverter::convert(), and getPointGeoId().
std::vector<std::vector<int> > SketcherGui::CoinMapping::PointIdToVertexId |
Referenced by clear(), SketcherGui::EditModeGeometryCoinConverter::convert(), getIndexLayer(), and getPointVertexId().