12#ifndef __CODAC_VIBESFIGTUBE_H__
13#define __CODAC_VIBESFIGTUBE_H__
22 #define DEFAULT_TUBE_NAME "[?](·)"
23 #define DEFAULT_TRAJ_NAME "?(·)"
24 #define TRAJ_NB_DISPLAYED_POINTS 10000
27 #define DEFAULT_TRAJ_COLOR "#004257"
28 #define DEFAULT_FRGRND_COLOR "#a2a2a2[#a2a2a2]"
29 #define DEFAULT_BCKGRND_COLOR "#d2d2d2[#d2d2d2]"
30 #define DEFAULT_SLICES_COLOR "#828282[#F0F0F0]"
31 #define DEFAULT_GATES_COLOR "#0084AF[#0084AF]"
32 #define DEFAULT_POLYGONS_COLOR "#00536E[#2696BA]"
38 enum class TubeColorType { FOREGROUND, BACKGROUND, SLICES, GATES, POLYGONS };
79 void show(
bool detail_slices);
107 void add_tube(
const Tube *tube,
const std::string&
name,
const std::string& color_frgrnd = DEFAULT_FRGRND_COLOR,
const std::string& color_bckgrnd = DEFAULT_BCKGRND_COLOR);
119 void add_tubes(
const TubeVector *tubevector,
const std::string&
name,
const std::string& color_frgrnd = DEFAULT_FRGRND_COLOR,
const std::string& color_bckgrnd = DEFAULT_BCKGRND_COLOR);
133 void add_tubes(
const TubeVector *tubevector,
int start_index,
int end_index,
const std::string&
name,
const std::string& color_frgrnd = DEFAULT_FRGRND_COLOR,
const std::string& color_bckgrnd = DEFAULT_BCKGRND_COLOR);
161 void set_tube_color(
const Tube *tube,
const std::string& color_frgrnd,
const std::string& color_bckgrnd = DEFAULT_BCKGRND_COLOR);
296 const IntervalVector
draw_tube(
const Tube *tube,
bool detail_slices =
false);
314 void draw_slice(
const Slice& slice,
const Slice& deriv_slice,
const vibes::Params& params_slice,
const vibes::Params& params_polygon);
323 void draw_gate(
const Interval& gate,
double t,
const vibes::Params& params);
Slice of a one dimensional tube and made of an envelope and two gates.
Definition codac_Slice.h:34
One dimensional trajectory , defined as a temporal map of values.
Definition codac_Trajectory.h:35
n-dimensional trajectory , defined as a temporal map of vector values
Definition codac_TrajectoryVector.h:38
One dimensional tube , defined as an interval of scalar trajectories.
Definition codac_Tube.h:48
n-dimensional tube , defined as an interval of n-dimensional trajectories
Definition codac_TubeVector.h:39
Two-dimensional graphical item based on the VIBes viewer.
Definition codac_VIBesFig.h:38
Two-dimensional graphical item to display scalar tubes or trajectories.
Definition codac_VIBesFigTube.h:48
void set_tube_color(const Tube *tube, const std::string &color_frgrnd, const std::string &color_bckgrnd=DEFAULT_BCKGRND_COLOR)
Sets color properties for a given tube.
void reset_tube_background(const Tube *tube)
Reset the background of a given tube.
void set_tube_color(const Tube *tube, TubeColorType color_type, const std::string &color)
Sets color properties for a given tube.
void create_group_color(const Tube *tube, TubeColorType color_type)
Creates the VIBes group of color_type related to the given tube.
void set_cursor(double t)
Set the position of the temporal cursor of this figure.
void set_trajectory_points_size(const Trajectory *traj, double points_size)
Sets points size for a given trajectory, and activates a display mode with points instead of a line f...
void draw_slice(const Slice &slice, const Slice &deriv_slice, const vibes::Params ¶ms_slice, const vibes::Params ¶ms_polygon)
Draws a slice knowing its derivative.
void add_tube(const Tube *tube, const std::string &name, const std::string &color_frgrnd=DEFAULT_FRGRND_COLOR, const std::string &color_bckgrnd=DEFAULT_BCKGRND_COLOR)
Adds a tube object to this figure.
bool m_display_cursor
boolean to display a temporal cursor
Definition codac_VIBesFigTube.h:360
void create_groups_color(const Tube *tube)
Creates all the VIBes groups related to the given tube.
void remove_tube(const Tube *tube)
Removes a tube from this figure.
void draw_slice(const Slice &slice, const vibes::Params ¶ms)
Draws a slice.
void show_cursor(bool display=true)
Displays the cursor on this figure.
void show(bool detail_slices)
Displays this figure with optional details.
std::map< const Tube *, FigTubeParams > m_map_tubes
map of Tube objects to be displayed, together with parameters
Definition codac_VIBesFigTube.h:358
void set_trajectory_name(const Trajectory *traj, const std::string &name)
Sets a new name for a trajectory.
~VIBesFigTube()
VIBesFigTube destructor.
void draw_gate(const Interval &gate, double t, const vibes::Params ¶ms)
Draws a gate.
void add_trajectories(const TrajectoryVector *trajvector, int start_index, int end_index, const std::string &name, const std::string &color=DEFAULT_TRAJ_COLOR)
Adds a subset of a vector of trajectories to this figure.
const IntervalVector draw_trajectory(const Trajectory *traj)
Draws a trajectory.
const IntervalVector draw_tube(const Tube *tube, bool detail_slices=false)
Draws a tube.
std::map< const Trajectory *, FigTrajParams > m_map_trajs
map of Trajectory objects to be displayed, together with parameters
Definition codac_VIBesFigTube.h:359
void show()
Displays this figure.
void add_trajectories(const TrajectoryVector *trajvector, const std::string &name, const std::string &color=DEFAULT_TRAJ_COLOR)
Adds a vector of trajectories to this figure.
void set_tube_derivative(const Tube *tube, const Tube *derivative)
Links a tube to its derivative for display purposes.
void add_tubes(const TubeVector *tubevector, int start_index, int end_index, const std::string &name, const std::string &color_frgrnd=DEFAULT_FRGRND_COLOR, const std::string &color_bckgrnd=DEFAULT_BCKGRND_COLOR)
Adds a subset of a vector of tubes to this figure.
double m_cursor
the temporal cursor's position
Definition codac_VIBesFigTube.h:361
void add_tubes(const TubeVector *tubevector, const std::string &name, const std::string &color_frgrnd=DEFAULT_FRGRND_COLOR, const std::string &color_bckgrnd=DEFAULT_BCKGRND_COLOR)
Adds a subset of a vector of tubes to this figure.
void set_tube_name(const Tube *tube, const std::string &name)
Sets a new name for a tube.
VIBesFigTube(const std::string &fig_name, const Tube *tube=nullptr, const Trajectory *traj=nullptr)
Creates a VIBesFigTube.
void set_trajectory_color(const Trajectory *traj, const std::string &color)
Sets color properties for a given trajectory.
void add_trajectory(const Trajectory *traj, const std::string &name, const std::string &color=DEFAULT_TRAJ_COLOR)
Adds a trajectory object to this figure.
void remove_trajectory(const Trajectory *traj)
Removes a trajectory from this figure.
Multi-view item to display vector tubes or trajectories.
Definition codac_VIBesFigTubeVector.h:33
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9
TubeColorType
Defines a set of colors for tube display.
Definition codac_VIBesFigTube.h:38
Specifies some parameters related to a Trajectory display.
Definition codac_VIBesFigTube.h:352
float points_size
size of points in specific display mode
Definition codac_VIBesFigTube.h:355
std::string color
color of the trajectory
Definition codac_VIBesFigTube.h:354
std::string name
human readable identifier of the trajectory
Definition codac_VIBesFigTube.h:353
Specifies some parameters related to a Tube display.
Definition codac_VIBesFigTube.h:340
std::string name
human readable identifier of the tube
Definition codac_VIBesFigTube.h:341
const Tube * tube_copy
to display previous values in background, before any new contraction
Definition codac_VIBesFigTube.h:343
std::map< TubeColorType, std::string > m_colors
map of colors <TubeColorType,html_color_code>
Definition codac_VIBesFigTube.h:342
const Tube * tube_derivative
to display thinner envelopes (polygons) enclosed by the slices
Definition codac_VIBesFigTube.h:344