History

introduce precision picking in API form

ZappoMan committed 11 years ago

Commit 7ea85071 parent 303274a23 files · +74 −78Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 23 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+6−5
@@ -196,16 +196,17 @@ QVector<EntityItemID> EntityScriptingInterface::findEntities(const glm::vec3& ce · 195 unmodified lines
196 return result;196 return result;
197}197}
198 198
199RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersection(const PickRay& ray) {199RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersection(const PickRay& ray, bool precisionPicking) {
200 return findRayIntersectionWorker(ray, Octree::TryLock);200 return findRayIntersectionWorker(ray, Octree::TryLock, precisionPicking);
201}201}
202 202
203RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersectionBlocking(const PickRay& ray) {203RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersectionBlocking(const PickRay& ray, bool precisionPicking) {
204 return findRayIntersectionWorker(ray, Octree::Lock);204 return findRayIntersectionWorker(ray, Octree::Lock, precisionPicking);
205}205}
206 206
207RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersectionWorker(const PickRay& ray, 207RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersectionWorker(const PickRay& ray,
208 Octree::lockType lockType) {208 Octree::lockType lockType,
209 bool precisionPicking) {
209 RayToEntityIntersectionResult result;210 RayToEntityIntersectionResult result;
210 if (_entityTree) {211 if (_entityTree) {
211 OctreeElement* element;212 OctreeElement* element;