27#ifndef EASY3D_RENDERER_DRAWABLE_LINES_2D_H
28#define EASY3D_RENDERER_DRAWABLE_LINES_2D_H
30#include <easy3d/renderer/drawable.h>
61 void draw(
const Camera* camera)
const override;
74 void update_vertex_buffer(
const std::vector<vec2> &vertices,
int width,
int height,
bool dynamic =
false);
A perspective or orthographic camera.
Definition camera.h:113
Type
The type of the drawable.
Definition drawable.h:63
@ DT_LINES
Lines drawable (GL_LINES).
Definition drawable.h:65
const std::string & name() const
Returns the name of the drawable.
Definition drawable.h:92
Drawable(const std::string &name="unknown", Model *model=nullptr)
Constructor that initializes the drawable with a name and an optional model.
Definition drawable.cpp:46
void update_vertex_buffer(const std::vector< vec2 > &vertices, int width, int height, bool dynamic=false)
Creates/Updates the vertex buffer.
Definition drawable_lines_2D.cpp:44
void draw(const Camera *camera) const override
Draws the drawable.
Definition drawable_lines_2D.cpp:62
Type type() const override
Returns the type of the drawable.
Definition drawable_lines_2D.h:55
LinesDrawable2D(const std::string &name="")
Constructor that initializes the drawable with a name.
Definition drawable_lines_2D.cpp:37
Definition collider.cpp:182