1#ifndef GENERATOR_REPEATPATH_HPP
2#define GENERATOR_REPEATPATH_HPP
14template<
typename path_t>
23 return index_ >= repeat_path_->instances_;
28 edge_t temp = edges_.generate();
40 delta_ += repeat_path_->vertex_count_;
41 edges_ = repeat_path_->path_.edges();
55 : repeat_path_{repeatPath}
56 , edges_{repeatPath->path_.edges()}
57 , index_{repeatPath->vertex_count_ > 0 ? 0 : repeatPath->instances_}
70 return index_ >= repeat_path_->instances_;
87 delta_ += repeat_path_->delta_;
88 vertices_ = repeat_path_->path_.vertices();
94 : repeat_path_{repeatPath}
95 , vertices_{repeatPath->path_.
vertices()}
96 , index_{repeatPath->vertex_count_ > 0 ? 0 : repeatPath->instances_}
109 int countvertices_t() const noexcept
111 if(repeat_path_->instances_ < 1)
114 return repeat_path_->vertex_count_ * (repeat_path_->instances_ - index_ - 1) +
count(vertices_);
128 explicit repeat_path_t(path_t path,
int instances,
const gml::dvec3& delta) noexcept
129 : path_{std::move(path)}
130 , instances_{instances}
132 , vertex_count_{
count(path_.vertices())}
156template<
typename path_t>
bool done() const noexcept
friend int count(const vertices_t &generator) noexcept
bool done() const noexcept
path_vertex_t generate() const
vertices_t vertices() const noexcept
edges_t edges() const noexcept
repeat_path_t(path_t path, int instances, const gml::dvec3 &delta) noexcept
repeat_path_t< path_t > repeat_path(path_t path, int instances, const gml::dvec3 &delta) noexcept
int count(const generator_t &generator) noexcept
Counts the number of steps left in the generator.