25 #ifndef SFML_VERTEXARRAY_HPP
26 #define SFML_VERTEXARRAY_HPP
31 #include <SFML/Graphics/Export.hpp>
32 #include <SFML/Graphics/Vertex.hpp>
33 #include <SFML/Graphics/PrimitiveType.hpp>
34 #include <SFML/Graphics/Rect.hpp>
35 #include <SFML/Graphics/Drawable.hpp>
88 Vertex& operator [](std::size_t index);
104 const Vertex& operator [](std::size_t index)
const;
190 std::vector<Vertex> m_vertices;
197 #endif // SFML_VERTEXARRAY_HPP
FloatRect getBounds() const
Compute the bounding rectangle of the vertex array.
PrimitiveType getPrimitiveType() const
Get the type of primitives drawn by the vertex array.
void resize(std::size_t vertexCount)
Resize the vertex array.
Abstract base class for objects that can be drawn to a render target.
void clear()
Clear the vertex array.
Define the states used for drawing to a RenderTarget.
std::size_t getVertexCount() const
Return the vertex count.
VertexArray(PrimitiveType type, std::size_t vertexCount=0)
Construct the vertex array with a type and an initial number of vertices.
VertexArray()
Default constructor.
void setPrimitiveType(PrimitiveType type)
Set the type of primitives to draw.
Base class for all render targets (window, texture, ...)
Define a set of one or more 2D primitives.
Define a point with color and texture coordinates.
void append(const Vertex &vertex)
Add a vertex to the array.
PrimitiveType
Types of primitives that a sf::VertexArray can render.