summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry/circle_buffer.hpp
blob: 30e339bb61ef7dbca5a66a7666ec0512625aad02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef MBGL_GEOMETRY_CIRCLE_BUFFER
#define MBGL_GEOMETRY_CIRCLE_BUFFER

#include <mbgl/geometry/buffer.hpp>

namespace mbgl {

class CircleVertexBuffer : public Buffer<
    4 // 2 bytes per short * 4 of them.
> {
public:
    typedef int16_t vertex_type;

    /*
     * Add a vertex to this buffer
     *
     * @param {number} x vertex position
     * @param {number} y vertex position
     * @param {number} ex extrude normal
     * @param {number} ey extrude normal
     */
    void add(vertex_type x, vertex_type y, float ex, float ey);
};

} // namespace mbgl

#endif // MBGL_GEOMETRY_CIRCLE_BUFFER