Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 17 files). Show all
Unified · Split
| @@ -1457,6 +1457,17 @@ QVector<QUuid> EntityScriptingInterface::findEntitiesByName(const QString entity · 1456 unmodified lines | |||
| 1457 | return result; | 1457 | return result; |
| 1458 | } | 1458 | } |
| 1459 | 1459 | ||
| 1460 | QVector<QUuid> EntityScriptingInterface::findEntitiesByTags(const QVector<QString> entityTags, const glm::vec3& center, float radius, bool caseSensitiveSearch) const { | ||
| 1461 | QVector<QUuid> result; | ||
| 1462 | if (_entityTree) { | ||
| 1463 | _entityTree->withReadLock([&] { | ||
| 1464 | unsigned int searchFilter = PickFilter::getBitMask(PickFilter::FlagBit::DOMAIN_ENTITIES) | PickFilter::getBitMask(PickFilter::FlagBit::AVATAR_ENTITIES); | ||
| 1465 | _entityTree->evalEntitiesInSphereWithTags(center, radius, entityTags, caseSensitiveSearch, PickFilter(searchFilter), result); | ||
| 1466 | }); | ||
| 1467 | } | ||
| 1468 | return result; | ||
| 1469 | } | ||
| 1470 | |||
| 1460 | RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersection(const PickRay& ray, bool precisionPicking, | 1471 | RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersection(const PickRay& ray, bool precisionPicking, |
| 1461 | const ScriptValue& entityIdsToInclude, const ScriptValue& entityIdsToDiscard, bool visibleOnly, bool collidableOnly) const { | 1472 | const ScriptValue& entityIdsToInclude, const ScriptValue& entityIdsToDiscard, bool visibleOnly, bool collidableOnly) const { |
| 1462 | PROFILE_RANGE(script_entities, __FUNCTION__); | 1473 | PROFILE_RANGE(script_entities, __FUNCTION__); |