24 template<
typename TDataType>
30 typedef typename TDataType::Real
Real;
31 typedef typename TDataType::Coord
Coord;
37 DEF_VAR(std::string, PointId,
"",
"Primtive ID");
39 DEF_VAR(std::string, EdgeId,
"",
"Primtive ID");
41 DEF_VAR(std::string, PrimitiveId,
"",
"Primtive ID");
74 void substrFromTwoString(std::string& first, std::string& Second, std::string& line, std::string& MyStr,
int& index);
76 void updateID(std::string currentString, std::vector<uint>& idSet)
78 std::vector<std::string> parmList;
85 if (currentString.size())
87 std::string first =
" ";
88 std::string second =
" ";
90 for (
size_t i = 0; i < parmNum; i++)
96 parmList.push_back(tempS);
100 for (
auto it : parmList)
102 std::string ss =
"\-";
103 auto s = it.find(ss);
106 if (s == std::string::npos)
108 std::stringstream ss1 = std::stringstream(it);
110 idSet.push_back(tempint1);
114 std::stringstream ss1 = std::stringstream(it.substr(0, s));
115 std::stringstream ss2 = std::stringstream(it.substr(s + 1, it.size() - 1));
121 int length = tempint2 - tempint1 + 1;
123 for (
size_t i = 0; i < length; i++)
125 idSet.push_back(tempint1);
135 std::string findstr =
" ";
137 int j = findstr.length();
142 while ((k = currentString.find(findstr, pos)) != -1)
150 printf(
"********************* The input file is invalid*********************\n");
155 printf(
"string size : %d \n", parmNum);
#define IMPLEMENT_TCLASS(name, T1)
DEF_VAR(std::string, PointId, "", "Primtive ID")
std::vector< uint > getSelectPrimitives()
std::vector< uint > selectedPointID
std::vector< uint > selectedEdgeID
DEF_VAR(std::string, EdgeId, "", "Primtive ID")
DECLARE_TCLASS(Group, TDataType)
void resetStates() override
std::vector< uint > getSelectEdges()
DEF_ARRAY_IN(uint, EdgeId, DeviceType::GPU, "EdgeId")
int getparmNum(std::string currentString)
void substrFromTwoString(std::string &first, std::string &Second, std::string &line, std::string &MyStr, int &index)
DEF_ARRAY_IN(uint, PointId, DeviceType::GPU, "PointId")
DEF_ARRAY_IN(uint, PrimitiveId, DeviceType::GPU, "primtive id")
std::vector< uint > selectedPrimitiveID
DEF_VAR(std::string, PrimitiveId, "", "Primtive ID")
std::vector< uint > getSelectPoints()
void updateID(std::string currentString, std::vector< uint > &idSet)
This is an implementation of AdditiveCCD based on peridyno.