2#include "Topology/PointSet.h"
3#include "GLSurfaceVisualModule.h"
4#include "GLWireframeVisualModule.h"
5#include "GLPointVisualModule.h"
11 template<typename TDataType>
12 Group<TDataType>::Group()
14 auto callback = std::make_shared<FCallBackFunc>(std::bind(&Group<TDataType>::varChanged, this));
16 this->varPrimitiveId()->attach(callback);
17 this->varEdgeId()->attach(callback);
18 this->varPointId()->attach(callback);
20 this->inPointId()->tagOptional(true);
21 this->inEdgeId()->tagOptional(true);
22 this->inPrimitiveId()->tagOptional(true);
26 template<typename TDataType>
27 void Group<TDataType>::resetStates()
33 template<typename TDataType>
34 void Group<TDataType>::varChanged()
37 std::string currentString;
39 if (this->varPointId()->getValue().size())
41 currentString = this->varPointId()->getData();
42 updateID(currentString, selectedPointID);
45 if (this->varEdgeId()->getValue().size())
47 currentString = this->varEdgeId()->getData();
48 updateID(currentString, selectedEdgeID);
51 if (this->varPrimitiveId()->getValue().size())
53 currentString = this->varPrimitiveId()->getData();
54 updateID(currentString, selectedPrimitiveID);
61 template<typename TDataType>
62 void Group<TDataType>::substrFromTwoString(std::string& first, std::string& Second, std::string& line, std::string& myStr, int& index)
64 if (index < int(line.size()))
66 size_t posStart = line.find(first, index);
67 size_t posEnd = line.find(Second, posStart + 1);
70 myStr = line.substr(posStart, posEnd - posStart);
73 std::stringstream ss2(line);