// // AnimDebugDraw.h // // Copyright 2015 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #ifndef hifi_AnimDebugDraw_h #define hifi_AnimDebugDraw_h #include #include #include #include "AnimNode.h" #include "AnimSkeleton.h" class AnimDebugDrawData; typedef render::Payload AnimDebugDrawPayload; class AnimDebugDraw { public: static AnimDebugDraw& getInstance(); AnimDebugDraw(); ~AnimDebugDraw(); void shutdown(); void addAbsolutePoses(const std::string& key, AnimSkeleton::ConstPointer skeleton, const AnimPoseVec& poses, const AnimPose& rootPose, const glm::vec4& color); void removeAbsolutePoses(const std::string& key); void update(); protected: std::shared_ptr _animDebugDrawData; std::shared_ptr _animDebugDrawPayload; render::ItemID _itemID{ render::Item::INVALID_ITEM_ID }; static gpu::PipelinePointer _pipeline; typedef std::tuple PosesInfo; typedef std::unordered_map PosesInfoMap; PosesInfoMap _posesInfoMap; // no copies AnimDebugDraw(const AnimDebugDraw&) = delete; AnimDebugDraw& operator=(const AnimDebugDraw&) = delete; }; #endif // hifi_AnimDebugDraw