Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
geomtools::gnuplot_drawer Class Reference

An Gnuplot driver object responsible of the display of a virtual geometry. More...

#include <bayeux/geomtools/gnuplot_drawer.h>

Classes

struct  cstream
 Colored stream handle. More...
 
class  dd_entry
 Storage entry for embedded display data. More...
 
class  has_dd_addr
 Predicate that tests the address of a display data. More...
 
struct  range
 
struct  visibility_rules
 Visibility rules for 3D volume rendering. More...
 

Public Types

typedef std::map< std::string, cstreamcstreams_col_type
 Dictionary of colored stream handle. More...
 
typedef std::vector< dd_entrydd_col_type
 Collection of display data handle. More...
 

Public Member Functions

void set_output (const std::string &output_)
 
void reset_output ()
 
void set_terminal (const std::string &terminal_="", const std::string &terminal_options_="")
 Set Gnuplot terminal and options. More...
 
void reset_terminal ()
 Reset Gnuplot terminal and options. More...
 
int set_output_medium (const std::string &file_="", const std::string &terminal_="", const std::string &terminal_options_="")
 
void set_view (const std::string &view_)
 Set the display view. More...
 
const std::string & get_view () const
 Return the display view. More...
 
void set_mode (const std::string &mode_)
 Set the display mode. More...
 
const std::string & get_mode () const
 Return the display mode. More...
 
void set_labels (bool labels_)
 Set the 'labels' flag. More...
 
bool use_labels () const
 Check 'labels' flag. More...
 
void set_using_title (bool)
 Set the 'title' flag. More...
 
bool use_title () const
 Check 'title' flag. More...
 
bool is_view_2d () const
 Check '2D display' flag. More...
 
bool is_view_3d () const
 Check '3D display' flag. More...
 
bool is_solid () const
 Check 'solid display' flag. More...
 
bool is_wired () const
 Check 'wired display' flag. More...
 
bool is_initialized () const
 Check intialization flag. More...
 
datatools::propertiesgrab_properties ()
 Return a mutable reference to the embedded auxiliary properties. More...
 
const datatools::propertiesget_properties () const
 Return a non mutable reference to the embedded auxiliary properties. More...
 
 gnuplot_drawer ()
 Default constructor. More...
 
virtual ~gnuplot_drawer ()
 Destructor. More...
 
void reset ()
 Reset. More...
 
void reset_cstreams ()
 Reset colored streams. More...
 
void print (std::ostream &out_) const
 Basic print. More...
 
int draw (const manager &mgr_, const std::string &what_="", int max_display_level_=0)
 Main display method. More...
 
void draw_logical (const logical_volume &log_, const placement &p_, int max_display_level_, const std::string &title_, bool drawing_display_data_=false)
 Draw a logical volume in its own reference frame. More...
 
void draw_model (const model_factory &mf_, const std::string &model_name_, const placement &p_, int max_display_level_)
 Draw a geometry model in its own reference frame. More...
 
void draw_physical_from_gid (const model_factory &mf_, const geom_id &gid_, const mapping &mapping_, int max_display_level_)
 Draw a physical volume given its GID its the world reference frame. More...
 
void draw_logical (const model_factory &mf_, const std::string &logical_name_, const placement &p_, int max_display_level_)
 Draw a logical volume with given name from a model factory. More...
 
void set_drawing_display_data (bool)
 Set the flag to draw embedded display data. More...
 
bool is_drawing_display_data () const
 Return the flag to draw embedded display data. More...
 
void add_display_data (const display_data &dd_)
 Add a display data object in the scene to be drawn. More...
 
void add_display_data (const display_data &dd_, const placement &pl_)
 Add a display data object in the scene to be drawn with a dedicated placement. More...
 
void reset_display_data ()
 Remove all display data formerly added to the scene. More...
 
void set_rendering_options_current (uint32_t flags_)
 Set shape rendering options. More...
 
void reset_rendering_options_current ()
 Reset shape rendering options. More...
 
void set_rendering_options_depth (int32_t depth_)
 Set shape rendering options depth. More...
 
void reset_rendering_options_depth ()
 Reset shape rendering options depth. More...
 

Static Public Member Functions

static int display_level_no_limit ()
 
static const std::string & view_key ()
 
static const std::string & view_2d_xy ()
 
static const std::string & view_2d_xz ()
 
static const std::string & view_2d_yz ()
 
static const std::string & view_3d ()
 
static const std::string & view_3d_free_scale ()
 
static const std::string & default_view ()
 
static bool check_view (const std::string &view_label_)
 
static const std::string & mode_wired ()
 
static const std::string & mode_solid ()
 
static const std::string & default_mode ()
 
static const std::string & force_show_property_name ()
 
static const std::string & force_show_envelope_property_name ()
 
static const std::string & force_show_children_property_name ()
 
static const std::string & force_hide_envelope_property_name ()
 
static const std::string & force_hide_children_property_name ()
 
static const std::string & world_name_key ()
 
static void wait_for_key ()
 Wait for key stroke in interactive Gnuplot session. More...
 

Static Public Attributes

static const int DISPLAY_LEVEL_NO_LIMIT = 1000
 

Protected Member Functions

void _draw_display_data (const model_factory &mf_, const placement &p_)
 
void _draw_display_data (const placement &p_)
 
std::ostringstream & _get_stream (const std::string &section_)
 

Detailed Description

An Gnuplot driver object responsible of the display of a virtual geometry.

Member Typedef Documentation

◆ cstreams_col_type

typedef std::map<std::string, cstream> geomtools::gnuplot_drawer::cstreams_col_type

Dictionary of colored stream handle.

◆ dd_col_type

Collection of display data handle.

Constructor & Destructor Documentation

◆ gnuplot_drawer()

geomtools::gnuplot_drawer::gnuplot_drawer ( )

Default constructor.

◆ ~gnuplot_drawer()

virtual geomtools::gnuplot_drawer::~gnuplot_drawer ( )
virtual

Destructor.

Member Function Documentation

◆ _draw_display_data() [1/2]

void geomtools::gnuplot_drawer::_draw_display_data ( const model_factory mf_,
const placement p_ 
)
protected

◆ _draw_display_data() [2/2]

void geomtools::gnuplot_drawer::_draw_display_data ( const placement p_)
protected

◆ _get_stream()

std::ostringstream& geomtools::gnuplot_drawer::_get_stream ( const std::string &  section_)
protected

◆ add_display_data() [1/2]

void geomtools::gnuplot_drawer::add_display_data ( const display_data dd_)

Add a display data object in the scene to be drawn.

◆ add_display_data() [2/2]

void geomtools::gnuplot_drawer::add_display_data ( const display_data dd_,
const placement pl_ 
)

Add a display data object in the scene to be drawn with a dedicated placement.

◆ check_view()

static bool geomtools::gnuplot_drawer::check_view ( const std::string &  view_label_)
static

◆ default_mode()

static const std::string& geomtools::gnuplot_drawer::default_mode ( )
static

◆ default_view()

static const std::string& geomtools::gnuplot_drawer::default_view ( )
static

◆ display_level_no_limit()

static int geomtools::gnuplot_drawer::display_level_no_limit ( )
static

◆ draw()

int geomtools::gnuplot_drawer::draw ( const manager mgr_,
const std::string &  what_ = "",
int  max_display_level_ = 0 
)

Main display method.

◆ draw_logical() [1/2]

void geomtools::gnuplot_drawer::draw_logical ( const logical_volume log_,
const placement p_,
int  max_display_level_,
const std::string &  title_,
bool  drawing_display_data_ = false 
)

Draw a logical volume in its own reference frame.

◆ draw_logical() [2/2]

void geomtools::gnuplot_drawer::draw_logical ( const model_factory mf_,
const std::string &  logical_name_,
const placement p_,
int  max_display_level_ 
)

Draw a logical volume with given name from a model factory.

◆ draw_model()

void geomtools::gnuplot_drawer::draw_model ( const model_factory mf_,
const std::string &  model_name_,
const placement p_,
int  max_display_level_ 
)

Draw a geometry model in its own reference frame.

◆ draw_physical_from_gid()

void geomtools::gnuplot_drawer::draw_physical_from_gid ( const model_factory mf_,
const geom_id gid_,
const mapping mapping_,
int  max_display_level_ 
)

Draw a physical volume given its GID its the world reference frame.

◆ force_hide_children_property_name()

static const std::string& geomtools::gnuplot_drawer::force_hide_children_property_name ( )
static

◆ force_hide_envelope_property_name()

static const std::string& geomtools::gnuplot_drawer::force_hide_envelope_property_name ( )
static

◆ force_show_children_property_name()

static const std::string& geomtools::gnuplot_drawer::force_show_children_property_name ( )
static

◆ force_show_envelope_property_name()

static const std::string& geomtools::gnuplot_drawer::force_show_envelope_property_name ( )
static

◆ force_show_property_name()

static const std::string& geomtools::gnuplot_drawer::force_show_property_name ( )
static

◆ get_mode()

const std::string& geomtools::gnuplot_drawer::get_mode ( ) const

Return the display mode.

◆ get_properties()

const datatools::properties& geomtools::gnuplot_drawer::get_properties ( ) const

Return a non mutable reference to the embedded auxiliary properties.

◆ get_view()

const std::string& geomtools::gnuplot_drawer::get_view ( ) const

Return the display view.

◆ grab_properties()

datatools::properties& geomtools::gnuplot_drawer::grab_properties ( )

Return a mutable reference to the embedded auxiliary properties.

◆ is_drawing_display_data()

bool geomtools::gnuplot_drawer::is_drawing_display_data ( ) const

Return the flag to draw embedded display data.

◆ is_initialized()

bool geomtools::gnuplot_drawer::is_initialized ( ) const

Check intialization flag.

◆ is_solid()

bool geomtools::gnuplot_drawer::is_solid ( ) const

Check 'solid display' flag.

◆ is_view_2d()

bool geomtools::gnuplot_drawer::is_view_2d ( ) const

Check '2D display' flag.

◆ is_view_3d()

bool geomtools::gnuplot_drawer::is_view_3d ( ) const

Check '3D display' flag.

◆ is_wired()

bool geomtools::gnuplot_drawer::is_wired ( ) const

Check 'wired display' flag.

◆ mode_solid()

static const std::string& geomtools::gnuplot_drawer::mode_solid ( )
static

◆ mode_wired()

static const std::string& geomtools::gnuplot_drawer::mode_wired ( )
static

◆ print()

void geomtools::gnuplot_drawer::print ( std::ostream &  out_) const

Basic print.

◆ reset()

void geomtools::gnuplot_drawer::reset ( )

Reset.

◆ reset_cstreams()

void geomtools::gnuplot_drawer::reset_cstreams ( )

Reset colored streams.

◆ reset_display_data()

void geomtools::gnuplot_drawer::reset_display_data ( )

Remove all display data formerly added to the scene.

◆ reset_output()

void geomtools::gnuplot_drawer::reset_output ( )

◆ reset_rendering_options_current()

void geomtools::gnuplot_drawer::reset_rendering_options_current ( )

Reset shape rendering options.

◆ reset_rendering_options_depth()

void geomtools::gnuplot_drawer::reset_rendering_options_depth ( )

Reset shape rendering options depth.

◆ reset_terminal()

void geomtools::gnuplot_drawer::reset_terminal ( )

Reset Gnuplot terminal and options.

◆ set_drawing_display_data()

void geomtools::gnuplot_drawer::set_drawing_display_data ( bool  )

Set the flag to draw embedded display data.

◆ set_labels()

void geomtools::gnuplot_drawer::set_labels ( bool  labels_)

Set the 'labels' flag.

◆ set_mode()

void geomtools::gnuplot_drawer::set_mode ( const std::string &  mode_)

Set the display mode.

◆ set_output()

void geomtools::gnuplot_drawer::set_output ( const std::string &  output_)

◆ set_output_medium()

int geomtools::gnuplot_drawer::set_output_medium ( const std::string &  file_ = "",
const std::string &  terminal_ = "",
const std::string &  terminal_options_ = "" 
)

◆ set_rendering_options_current()

void geomtools::gnuplot_drawer::set_rendering_options_current ( uint32_t  flags_)

Set shape rendering options.

◆ set_rendering_options_depth()

void geomtools::gnuplot_drawer::set_rendering_options_depth ( int32_t  depth_)

Set shape rendering options depth.

◆ set_terminal()

void geomtools::gnuplot_drawer::set_terminal ( const std::string &  terminal_ = "",
const std::string &  terminal_options_ = "" 
)

Set Gnuplot terminal and options.

◆ set_using_title()

void geomtools::gnuplot_drawer::set_using_title ( bool  )

Set the 'title' flag.

◆ set_view()

void geomtools::gnuplot_drawer::set_view ( const std::string &  view_)

Set the display view.

◆ use_labels()

bool geomtools::gnuplot_drawer::use_labels ( ) const

Check 'labels' flag.

◆ use_title()

bool geomtools::gnuplot_drawer::use_title ( ) const

Check 'title' flag.

◆ view_2d_xy()

static const std::string& geomtools::gnuplot_drawer::view_2d_xy ( )
static

◆ view_2d_xz()

static const std::string& geomtools::gnuplot_drawer::view_2d_xz ( )
static

◆ view_2d_yz()

static const std::string& geomtools::gnuplot_drawer::view_2d_yz ( )
static

◆ view_3d()

static const std::string& geomtools::gnuplot_drawer::view_3d ( )
static

◆ view_3d_free_scale()

static const std::string& geomtools::gnuplot_drawer::view_3d_free_scale ( )
static

◆ view_key()

static const std::string& geomtools::gnuplot_drawer::view_key ( )
static

◆ wait_for_key()

static void geomtools::gnuplot_drawer::wait_for_key ( )
static

Wait for key stroke in interactive Gnuplot session.

◆ world_name_key()

static const std::string& geomtools::gnuplot_drawer::world_name_key ( )
static

Member Data Documentation

◆ DISPLAY_LEVEL_NO_LIMIT

const int geomtools::gnuplot_drawer::DISPLAY_LEVEL_NO_LIMIT = 1000
static

The documentation for this class was generated from the following file: