mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 18:13:29 +02:00
Merge pull request #4744 from huffman/show-zone-boundaries
Add draw zone boundaries bool
This commit is contained in:
commit
417810c683
6 changed files with 25 additions and 2 deletions
|
@ -74,6 +74,12 @@ void RenderableZoneEntityItem::initialSimulation() {
|
|||
_needsInitialSimulation = false;
|
||||
}
|
||||
|
||||
void RenderableZoneEntityItem::render(RenderArgs* args) {
|
||||
if (_drawZoneBoundaries) {
|
||||
// TODO: Draw the zone boundaries...
|
||||
}
|
||||
}
|
||||
|
||||
bool RenderableZoneEntityItem::contains(const glm::vec3& point) const {
|
||||
if (getShapeType() != SHAPE_TYPE_COMPOUND) {
|
||||
return EntityItem::contains(point);
|
||||
|
@ -92,4 +98,4 @@ bool RenderableZoneEntityItem::contains(const glm::vec3& point) const {
|
|||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ public:
|
|||
ReadBitstreamToTreeParams& args,
|
||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData);
|
||||
|
||||
virtual void render(RenderArgs* args);
|
||||
virtual bool contains(const glm::vec3& point) const;
|
||||
|
||||
private:
|
||||
|
@ -45,4 +46,4 @@ private:
|
|||
bool _needsInitialSimulation;
|
||||
};
|
||||
|
||||
#endif // hifi_RenderableZoneEntityItem_h
|
||||
#endif // hifi_RenderableZoneEntityItem_h
|
||||
|
|
|
@ -324,6 +324,14 @@ bool EntityScriptingInterface::getZonesArePickable() const {
|
|||
return ZoneEntityItem::getZonesArePickable();
|
||||
}
|
||||
|
||||
void EntityScriptingInterface::setDrawZoneBoundaries(bool value) {
|
||||
ZoneEntityItem::setDrawZoneBoundaries(value);
|
||||
}
|
||||
|
||||
bool EntityScriptingInterface::getDrawZoneBoundaries() const {
|
||||
return ZoneEntityItem::getDrawZoneBoundaries();
|
||||
}
|
||||
|
||||
void EntityScriptingInterface::setSendPhysicsUpdates(bool value) {
|
||||
EntityItem::setSendPhysicsUpdates(value);
|
||||
}
|
||||
|
|
|
@ -114,6 +114,9 @@ public slots:
|
|||
Q_INVOKABLE void setZonesArePickable(bool value);
|
||||
Q_INVOKABLE bool getZonesArePickable() const;
|
||||
|
||||
Q_INVOKABLE void setDrawZoneBoundaries(bool value);
|
||||
Q_INVOKABLE bool getDrawZoneBoundaries() const;
|
||||
|
||||
Q_INVOKABLE void setSendPhysicsUpdates(bool value);
|
||||
Q_INVOKABLE bool getSendPhysicsUpdates() const;
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "EntityTreeElement.h"
|
||||
|
||||
bool ZoneEntityItem::_zonesArePickable = false;
|
||||
bool ZoneEntityItem::_drawZoneBoundaries = false;
|
||||
|
||||
const xColor ZoneEntityItem::DEFAULT_KEYLIGHT_COLOR = { 255, 255, 255 };
|
||||
const float ZoneEntityItem::DEFAULT_KEYLIGHT_INTENSITY = 1.0f;
|
||||
|
|
|
@ -91,6 +91,9 @@ public:
|
|||
|
||||
static bool getZonesArePickable() { return _zonesArePickable; }
|
||||
static void setZonesArePickable(bool value) { _zonesArePickable = value; }
|
||||
|
||||
static bool getDrawZoneBoundaries() { return _drawZoneBoundaries; }
|
||||
static void setDrawZoneBoundaries(bool value) { _drawZoneBoundaries = value; }
|
||||
|
||||
virtual bool isReadyToComputeShape() { return false; }
|
||||
void updateShapeType(ShapeType type) { _shapeType = type; }
|
||||
|
@ -136,6 +139,7 @@ protected:
|
|||
ShapeType _shapeType = SHAPE_TYPE_NONE;
|
||||
QString _compoundShapeURL;
|
||||
|
||||
static bool _drawZoneBoundaries;
|
||||
static bool _zonesArePickable;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue