mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
Add functionality to turn zone picking off
This commit is contained in:
parent
b31f95a002
commit
e0d4a0b1e1
4 changed files with 23 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include "EntityTree.h"
|
#include "EntityTree.h"
|
||||||
#include "LightEntityItem.h"
|
#include "LightEntityItem.h"
|
||||||
#include "ModelEntityItem.h"
|
#include "ModelEntityItem.h"
|
||||||
|
#include "ZoneEntityItem.h"
|
||||||
|
|
||||||
|
|
||||||
EntityScriptingInterface::EntityScriptingInterface() :
|
EntityScriptingInterface::EntityScriptingInterface() :
|
||||||
|
@ -315,6 +316,14 @@ bool EntityScriptingInterface::getLightsArePickable() const {
|
||||||
return LightEntityItem::getLightsArePickable();
|
return LightEntityItem::getLightsArePickable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EntityScriptingInterface::setZonesArePickable(bool value) {
|
||||||
|
ZoneEntityItem::setZonesArePickable(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EntityScriptingInterface::getZonesArePickable() const {
|
||||||
|
return ZoneEntityItem::getZonesArePickable();
|
||||||
|
}
|
||||||
|
|
||||||
void EntityScriptingInterface::setSendPhysicsUpdates(bool value) {
|
void EntityScriptingInterface::setSendPhysicsUpdates(bool value) {
|
||||||
EntityItem::setSendPhysicsUpdates(value);
|
EntityItem::setSendPhysicsUpdates(value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,9 @@ public slots:
|
||||||
Q_INVOKABLE void setLightsArePickable(bool value);
|
Q_INVOKABLE void setLightsArePickable(bool value);
|
||||||
Q_INVOKABLE bool getLightsArePickable() const;
|
Q_INVOKABLE bool getLightsArePickable() const;
|
||||||
|
|
||||||
|
Q_INVOKABLE void setZonesArePickable(bool value);
|
||||||
|
Q_INVOKABLE bool getZonesArePickable() const;
|
||||||
|
|
||||||
Q_INVOKABLE void setSendPhysicsUpdates(bool value);
|
Q_INVOKABLE void setSendPhysicsUpdates(bool value);
|
||||||
Q_INVOKABLE bool getSendPhysicsUpdates() const;
|
Q_INVOKABLE bool getSendPhysicsUpdates() const;
|
||||||
|
|
||||||
|
|
|
@ -185,3 +185,9 @@ void ZoneEntityItem::debugDump() const {
|
||||||
qCDebug(entities) << " _stageHour:" << _stageHour;
|
qCDebug(entities) << " _stageHour:" << _stageHour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ZoneEntityItem::findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
|
bool& keepSearching, OctreeElement*& element, float& distance, BoxFace& face,
|
||||||
|
void** intersectedObject, bool precisionPicking) const {
|
||||||
|
|
||||||
|
return _zonesArePickable;
|
||||||
|
}
|
||||||
|
|
|
@ -91,7 +91,11 @@ public:
|
||||||
|
|
||||||
static bool getZonesArePickable() { return _zonesArePickable; }
|
static bool getZonesArePickable() { return _zonesArePickable; }
|
||||||
static void setZonesArePickable(bool value) { _zonesArePickable = value; }
|
static void setZonesArePickable(bool value) { _zonesArePickable = value; }
|
||||||
|
|
||||||
|
virtual bool supportsDetailedRayIntersection() const { return true; }
|
||||||
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
|
bool& keepSearching, OctreeElement*& element, float& distance, BoxFace& face,
|
||||||
|
void** intersectedObject, bool precisionPicking) const;
|
||||||
|
|
||||||
virtual void debugDump() const;
|
virtual void debugDump() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue