57 std::vector<DataWithAesthetic>
m_data;
87 float get_time(
const int i)
const {
return m_times[i]; }
91 size_t data_size()
const {
return m_data.size(); }
106 void set_label(
const std::string &label) { m_label = label; }
108 const std::string &get_label()
const {
return m_label; }
111 #ifdef TRASE_BACKEND_GL 115 virtual void dispatch_legend(
BackendSVG &file,
float time,
119 template <
typename AnimatedBackend>
void draw(
AnimatedBackend &backend);
120 template <
typename Backend>
void draw(
Backend &backend,
float time);
121 template <
typename AnimatedBackend>
123 template <
typename Backend>
129 #define TRASE_DISPATCH_LEGEND(backend_type) \ 130 void dispatch_legend(backend_type &backend, float time, \ 131 const bfloat2_t &box) override { \ 132 draw_legend(backend, time, box); \ 135 #define TRASE_ANIMATED_DISPATCH_LEGEND(backend_type) \ 136 void dispatch_legend(backend_type &backend, const bfloat2_t &box) override { \ 137 draw_legend(backend, box); \ 140 #define TRASE_DISPATCH_LEGEND_SVG \ 141 TRASE_DISPATCH_LEGEND(BackendSVG) \ 142 TRASE_ANIMATED_DISPATCH_LEGEND(BackendSVG) 144 #ifdef TRASE_BACKEND_GL 145 #define TRASE_DISPATCH_LEGEND_GL TRASE_DISPATCH_LEGEND(BackendGL) 147 #define TRASE_DISPATCH_LEGEND_GL 150 #define TRASE_GEOMETRY_DISPATCH_BACKENDS \ 153 TRASE_DISPATCH_LEGEND_SVG \ 154 TRASE_DISPATCH_LEGEND_GL 156 #include "frontend/Geometry.tcc" void add_frame(const DataWithAesthetic &data, float time)
Adds a new data frame to this plot.
Definition: Geometry.cpp:47
std::vector< float > m_times
the animation frame times (see add_frame_time())
Definition: Drawable.hpp:117
a base class for all the backends that support drawing a single frame
Definition: Backend.hpp:50
Contains the minimum and maximum extents of a hypercube in D dimensional space.
Definition: BBox.hpp:54
An 2D axis that can contain zero or more Geometry objects.
Definition: Axis.hpp:85
a linear segmented colormap
Definition: Colors.hpp:119
Combination of the RawData class and Aesthetics, this class points to a RawData object, and contains a mapping from aesthetics to RawData column numbers.
Definition: Data.hpp:243
Transform m_transform
transform
Definition: Geometry.hpp:69
const Colormap * m_colormap
colormap
Definition: Geometry.hpp:63
std::string m_label
label
Definition: Geometry.hpp:60
Base class for drawable objects in a figure.
Definition: Drawable.hpp:99
void set_label(const std::string &label)
Set the label.
Definition: Geometry.hpp:106
Contains classes and functions for handling data and aesthetics.
Definition: BackendGL.hpp:55
std::vector< DataWithAesthetic > m_data
dataset
Definition: Geometry.hpp:57
Limits m_limits
min/max limits of m_data across all frames
Definition: Geometry.hpp:66
a base class for all the backends that support animation over time
Definition: Backend.hpp:62
Definition: Geometry.hpp:54
Definition: BackendSVG.hpp:73
Axis * m_axis
parent axis
Definition: Geometry.hpp:72
void set_transform(const Transform &transform)
Sets the transform.
Definition: Geometry.hpp:99
Definition: Backend.cpp:39