Add drawZoneBoundaries

This commit is contained in:
Ryan Huffman 2015-05-01 12:52:40 -07:00
parent 2bf7387723
commit 51c2a8273e
4 changed files with 14 additions and 2 deletions

View file

@ -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;
}
}

View file

@ -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

View file

@ -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;

View file

@ -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;
};