mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:18:24 +02:00
how did these happen
This commit is contained in:
parent
f8f13e974d
commit
dde7fbdfce
3 changed files with 10 additions and 67 deletions
|
@ -1193,12 +1193,6 @@ QVector<QUuid> EntityScriptingInterface::findEntitiesByType(const QString entity
|
||||||
_entityTree->withReadLock([&] {
|
_entityTree->withReadLock([&] {
|
||||||
_entityTree->evalEntitiesInSphereWithType(center, radius, type, PickFilter(searchFilter), result);
|
_entityTree->evalEntitiesInSphereWithType(center, radius, type, PickFilter(searchFilter), result);
|
||||||
});
|
});
|
||||||
|
|
||||||
foreach(EntityItemPointer entity, entities) {
|
|
||||||
if (entity->getType() == type) {
|
|
||||||
result << entity->getEntityItemID().toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1210,24 +1204,6 @@ QVector<QUuid> EntityScriptingInterface::findEntitiesByName(const QString entity
|
||||||
unsigned int searchFilter = PickFilter::getBitMask(PickFilter::FlagBit::DOMAIN_ENTITIES) | PickFilter::getBitMask(PickFilter::FlagBit::AVATAR_ENTITIES);
|
unsigned int searchFilter = PickFilter::getBitMask(PickFilter::FlagBit::DOMAIN_ENTITIES) | PickFilter::getBitMask(PickFilter::FlagBit::AVATAR_ENTITIES);
|
||||||
_entityTree->evalEntitiesInSphereWithName(center, radius, entityName, caseSensitiveSearch, PickFilter(searchFilter), result);
|
_entityTree->evalEntitiesInSphereWithName(center, radius, entityName, caseSensitiveSearch, PickFilter(searchFilter), result);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (caseSensitiveSearch) {
|
|
||||||
foreach(EntityItemPointer entity, entities) {
|
|
||||||
if (entity->getName() == entityName) {
|
|
||||||
result << entity->getEntityItemID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
QString entityNameLowerCase = entityName.toLower();
|
|
||||||
|
|
||||||
foreach(EntityItemPointer entity, entities) {
|
|
||||||
QString entityItemLowerCase = entity->getName().toLower();
|
|
||||||
if (entityItemLowerCase == entityNameLowerCase) {
|
|
||||||
result << entity->getEntityItemID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1262,13 +1238,6 @@ RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionVecto
|
||||||
return evalRayIntersectionWorker(ray, Octree::Lock, searchFilter, entityIdsToInclude, entityIdsToDiscard);
|
return evalRayIntersectionWorker(ray, Octree::Lock, searchFilter, entityIdsToInclude, entityIdsToDiscard);
|
||||||
}
|
}
|
||||||
|
|
||||||
RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionVector(const PickRay& ray, PickFilter searchFilter,
|
|
||||||
const QVector<EntityItemID>& entityIdsToInclude, const QVector<EntityItemID>& entityIdsToDiscard) {
|
|
||||||
PROFILE_RANGE(script_entities, __FUNCTION__);
|
|
||||||
|
|
||||||
return evalRayIntersectionWorker(ray, Octree::Lock, searchFilter, entityIdsToInclude, entityIdsToDiscard);
|
|
||||||
}
|
|
||||||
|
|
||||||
RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionWorker(const PickRay& ray,
|
RayToEntityIntersectionResult EntityScriptingInterface::evalRayIntersectionWorker(const PickRay& ray,
|
||||||
Octree::lockType lockType, PickFilter searchFilter, const QVector<EntityItemID>& entityIdsToInclude,
|
Octree::lockType lockType, PickFilter searchFilter, const QVector<EntityItemID>& entityIdsToInclude,
|
||||||
const QVector<EntityItemID>& entityIdsToDiscard) const {
|
const QVector<EntityItemID>& entityIdsToDiscard) const {
|
||||||
|
|
|
@ -513,32 +513,6 @@ public slots:
|
||||||
const QScriptValue& entityIdsToInclude = QScriptValue(), const QScriptValue& entityIdsToDiscard = QScriptValue(),
|
const QScriptValue& entityIdsToInclude = QScriptValue(), const QScriptValue& entityIdsToDiscard = QScriptValue(),
|
||||||
bool visibleOnly = false, bool collidableOnly = false) const;
|
bool visibleOnly = false, bool collidableOnly = false) const;
|
||||||
|
|
||||||
/// Same as above but with QVectors
|
|
||||||
RayToEntityIntersectionResult findRayIntersectionVector(const PickRay& ray, bool precisionPicking,
|
|
||||||
const QVector<EntityItemID>& entityIdsToInclude, const QVector<EntityItemID>& entityIdsToDiscard,
|
|
||||||
bool visibleOnly, bool collidableOnly);
|
|
||||||
|
|
||||||
/**jsdoc
|
|
||||||
* Find the first entity intersected by a {@link PickRay}. <code>Light</code> and <code>Zone</code> entities are not
|
|
||||||
* intersected unless they've been configured as pickable using {@link Entities.setLightsArePickable|setLightsArePickable}
|
|
||||||
* and {@link Entities.setZonesArePickable|setZonesArePickable}, respectively.<br />
|
|
||||||
* This is a synonym for {@link Entities.findRayIntersection|findRayIntersection}.
|
|
||||||
* @function Entities.findRayIntersectionBlocking
|
|
||||||
* @param {PickRay} pickRay - The PickRay to use for finding entities.
|
|
||||||
* @param {boolean} [precisionPicking=false] - If <code>true</code> and the intersected entity is a <code>Model</code>
|
|
||||||
* entity, the result's <code>extraInfo</code> property includes more information than it otherwise would.
|
|
||||||
* @param {Uuid[]} [entitiesToInclude=[]] - If not empty then the search is restricted to these entities.
|
|
||||||
* @param {Uuid[]} [entitiesToDiscard=[]] - Entities to ignore during the search.
|
|
||||||
* @deprecated This function is deprecated and will soon be removed. Use
|
|
||||||
* {@link Entities.findRayIntersection|findRayIntersection} instead; it blocks and performs the same function.
|
|
||||||
*/
|
|
||||||
/// If the scripting context has visible entities, this will determine a ray intersection, and will block in
|
|
||||||
/// order to return an accurate result
|
|
||||||
Q_INVOKABLE RayToEntityIntersectionResult findRayIntersectionBlocking(const PickRay& ray, bool precisionPicking = false,
|
|
||||||
const QScriptValue& entityIdsToInclude = QScriptValue(), const QScriptValue& entityIdsToDiscard = QScriptValue());
|
|
||||||
|
|
||||||
>>>>>>> property range audit - add range info via macros accessible via API, tweak min/max/steps in entityProperties
|
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Reloads an entity's server entity script such that the latest version re-downloaded.
|
* Reloads an entity's server entity script such that the latest version re-downloaded.
|
||||||
* @function Entities.reloadServerScripts
|
* @function Entities.reloadServerScripts
|
||||||
|
|
Loading…
Reference in a new issue