sf-svg
VertexVector.hpp
Go to the documentation of this file.
1 /* =========================================================== *
2  * sf-svg (c) Kamil Koczurek | koczurekk@gmail.com *
3  * GNU GPL v3 License http://www.gnu.org/licenses/gpl-3.0.html *
4  * =========================================================== */
5 
10 
11 #ifndef VERTEXVECTOR
12 #define VERTEXVECTOR
13 
14 #include <SFML/Graphics/RenderTarget.hpp>
15 #include <SFML/Graphics/VertexArray.hpp>
16 #include <vector>
17 
18 namespace sfc {
58  template<sf::PrimitiveType TPrimitive>
59  struct VertexVector
60  : public std::vector<sf::Vertex>,
61  public sf::Drawable {
62  using std::vector<sf::Vertex>::vector;
63 
64  private:
65  virtual void draw(sf::RenderTarget& mRenderTarget, sf::RenderStates mRenderStates) const {
66  mRenderTarget.draw(&this->operator [](0), this->size(), TPrimitive, mRenderStates);
67  }
68  };
69 }
70 #endif
Namespace that contains all sf-svg method, classes, enums etc.
Definition: Base.hpp:20
Drawable std::vector<sf::Vertex>
Definition: VertexVector.hpp:59