11#ifndef JAU_GAMP_GRAPH_TESS_IMPL_GRAPHOUTLINE_HPP_
12#define JAU_GAMP_GRAPH_TESS_IMPL_GRAPHOUTLINE_HPP_
24namespace gamp::graph::tess::impl {
26 using namespace jau::math;
27 using namespace jau::math::geom;
28 using namespace gamp::graph;
29 using namespace gamp::graph::tess;
38 typedef std::shared_ptr<GraphOutline> GraphOutlineRef;
39 typedef jau::darray<GraphOutlineRef, uint32_t> GraphOutlineRefList;
44 typedef std::unique_ptr<Outline, jau::OptDeleter<Outline>> OutlinePtr;
46 GraphVertexRefList m_controlpoints;
50 : m_outline(new Outline(), jau::OptDeleter<Outline>(true)),
53 m_controlpoints.reserve(3);
63 GraphOutline(Outline& ol)
64 : m_outline(&ol, jau::OptDeleter<Outline>(false))
69 m_controlpoints.push_back(GraphVertex::create(v));
73 static GraphOutlineRef create() {
74 return std::make_shared<GraphOutline>();
76 static GraphOutlineRef create(Outline& ol) {
77 return std::make_shared<GraphOutline>(ol);
80 const Outline& outline() const noexcept {
return *m_outline; }
82 const GraphVertexRefList& graphPoints() const noexcept {
return m_controlpoints; }
84 const VertexList& vertices() const noexcept {
return m_outline->vertices(); }
86 void addVertex(
const GraphVertexRef& v) {
88 m_outline->addVertex(v->vertex());
constexpr const VertexList & vertices() const noexcept
constexpr size_type size() const noexcept
Like std::vector::size().
constexpr void push_back(const value_type &x)
Like std::vector::push_back(), copy.
constexpr self_t & reserve(size_type new_capacity)
Like std::vector::reserve(), increases this instance's capacity to new_capacity.
jau::darray< Vertex, uint32_t > VertexList