/**************************************************************************** ** Copyright (c) 2022, Fougue Ltd. ** All rights reserved. ** See license at https://github.com/fougue/mayo/blob/master/LICENSE.txt ****************************************************************************/ #pragma once #include "occ_handle.h" #include "span.h" #include #include #include namespace Mayo { class TriangulationAnnexData; DEFINE_STANDARD_HANDLE(TriangulationAnnexData, TDF_Attribute) using TriangulationAnnexDataPtr = OccHandle; class TriangulationAnnexData : public TDF_Attribute { public: static const Standard_GUID& GetID(); static TriangulationAnnexDataPtr Set(const TDF_Label& label); static TriangulationAnnexDataPtr Set(const TDF_Label& label, Span spanNodeColor); static TriangulationAnnexDataPtr Set(const TDF_Label& label, std::vector&& vecNodeColor); Span nodeColors() const { return m_vecNodeColor; } // -- from TDF_Attribute const Standard_GUID& ID() const override; void Restore(const OccHandle& attribute) override; OccHandle NewEmpty() const override; void Paste(const OccHandle& into, const OccHandle& table) const override; Standard_OStream& Dump(Standard_OStream& ostr) const override; DEFINE_STANDARD_RTTI_INLINE(TriangulationAnnexData, TDF_Attribute) private: void copyNodeColors(Span spanNodeColor); std::vector m_vecNodeColor; }; } // namespace Mayo