Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 135 files). Show all
Unified · Split
| @@ -493,6 +493,13 @@ bool EntityScriptingInterface::setAllVoxels(QUuid entityID, int value) { · 492 unmodified lines | ||
| 493 | 493 | }); |
| 494 | 494 | } |
| 495 | 495 | |
| 496 | +bool EntityScriptingInterface::setVoxelsInCuboid(QUuid entityID, const glm::vec3& lowPosition, | |
| 497 | + const glm::vec3& cuboidSize, int value) { | |
| 498 | + return setVoxels(entityID, [lowPosition, cuboidSize, value](PolyVoxEntityItem& polyVoxEntity) { | |
| 499 | + return polyVoxEntity.setCuboid(lowPosition, cuboidSize, value); | |
| 500 | + }); | |
| 501 | +} | |
| 502 | + | |
| 496 | 503 | bool EntityScriptingInterface::setAllPoints(QUuid entityID, const QVector<glm::vec3>& points) { |
| 497 | 504 | EntityItemPointer entity = static_cast<EntityItemPointer>(_entityTree->findEntityByEntityItemID(entityID)); |
| 498 | 505 | if (!entity) { |