added move and more of the particle stuff
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user