mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-10 05:32:18 -06:00
test used code from Anders branch to check why i get 0 on y on first position of each line
This commit is contained in:
@@ -141,7 +141,7 @@ void FindLastClosedFieldlinesTask::perform(
|
||||
LINFO(std::format("First Pos: {}", firstPos));
|
||||
LINFO(std::format("Last Pos: {}", lastPos));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace openspace {
|
||||
std::string _tracingVar = "b";
|
||||
std::filesystem::path _inputPath;
|
||||
std::vector<std::string> _sourceFiles;
|
||||
int _numberOfPointsOnBoundary = 3;
|
||||
int _numberOfPointsOnBoundary = 10;
|
||||
float _threshold = 0.5; //RE
|
||||
std::filesystem::path _outputFolder;
|
||||
bool _saveLastIterationOfFieldLines = true;
|
||||
|
||||
@@ -337,17 +337,30 @@ bool addLinesToState(ccmc::Kameleon* kameleon, const std::vector<glm::vec3>& see
|
||||
seed.y,
|
||||
seed.z
|
||||
);
|
||||
const std::vector<ccmc::Point3f>& positions = ccmcFieldline.getPositions();
|
||||
ccmcFieldline.getDs();
|
||||
ccmcFieldline.measure();
|
||||
ccmc::Fieldline mappedFieldline =
|
||||
ccmcFieldline.interpolate(1, ccmcFieldline.getPositions().size());
|
||||
const std::vector<ccmc::Point3f>& fieldlinePositions =
|
||||
mappedFieldline.getPositions();
|
||||
|
||||
const size_t nLinePoints = positions.size();
|
||||
|
||||
std::vector<glm::vec3> vertices;
|
||||
vertices.reserve(nLinePoints);
|
||||
for (const ccmc::Point3f& p : positions) {
|
||||
vertices.emplace_back(p.component1, p.component2, p.component3);
|
||||
for (const ccmc::Point3f& pt : fieldlinePositions) {
|
||||
vertices.emplace_back(pt.component1, pt.component2, pt.component3);
|
||||
}
|
||||
|
||||
|
||||
//const std::vector<ccmc::Point3f>& positions = ccmcFieldline.getPositions();
|
||||
|
||||
//const size_t nLinePoints = positions.size();
|
||||
|
||||
//vertices.reserve(nLinePoints);
|
||||
//for (const ccmc::Point3f& p : positions) {
|
||||
// vertices.emplace_back(p.component1, p.component2, p.component3);
|
||||
//}
|
||||
state.addLine(vertices);
|
||||
success |= (nLinePoints > 0);
|
||||
success |= (vertices.size() > 0);
|
||||
}
|
||||
|
||||
return success;
|
||||
|
||||
Reference in New Issue
Block a user