Go to the documentation of this file.
43 static const desc_fields s_v(parent::node_desc_fields(),18,
66 if(parent::touched())
return true;
102 static unsigned int MATRIX() {
return 0;}
103 static unsigned int BORDER() {
return 1;}
104 static unsigned int PLOTTER() {
return 2;}
108 typedef std::vector<plottable*> ptbs_t;
109 typedef std::vector<node*> todels_t;
110 typedef std::vector<plotprim*> prims_t;
133 parent::search(a_action);
134 if(a_action.
done())
return;
137 if(a_action.
done())
return;
148 if(a_action.
done())
return;
228 parent::operator=(a_from);
229 if(&a_from==
this)
return *
this;
272 if(!a_ww||!a_wh)
return;
273 float aspect = float(a_ww)/float(a_wh);
294 for(
size_t index=0;index<_number;index++) {
309 for(
size_t index=0;index<_number;index++) {
312 if(_plotter->
plottables().size())
return true;
317 if(_plotter->
plottables().size())
return true;
325 for(
size_t index=0;index<_number;index++) {
359 for(
size_t index=0;index<_number;index++) {
362 if(_plotter==a_plotter) {
399 return (
plotter*)(*sep)[PLOTTER()];
447 void set_regions(
unsigned int a_cols = 1,
unsigned int a_rows = 1,
bool a_transfer =
false) {
450 std::vector<ptbs_t> ptbss;
451 std::vector<prims_t> primss;
452 std::vector<todels_t> tdlss;
453 std::vector<plotter> pls;
460 for(
unsigned int index=0;index<oldn;index++) {
469 cols = a_cols?a_cols:1;
470 rows = a_rows?a_rows:1;
478 for(
unsigned int index=0;index<num;index++) {
482 {
const ptbs_t& ptbs = ptbss[index];
484 {
const prims_t& prims = primss[index];
486 {
const todels_t& todels = tdlss[index];
514 for(
size_t index=0;index<_number;index++) {
517 a_vec.push_back(_plotter);
527 for(
size_t index=0;index<_number;index++) {
584 for(
size_t index=0;index<_number;index++) {
603 float cooking = 1.2f;
605 float wfac = (rw_wc/ww_wc)*cooking;
606 float hfac = (rh_wc/wh_wc)*cooking;
608 float label_cooking = 1.6f;
612 float title_cooking = 1.1f;
618 for(
size_t index=0;index<_number;index++) {
644 float wvp = float(a_ww);
645 float hvp = float(a_wh);
650 if((!_cols)||(!_rows))
return;
655 if((wdata<=0)||(hdata<=0))
return;
680 unsigned int _num =
number();
681 for(
unsigned int iregion=0;iregion<_num;iregion++) {
683 unsigned int row = iregion/_cols;
684 unsigned int col = iregion - row * _cols;
686 float wr,hr,x,y,lm,rm,bm,tm;
688 lm = rm = bm = tm = 0;
704 }
else if(col==(_cols-1)) {
711 x = wrl + (col-1) * wri;
731 }
else if(row==(_rows-1)) {
775 float wvp = float(a_ww);
776 float hvp = float(a_wh);
780 const extra& _extra = *it;
782 unsigned int _cols = _extra.
m_cols;
783 unsigned int _rows = _extra.
m_rows;
784 if((!_cols)||(!_rows))
continue;
789 if((wdata<=0)||(hdata<=0))
continue;
791 unsigned int iregion = _extra.
m_index;
792 unsigned int row = iregion/_cols;
793 unsigned int col = iregion - row * _cols;
795 float wr,hr,x,y,lm,rm,bm,tm;
797 lm = rm = bm = tm = 0;
813 }
else if(col==(_cols-1)) {
820 x = wrl + (col-1) * wri;
840 }
else if(row==(_rows-1)) {
902 return (
plotter*)(*sep)[PLOTTER()];
907 return (
plotter*)(*sep)[PLOTTER()];
941 unsigned int index = 0;
942 for(
unsigned int irow=0;irow<
rows;irow++) {
943 for(
unsigned int icol=0;icol<
cols;icol++) {
975 bool configure = (
m_origins.size()==_number)&&(
m_sizes.size()==_number)?
true:
false;
985 for(
size_t index=0;index<_number;index++) {
999 for(
size_t index=0;index<_number;index++) {
1001 matrix* _from_matrix = (
matrix*)(*_from_sep)[MATRIX()];
1009 _matrix->operator=(*_from_matrix);
1010 _plotter->operator=(*_from_plotter);
1015 for(
size_t index=0;index<_number;index++) {
1017 matrix* _from_matrix = (
matrix*)(*_from_sep)[MATRIX()];
1024 _matrix->operator=(*_from_matrix);
1025 _plotter->operator=(*_from_plotter);
1040 mat->color = colorf_red();
1052 float dw = a_w*0.5f;
1053 float dh = a_h*0.5f;
1054 vtxs->
add(-dw,-dh,0);
1055 vtxs->
add( dw,-dh,0);
1056 vtxs->
add( dw, dh,0);
1057 vtxs->
add(-dw, dh,0);
1058 vtxs->
add(-dw,-dh,0);
1063 for(
size_t index=0;index<_number;index++) {
1105 float wba =
width+2*bw;
1108 float y =
height*0.5f+bh*0.5f;
1125 float wba =
width+2*bw;
1128 float y = -
height*0.5f-bh*0.5f;
1147 float x = -
width*0.5f-bw*0.5f;
1167 float x =
width*0.5f+bw*0.5f;
1185 extra(
unsigned int a_cols,
unsigned int a_rows,
unsigned int a_index)
1233 float ww_wc =
width;
1241 const extra& _extra = *it;
1242 unsigned int index = _extra.
m_index;
1253 unsigned int a_cols,
unsigned int a_rows,
1254 float a_ww_wc,
float a_wh_wc,
1255 const std::vector<vec2f>& a_origins,
const std::vector<vec2f>& a_sizes,
float a_scale) {
1256 size_t row = a_index/a_cols;
1257 size_t col = a_index-a_cols*row;
1259 float rw_wc = a_ww_wc/a_cols;
1260 float rh_wc = a_wh_wc/a_rows;
1266 _plotter->
width = a_sizes[a_index].x();
1267 _plotter->
height = a_sizes[a_index].y();
1268 float x = -a_ww_wc*0.5f + a_origins[a_index].x() + _plotter->
width*0.5f;
1269 float y = -a_wh_wc*0.5f + a_origins[a_index].y() + _plotter->
height*0.5f;
1272 float x = -a_ww_wc*0.5f + col * rw_wc + rw_wc * 0.5f;
1273 float y = a_wh_wc*0.5f - row * rh_wc - rh_wc * 0.5f;
1292 _plotter->
depth = rh_wc;
1298 _plotter->
width = rw_wc;
1299 _plotter->
height = rh_wc;
1301 if((rw_wc/rh_wc)>=1.0f) {
1302 _plotter->
width = rh_wc;
1303 _plotter->
height = rh_wc;
1305 _plotter->
width = rw_wc;
1306 _plotter->
height = rw_wc;
#define TOOLS_NODE(a__class, a__sclass, a__parent)
#define tools_vforit(a__T, a__v, a__it)
#define TOOLS_FIELD_DESC_NODE_CLASS(a__class)
#define tools_vforcit(a__T, a__v, a__it)
#define TOOLS_ARG_FIELD_DESC(a__field)