added move and more of the particle stuff

This commit is contained in:
yggdrasil75
2026-02-05 06:52:02 -05:00
parent 341066a0cf
commit 39c38e4061
3 changed files with 54 additions and 45 deletions

View File

@@ -647,7 +647,7 @@ public:
}
bool inGrid(PointType pos) {
return root_.contains(pos);
return root_->contains(pos);
}
bool remove(const PointType& pos, float tolerance = 0.0001f) {
@@ -792,6 +792,15 @@ public:
}
}
bool move(const PointType& pos, const PointType& newPos) {
auto pointData = find(pos);
if (!pointData) return false;
if (!remove(pos)) return false;
return set(pointData->data, pointData->position, pointData->visible, pointData->color, pointData->size,
pointData->active, pointData->objectId, pointData->light, pointData->emittance,
pointData->refraction, pointData->reflection, pointData->shape);
}
bool setObjectId(const PointType& pos, int objectId, float tolerance = 0.0001f) {
auto pointData = find(pos, tolerance);
if (!pointData) return false;