From 61712a6ac3425ca056b9a711a6a24f31bbd13aa3 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 27 May 2015 15:29:35 -0700 Subject: [PATCH] add some debugging streamers for some scene classes --- libraries/render/src/render/Scene.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libraries/render/src/render/Scene.h b/libraries/render/src/render/Scene.h index 6c78dbc3ad..c7d112e74b 100644 --- a/libraries/render/src/render/Scene.h +++ b/libraries/render/src/render/Scene.h @@ -94,6 +94,13 @@ public: bool isPickable() const { return _flags[PICKABLE]; } }; +inline QDebug operator<<(QDebug debug, const ItemKey& itemKey) { + debug << "[ItemKey: isOpaque:" << itemKey.isOpaque() + << ", isStatic:" << itemKey.isStatic() + << ", isWorldSpace:" << itemKey.isWorldSpace() + << "]"; + return debug; +} class ItemFilter { public: @@ -154,6 +161,12 @@ public: }; }; +inline QDebug operator<<(QDebug debug, const ItemFilter& me) { + debug << "[ItemFilter: opaqueShape:" << me.test(ItemKey::Builder::opaqueShape()) + << "]"; + return debug; +} + class Item { public: typedef std::vector Vector; @@ -203,6 +216,12 @@ protected: friend class Scene; }; +inline QDebug operator<<(QDebug debug, const Item& item) { + debug << "[Item: _key:" << item.getKey() << ", bounds:" << item.getBound() << "]"; + return debug; +} + + // THe Payload class is the real Payload to be used // THis allow anything to be turned into a Payload as long as the required interface functions are available // When creating a new kind of payload from a new "stuff" class then you need to create specialized version for "stuff"