mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 07:23:00 +02:00
hook up overlaysToDiscard and overlaysToInclude in Overlays::findRayIntersection
This commit is contained in:
parent
81f6344023
commit
2b02998fae
1 changed files with 8 additions and 2 deletions
|
@ -412,13 +412,19 @@ RayToOverlayIntersectionResult Overlays::findRayIntersection(const PickRay& ray,
|
||||||
i.previous();
|
i.previous();
|
||||||
OverlayID thisID = i.key();
|
OverlayID thisID = i.key();
|
||||||
auto thisOverlay = std::dynamic_pointer_cast<Base3DOverlay>(i.value());
|
auto thisOverlay = std::dynamic_pointer_cast<Base3DOverlay>(i.value());
|
||||||
|
|
||||||
|
if ((overlaysToDiscard.size() > 0 && overlaysToDiscard.contains(thisID)) ||
|
||||||
|
(overlaysToInclude.size() > 0 && !overlaysToInclude.contains(thisID))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (thisOverlay && thisOverlay->getVisible() && !thisOverlay->getIgnoreRayIntersection() && thisOverlay->isLoaded()) {
|
if (thisOverlay && thisOverlay->getVisible() && !thisOverlay->getIgnoreRayIntersection() && thisOverlay->isLoaded()) {
|
||||||
float thisDistance;
|
float thisDistance;
|
||||||
BoxFace thisFace;
|
BoxFace thisFace;
|
||||||
glm::vec3 thisSurfaceNormal;
|
glm::vec3 thisSurfaceNormal;
|
||||||
QString thisExtraInfo;
|
QString thisExtraInfo;
|
||||||
if (thisOverlay->findRayIntersectionExtraInfo(ray.origin, ray.direction, thisDistance,
|
if (thisOverlay->findRayIntersectionExtraInfo(ray.origin, ray.direction, thisDistance,
|
||||||
thisFace, thisSurfaceNormal, thisExtraInfo)) {
|
thisFace, thisSurfaceNormal, thisExtraInfo)) {
|
||||||
bool isDrawInFront = thisOverlay->getDrawInFront();
|
bool isDrawInFront = thisOverlay->getDrawInFront();
|
||||||
if (thisDistance < bestDistance && (!bestIsFront || isDrawInFront)) {
|
if (thisDistance < bestDistance && (!bestIsFront || isDrawInFront)) {
|
||||||
bestIsFront = isDrawInFront;
|
bestIsFront = isDrawInFront;
|
||||||
|
|
Loading…
Reference in a new issue