Draw_3D_API
drawNS::Draw3DAPI Class Referenceabstract

Abstract interface for drawing class Abstract class used as interface for 3D drawing class implementations. More...

#include <Draw3D_api_interface.hh>

Inheritance diagram for drawNS::Draw3DAPI:

Public Member Functions

 Draw3DAPI (int ref_time_ms=0)
 Constructor. More...
 
virtual ~Draw3DAPI ()
 
virtual uint draw_line (const Point3D &point1, const Point3D &point2, const std::string &color="black")=0
 draws line between 2 points More...
 
virtual uint draw_polygonal_chain (const std::vector< Point3D > &points, const std::string &color="black")=0
 draws polygonal_chain between n points More...
 
virtual uint draw_polyhedron (const std::vector< std::vector< Point3D > > &points_map, const std::string &color="black")=0
 draws polyhedron described by its apexs More...
 
virtual uint draw_surface (const std::vector< std::vector< Point3D > > &points_map, const std::string &color="black")=0
 draws surface described by its points More...
 
virtual void erase_shape (uint id)=0
 erase shape by id More...
 
virtual void change_shape_color (uint id, const std::string &color)=0
 change color of shape More...
 
virtual void change_ref_time_ms (int ref_time_ms)=0
 change mode for ploting and/or time between auto-replots More...
 
virtual void redraw ()=0
 replot all shapes Replots all shapes, works only in negative refresh_rate_ms value mode. More...
 

Protected Attributes

int refresh_rate_ms
 mode for ploting and time between auto-replots More...
 

Detailed Description

Abstract interface for drawing class Abstract class used as interface for 3D drawing class implementations.

Colors are pre-defined or must be on form rgb:#rrggbb.
Pre defined colors: black, white, grey, blue, light-blue, red, green, yellow, orange, purple, as it was in default palette in Matlab 2014b.
Class have 3 modes, described in refresh_rate_ms variable.

Constructor & Destructor Documentation

drawNS::Draw3DAPI::Draw3DAPI ( int  ref_time_ms = 0)
inline

Constructor.

Parameters
ref_time_ms- mode for plotting (negative, 0, positive, see refresh_rate_ms) and time between auto-replots (in miliseconds).
virtual drawNS::Draw3DAPI::~Draw3DAPI ( )
inlinevirtual

Member Function Documentation

virtual void drawNS::Draw3DAPI::change_ref_time_ms ( int  ref_time_ms)
pure virtual

change mode for ploting and/or time between auto-replots

Parameters
ref_time_ms- mode for plotting (negative, 0, positive, see refresh_rate_ms) and time between auto-replots (in miliseconds).

Implemented in drawNS::APIopenGL3D, and drawNS::APIGnuPlot3D.

virtual void drawNS::Draw3DAPI::change_shape_color ( uint  id,
const std::string &  color 
)
pure virtual

change color of shape

Parameters
id- id of shape
color- color of line (see class description)

Implemented in drawNS::APIopenGL3D, and drawNS::APIGnuPlot3D.

virtual uint drawNS::Draw3DAPI::draw_line ( const Point3D point1,
const Point3D point2,
const std::string &  color = "black" 
)
pure virtual

draws line between 2 points

Parameters
point1- first point
point2- second point
color- color of line (see class description)
Returns
id of shape (see erase_shape, change_shape_color)

Implemented in drawNS::APIopenGL3D, and drawNS::APIGnuPlot3D.

virtual uint drawNS::Draw3DAPI::draw_polygonal_chain ( const std::vector< Point3D > &  points,
const std::string &  color = "black" 
)
pure virtual

draws polygonal_chain between n points

Parameters
points- vector of points
color- color of line (see class description)
Returns
id of shape (see erase_shape, change_shape_color)

Implemented in drawNS::APIopenGL3D, and drawNS::APIGnuPlot3D.

virtual uint drawNS::Draw3DAPI::draw_polyhedron ( const std::vector< std::vector< Point3D > > &  points_map,
const std::string &  color = "black" 
)
pure virtual

draws polyhedron described by its apexs

Parameters
points_map- vector of points vectors. Every vector contains points describes one "layer" of polyhedron
color- color of line (see class description)
Returns
id of shape (see erase_shape, change_shape_color)

Implemented in drawNS::APIopenGL3D, and drawNS::APIGnuPlot3D.

virtual uint drawNS::Draw3DAPI::draw_surface ( const std::vector< std::vector< Point3D > > &  points_map,
const std::string &  color = "black" 
)
pure virtual

draws surface described by its points

Parameters
points_map- vector of points vectors. Every vector contains points describes one "line" in surface
color- color of line (see class description)
Returns
id of shape (see erase_shape, change_shape_color)

Implemented in drawNS::APIopenGL3D, and drawNS::APIGnuPlot3D.

virtual void drawNS::Draw3DAPI::erase_shape ( uint  id)
pure virtual

erase shape by id

Parameters
id- id of shape

Implemented in drawNS::APIopenGL3D, and drawNS::APIGnuPlot3D.

virtual void drawNS::Draw3DAPI::redraw ( )
pure virtual

replot all shapes Replots all shapes, works only in negative refresh_rate_ms value mode.

Implemented in drawNS::APIopenGL3D, and drawNS::APIGnuPlot3D.

Member Data Documentation

int drawNS::Draw3DAPI::refresh_rate_ms
protected

mode for ploting and time between auto-replots

For negative vaules - auto-replots is off and replot can be done only by function redraw(), for 0 value - auto-replots is off and replot is done after every drawing functions, for positive values - auto-replots is on and value is time (in miliseconds) between replots, drawing functions and redraw() don't replot in this mode.


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