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;
Abstract base class for objects that can be drawn to a render target.
Define the states used for drawing to a RenderTarget.
Base class for all render targets (window, texture, ...)
Define a set of one or more 2D primitives.
void resize(std::size_t vertexCount)
Resize the vertex array.
VertexArray()
Default constructor.
void clear()
Clear the vertex array.
VertexArray(PrimitiveType type, std::size_t vertexCount=0)
Construct the vertex array with a type and an initial number of vertices.
void append(const Vertex &vertex)
Add a vertex to the array.
PrimitiveType getPrimitiveType() const
Get the type of primitives drawn by the vertex array.
void setPrimitiveType(PrimitiveType type)
Set the type of primitives to draw.
FloatRect getBounds() const
Compute the bounding rectangle of the vertex array.
std::size_t getVertexCount() const
Return the vertex count.
Define a point with color and texture coordinates.
PrimitiveType
Types of primitives that a sf::VertexArray can render.