Bayeux  3.4.1
Core Foundation library for SuperNEMO
gnuplot_draw.h
Go to the documentation of this file.
1 /* Author(s): F. Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2006-11-19
4  * Last modified: 2015-03-21
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Gnuplot drawing tools
11  *
12  * History:
13  *
14  */
15 
16 #ifndef GEOMTOOLS_GNUPLOT_DRAW_H
17 #define GEOMTOOLS_GNUPLOT_DRAW_H 1
18 
19 // Standard library:
20 #include <iostream>
21 #include <cmath>
22 #include <list>
23 
24 // Third party:
25 // - Bayeux/mygsl:
26 #include <mygsl/min_max.h>
27 
28 // This project:
29 #include <geomtools/utils.h>
30 #include <geomtools/color.h>
31 
32 namespace geomtools {
33 
34  // Forward declaration:
35  class i_placement;
36  class i_object_3d;
37  class placement;
38 
39  // Curves:
40  class line_3d;
41  class polyline_3d;
42  class circle;
43  class ellipse;
44  class helix_3d;
45 
46  // Surfaces:
47  class triangle;
48  class quadrangle;
49  class rectangle;
50  class regular_polygon;
51  class simple_polygon;
52  class disk;
53  class elliptical_sector;
54  class spherical_sector;
55  class right_circular_conical_nappe;
56  class ellipsoid_sector;
57  class cylindrical_sector;
58  class elliptical_cylinder_sector;
59  class composite_surface;
60  class toroid_nappe;
61 
62  // Volumes/Solids:
63  class box;
64  class extruded_box;
65  class cylinder;
66  class tube;
67  class torus;
68  class sphere;
69  class ellipsoid;
70  class elliptical_cylinder;
71  class right_circular_conical_frustrum;
72  class right_polygonal_frustrum;
73  class polycone;
74  class polyhedra;
75  class wall_solid;
76  class tessellated_solid;
77  class union_3d;
78  class subtraction_3d;
79  class intersection_3d;
80  class display_data;
81 
84  {
85  public:
86 
89  MODE_NULL = 0x0,
91  };
92 
94  static const uint32_t DEFAULT_OPTIONS = 0;
95 
96  public:
97 
99  struct xyz_range {
100 
102  xyz_range();
103 
105  void reset_ranges();
106 
108  void activate();
109 
111  void deactivate();
112 
114  bool is_activated() const;
115 
117  const mygsl::min_max & get_x_range() const;
118 
120  const mygsl::min_max & get_y_range() const;
121 
123  const mygsl::min_max & get_z_range() const;
124 
126  void add_point(double x_, double y_, double z_);
127 
129  void add_point(const vector_3d & point_);
130 
131  private:
132 
133  bool _activated_;
134  mygsl::min_max _x_range_;
135  mygsl::min_max _y_range_;
136  mygsl::min_max _z_range_;
137 
138  };
139 
146  };
147 
149  static xyz_range & bounding_box(bounding_box_action_type action_ = BB_ACTION_NONE);
150 
152  static const xyz_range & bounding_box_const();
153 
155  static color::context & color_context();
156 
158  static const color::context & color_context_const();
159 
161  static void
162  basic_draw_point_with_color(std::ostream &,
163  double x_, double y_, double z_,
164  double color_,
165  bool new_line_ = true);
166 
168  static void
169  basic_draw_point_with_color(std::ostream & out_,
170  const vector_3d & point_,
171  double color_,
172  bool new_line_ = true);
173 
175  static void
176  basic_draw_point(std::ostream &,
177  double x_, double y_, double z_,
178  bool new_line_ = true);
179 
181  static void
182  basic_draw_point(std::ostream &,
183  const vector_3d &,
184  bool new_line_ = true);
185 
187  static void
188  basic_draw_facet3(std::ostream & out_,
189  const vector_3d & p1_,
190  const vector_3d & p2_,
191  const vector_3d & p3_,
192  double color_ = 1.0);
193 
195  static void
196  basic_draw_facet4(std::ostream & out_,
197  const vector_3d & p1_,
198  const vector_3d & p2_,
199  const vector_3d & p3_,
200  const vector_3d & p4_,
201  double color_ = 1.0);
202 
204  static void
205  basic_draw_segment(std::ostream &,
206  const vector_3d &,
207  const vector_3d &,
208  bool gp_trick_ = false);
209 
211  static void
212  basic_draw_segment(std::ostream &,
213  const segment_type &,
214  bool gp_trick_ = false);
215 
217  static bool
218  basic_draw_polyline(std::ostream &,
219  const polyline_type &,
220  bool new_line_ = true,
221  bool gnuplot_trick = true);
222 
224  static void
225  basic_draw_wires(std::ostream & out_,
226  const wires_type & wires_);
227 
229  static void
230  basic_draw_polylines(std::ostream & out_,
231  const wires_type & wires_);
232 
234  static void
235  draw_wires(std::ostream &,
236  const wires_type & wires);
237 
239  static void
240  draw_wires(std::ostream &,
241  const placement & p_,
242  const wires_type & wires);
243 
245  static void
246  draw_wires(std::ostream &,
247  const vector_3d & pos_,
248  const rotation_3d & rot_,
249  const wires_type & wires_);
250 
251  // Vertex:
252 
254  static void
255  draw_vertex(std::ostream &,
256  const vector_3d & vertex_,
257  uint32_t options_ = DEFAULT_OPTIONS);
258 
260  static void
261  draw_vertex(std::ostream &,
262  double x_, double y_, double z_,
263  uint32_t options_ = DEFAULT_OPTIONS);
264 
266  static void
267  draw_vertex(std::ostream &,
268  const placement & placement_,
269  const vector_3d & vertex_,
270  uint32_t options_ = DEFAULT_OPTIONS);
271 
273  static void
274  draw_vertex(std::ostream &,
275  const placement & placement_,
276  double x_, double y_, double z_,
277  uint32_t options_ = DEFAULT_OPTIONS);
278 
279  // Line:
280 
282  static void
283  draw_line(std::ostream &,
284  const line_3d &,
285  uint32_t options_ = DEFAULT_OPTIONS);
286 
288  static void
289  draw_line(std::ostream &,
290  const vector_3d & start_,
291  const vector_3d & stop_,
292  uint32_t options_ = DEFAULT_OPTIONS);
293 
295  static void
296  draw_line(std::ostream &,
297  const placement & placement_,
298  const line_3d & line_,
299  uint32_t options_ = DEFAULT_OPTIONS);
300 
302  static void
303  draw_line(std::ostream &,
304  const vector_3d & pos_,
305  const rotation_3d & rot_,
306  const line_3d & line_,
307  uint32_t options_ = DEFAULT_OPTIONS);
308 
309  // Helix:
310 
312  static void
313  draw_helix(std::ostream &,
314  const helix_3d & helix_,
315  uint32_t options_ = DEFAULT_OPTIONS);
316 
318  static void
319  draw_helix(std::ostream &,
320  const placement & p_,
321  const helix_3d & helix_,
322  uint32_t options_ = DEFAULT_OPTIONS);
323 
325  static void
326  draw_helix(std::ostream &,
327  const vector_3d & pos_,
328  const rotation_3d & rot_,
329  const helix_3d & helix_,
330  uint32_t options_ = DEFAULT_OPTIONS);
331 
332  // Polyline:
333 
335  static void
336  draw_polyline(std::ostream &,
337  const polyline_3d & poly_,
338  uint32_t options_ = DEFAULT_OPTIONS);
339 
341  static void
342  draw_polyline(std::ostream &,
343  const placement & pl_,
344  const polyline_3d & poly_,
345  uint32_t options_ = DEFAULT_OPTIONS);
346 
348  static void
349  draw_polyline(std::ostream &,
350  const vector_3d & pos_,
351  const rotation_3d & rot_,
352  const polyline_3d & poly_,
353  uint32_t options_ = DEFAULT_OPTIONS);
354 
356  static void
357  draw_polylines(std::ostream &,
358  const std::list<polyline_3d> &,
359  uint32_t options_ = DEFAULT_OPTIONS);
360 
362  static void
363  draw_polylines(std::ostream &,
364  const placement & pl_,
365  const std::list<polyline_3d> &,
366  uint32_t options_ = DEFAULT_OPTIONS);
367 
369  static void
370  draw_polylines(std::ostream &,
371  const vector_3d &,
372  const rotation_3d &,
373  const std::list<polyline_3d> &,
374  uint32_t options_ = DEFAULT_OPTIONS);
375 
376  // Rectangle:
377 
379  static void
380  draw_rectangle(std::ostream &,
381  const rectangle &,
382  uint32_t options_ = DEFAULT_OPTIONS);
383 
385  static void
386  draw_rectangle(std::ostream &,
387  const placement &,
388  const rectangle &,
389  uint32_t options_ = DEFAULT_OPTIONS);
390 
392  static void
393  draw_rectangle(std::ostream &,
394  const vector_3d &,
395  const rotation_3d &,
396  const rectangle &,
397  uint32_t options_ = DEFAULT_OPTIONS);
398 
399  // Circle:
400 
402  static void
403  draw_circle(std::ostream &,
404  const circle & ,
405  uint32_t options_ = DEFAULT_OPTIONS );
406 
408  static void
409  draw_circle(std::ostream &,
410  const placement & p_,
411  const circle & ,
412  uint32_t options_ = DEFAULT_OPTIONS );
413 
415  static void
416  draw_circle(std::ostream &,
417  const vector_3d & pos_,
418  const rotation_3d & rot_,
419  const circle & ,
420  uint32_t options_ = DEFAULT_OPTIONS );
421 
423  static void
424  draw_circle(std::ostream &,
425  const vector_3d &,
426  const rotation_3d &,
427  double radius_,
428  uint32_t options_ = DEFAULT_OPTIONS );
429 
430  // Ellipse:
431 
433  static void
434  draw_ellipse(std::ostream &,
435  const ellipse & ,
436  uint32_t options_ = DEFAULT_OPTIONS );
437 
439  static void
440  draw_ellipse(std::ostream &,
441  const placement & p_,
442  const ellipse & ,
443  uint32_t options_ = DEFAULT_OPTIONS );
444 
446  static void
447  draw_ellipse(std::ostream &,
448  const vector_3d & pos_,
449  const rotation_3d & rot_,
450  const ellipse & ,
451  uint32_t options_ = DEFAULT_OPTIONS );
452 
453  // Cylindrical sector:
454 
456  static void
457  draw_cylindrical_sector(std::ostream &,
458  const cylindrical_sector &,
459  uint32_t options_ = DEFAULT_OPTIONS);
460 
462  static void
463  draw_cylindrical_sector(std::ostream &,
464  const placement &,
465  const cylindrical_sector &,
466  uint32_t options_ = DEFAULT_OPTIONS);
467 
469  static void
470  draw_cylindrical_sector(std::ostream &,
471  const vector_3d &,
472  const rotation_3d &,
473  const cylindrical_sector &,
474  uint32_t options_ = DEFAULT_OPTIONS);
475 
476  // Elliptical sector:
477 
479  static void
480  draw_elliptical_sector(std::ostream &,
481  const elliptical_sector &,
482  uint32_t options_ = DEFAULT_OPTIONS);
483 
485  static void
486  draw_elliptical_sector(std::ostream &,
487  const placement &,
488  const elliptical_sector &,
489  uint32_t options_ = DEFAULT_OPTIONS);
490 
492  static void
493  draw_elliptical_sector(std::ostream &,
494  const vector_3d &,
495  const rotation_3d &,
496  const elliptical_sector &,
497  uint32_t options_ = DEFAULT_OPTIONS);
498 
499  // Ellipsoid sector:
500 
502  static void
503  draw_ellipsoid_sector(std::ostream &,
504  const ellipsoid_sector &,
505  uint32_t options_ = DEFAULT_OPTIONS);
506 
508  static void
509  draw_ellipsoid_sector(std::ostream &,
510  const placement &,
511  const ellipsoid_sector &,
512  uint32_t options_ = DEFAULT_OPTIONS);
513 
515  static void
516  draw_ellipsoid_sector(std::ostream &,
517  const vector_3d &,
518  const rotation_3d &,
519  const ellipsoid_sector &,
520  uint32_t options_ = DEFAULT_OPTIONS);
521 
522  // Elliptical cylinder sector:
523 
525  static void
526  draw_elliptical_cylinder_sector(std::ostream &,
528  uint32_t options_ = DEFAULT_OPTIONS);
529 
531  static void
532  draw_elliptical_cylinder_sector(std::ostream &,
533  const placement &,
535  uint32_t options_ = DEFAULT_OPTIONS);
536 
538  static void
539  draw_elliptical_cylinder_sector(std::ostream &,
540  const vector_3d &,
541  const rotation_3d &,
543  uint32_t options_ = DEFAULT_OPTIONS);
544 
545  // Spherical sector:
546 
548  static void
549  draw_spherical_sector(std::ostream &,
550  const spherical_sector &,
551  uint32_t options_ = DEFAULT_OPTIONS);
552 
554  static void
555  draw_spherical_sector(std::ostream &,
556  const placement &,
557  const spherical_sector &,
558  uint32_t options_ = DEFAULT_OPTIONS);
559 
561  static void
562  draw_spherical_sector(std::ostream &,
563  const vector_3d &,
564  const rotation_3d &,
565  const spherical_sector &,
566  uint32_t options_ = DEFAULT_OPTIONS);
567 
568  // Toroid nappe:
569 
571  static void
572  draw_toroid_nappe(std::ostream &,
573  const toroid_nappe &,
574  uint32_t options_ = DEFAULT_OPTIONS);
575 
577  static void
578  draw_toroid_nappe(std::ostream &,
579  const placement &,
580  const toroid_nappe &,
581  uint32_t options_ = DEFAULT_OPTIONS);
582 
584  static void
585  draw_toroid_nappe(std::ostream &,
586  const vector_3d &,
587  const rotation_3d &,
588  const toroid_nappe &,
589  uint32_t options_ = DEFAULT_OPTIONS);
590 
591  // Disk:
592 
594  static void
595  draw_disk(std::ostream &,
596  const disk & ,
597  uint32_t options_ = DEFAULT_OPTIONS );
598 
600  static void
601  draw_disk(std::ostream &,
602  const placement &,
603  const disk & ,
604  uint32_t options_ = DEFAULT_OPTIONS );
605 
607  static void
608  draw_disk(std::ostream &,
609  const vector_3d &,
610  const rotation_3d &,
611  const disk & ,
612  uint32_t options_ = DEFAULT_OPTIONS );
613 
615  static void
616  draw_disk(std::ostream &,
617  const vector_3d &,
618  const rotation_3d &,
619  double,
620  uint32_t options_ = DEFAULT_OPTIONS );
621 
623  static void
624  draw_disk(std::ostream &,
625  const vector_3d &,
626  const rotation_3d &,
627  double inner_radius_,
628  double outer_radius_,
629  double start_angle_,
630  double delta_angle_,
631  uint32_t options_ = DEFAULT_OPTIONS );
632 
633  // Triangle:
634 
636  static void
637  draw_triangle(std::ostream &,
638  const triangle &,
639  uint32_t options_ = DEFAULT_OPTIONS);
640 
642  static void
643  draw_triangle(std::ostream &,
644  const placement & pl_,
645  const triangle &,
646  uint32_t options_ = DEFAULT_OPTIONS);
647 
649  static void
650  draw_triangle(std::ostream &,
651  const vector_3d &,
652  const rotation_3d &,
653  const triangle &,
654  uint32_t options_ = DEFAULT_OPTIONS);
655 
656  // Quadrangle:
657 
659  static void
660  draw_quadrangle(std::ostream &,
661  const quadrangle &,
662  uint32_t options_ = DEFAULT_OPTIONS);
663 
665  static void
666  draw_quadrangle(std::ostream &,
667  const placement & pl_,
668  const quadrangle &,
669  uint32_t options_ = DEFAULT_OPTIONS);
670 
672  static void
673  draw_quadrangle(std::ostream &,
674  const vector_3d &,
675  const rotation_3d &,
676  const quadrangle &,
677  uint32_t options_ = DEFAULT_OPTIONS);
678 
679  // Composite surface:
680 
682  static void
683  draw_composite_surface(std::ostream &,
684  const composite_surface &,
685  uint32_t options_ = DEFAULT_OPTIONS);
686 
688  static void
689  draw_composite_surface(std::ostream &,
690  const placement & pl_,
691  const composite_surface &,
692  uint32_t options_ = DEFAULT_OPTIONS);
693 
695  static void
696  draw_composite_surface(std::ostream &,
697  const vector_3d &,
698  const rotation_3d &,
699  const composite_surface &,
700  uint32_t options_ = DEFAULT_OPTIONS);
701 
702  // Regular polygon:
703 
705  static void
706  draw_regular_polygon(std::ostream &,
707  const regular_polygon &,
708  uint32_t options_ = DEFAULT_OPTIONS);
709 
711  static void
712  draw_regular_polygon(std::ostream &,
713  const placement &,
714  const regular_polygon &,
715  uint32_t options_ = DEFAULT_OPTIONS);
716 
718  static void
719  draw_regular_polygon(std::ostream &,
720  const vector_3d &,
721  const rotation_3d &,
722  const regular_polygon &,
723  uint32_t options_ = DEFAULT_OPTIONS);
724 
725  // Simple polygon:
726 
728  static void
729  draw_simple_polygon(std::ostream &,
730  const simple_polygon &,
731  uint32_t options_ = DEFAULT_OPTIONS);
732 
734  static void
735  draw_simple_polygon(std::ostream &,
736  const placement &,
737  const simple_polygon &,
738  uint32_t options_ = DEFAULT_OPTIONS);
739 
741  static void
742  draw_simple_polygon(std::ostream &,
743  const vector_3d &,
744  const rotation_3d &,
745  const simple_polygon &,
746  uint32_t options_ = DEFAULT_OPTIONS);
747 
748  // Box:
749 
751  static void
752  draw_box(std::ostream &,
753  const box &,
754  uint32_t options_ = DEFAULT_OPTIONS);
755 
757  static void
758  draw_box(std::ostream &,
759  const placement &,
760  const box &,
761  uint32_t options_ = DEFAULT_OPTIONS);
762 
764  static void
765  draw_box(std::ostream &,
766  const vector_3d &,
767  const rotation_3d &,
768  const box &,
769  uint32_t options_ = DEFAULT_OPTIONS);
770 
772  static void
773  draw_box(std::ostream &,
774  const vector_3d &,
775  const rotation_3d &,
776  double x_, double y_, double z_,
777  uint32_t options_ = DEFAULT_OPTIONS);
778 
779  // Extruded box:
780 
782  static void
783  draw_extruded_box(std::ostream &,
784  const extruded_box &,
785  uint32_t options_ = DEFAULT_OPTIONS);
786 
788  static void
789  draw_extruded_box(std::ostream &,
790  const placement &,
791  const extruded_box &,
792  uint32_t options_ = DEFAULT_OPTIONS);
793 
795  static void
796  draw_extruded_box(std::ostream &,
797  const vector_3d &,
798  const rotation_3d &,
799  const extruded_box &,
800  uint32_t options_ = DEFAULT_OPTIONS);
801 
803  static void
804  draw_extruded_box(std::ostream &,
805  const vector_3d &,
806  const rotation_3d &,
807  double x_, double y_, double z_, double thickness_,
808  bool has_top_, bool has_bottom_,
809  uint32_t options_ = DEFAULT_OPTIONS);
810 
811  // Cylinder:
812 
814  static void
815  draw_cylinder(std::ostream &,
816  const cylinder &,
817  uint32_t options_ = DEFAULT_OPTIONS);
818 
820  static void
821  draw_cylinder(std::ostream &,
822  const placement &,
823  const cylinder &,
824  uint32_t options_ = DEFAULT_OPTIONS);
825 
827  static void
828  draw_cylinder(std::ostream &,
829  const vector_3d &,
830  const rotation_3d &,
831  const cylinder &,
832  uint32_t options_ = DEFAULT_OPTIONS);
833 
835  static void
836  draw_cylinder(std::ostream &,
837  const vector_3d &,
838  const rotation_3d &,
839  double radius_,
840  double heigth_,
841  uint32_t options_ = DEFAULT_OPTIONS);
842 
843  // Tube:
844 
846  static void
847  draw_tube(std::ostream &,
848  const tube &,
849  uint32_t options_ = DEFAULT_OPTIONS);
850 
852  static void
853  draw_tube(std::ostream &,
854  const placement &,
855  const tube &,
856  uint32_t options_ = DEFAULT_OPTIONS);
857 
859  static void
860  draw_tube(std::ostream &,
861  const vector_3d &,
862  const rotation_3d &,
863  double,
864  double,
865  double,
866  double = 0.,
867  double = 2 * M_PI,
868  uint32_t options_ = DEFAULT_OPTIONS);
869 
871  static void
872  draw_tube(std::ostream &,
873  const vector_3d &,
874  const rotation_3d &,
875  const tube &,
876  uint32_t options_ = DEFAULT_OPTIONS);
877 
878  // Torus:
879 
881  static void
882  draw_torus(std::ostream &,
883  const torus &,
884  uint32_t options_ = DEFAULT_OPTIONS);
885 
887  static void
888  draw_torus(std::ostream &,
889  const placement &,
890  const torus &,
891  uint32_t options_ = DEFAULT_OPTIONS);
892 
894  static void
895  draw_torus(std::ostream &,
896  const vector_3d &,
897  const rotation_3d &,
898  const torus &,
899  uint32_t options_ = DEFAULT_OPTIONS);
900 
902  static void
903  draw_torus(std::ostream &,
904  const vector_3d &,
905  const rotation_3d &,
906  double,
907  double,
908  double,
909  double = 0.,
910  double = 2 * M_PI,
911  uint32_t options_ = DEFAULT_OPTIONS);
912 
913  // Elliptical cylinder/tube:
914 
916  static void
917  draw_elliptical_cylinder(std::ostream &,
918  const elliptical_cylinder &,
919  uint32_t options_ = DEFAULT_OPTIONS);
920 
922  static void
923  draw_elliptical_cylinder(std::ostream &,
924  const placement &,
925  const elliptical_cylinder &,
926  uint32_t options_ = DEFAULT_OPTIONS);
927 
928 
930  static void
931  draw_elliptical_cylinder(std::ostream &,
932  const vector_3d &,
933  const rotation_3d &,
934  const elliptical_cylinder &,
935  uint32_t options_ = DEFAULT_OPTIONS);
936 
937  // Sphere:
938 
940  static void
941  draw_sphere(std::ostream &,
942  const sphere & s_,
943  uint32_t options_ = DEFAULT_OPTIONS);
944 
946  static void
947  draw_sphere(std::ostream &,
948  const placement &,
949  const sphere & s_,
950  uint32_t options_ = DEFAULT_OPTIONS);
951 
953  static void
954  draw_sphere(std::ostream &,
955  const vector_3d &,
956  const rotation_3d &,
957  const sphere & s_,
958  uint32_t options_ = DEFAULT_OPTIONS);
959 
961  static void
962  draw_sphere(std::ostream &,
963  const vector_3d &,
964  const rotation_3d &,
965  double radius_,
966  uint32_t options_ = DEFAULT_OPTIONS);
967 
969  static void
970  draw_sphere(std::ostream &,
971  const vector_3d &,
972  const rotation_3d &,
973  double r_min_,
974  double r_max_,
975  double phi_min_,
976  double delta_phi_,
977  double theta_min_,
978  double delta_theta_,
979  uint32_t options_ = DEFAULT_OPTIONS);
980 
981  // Ellipsoid:
982 
984  static void
985  draw_ellipsoid(std::ostream &,
986  const placement &,
987  const ellipsoid &,
988  uint32_t options_ = DEFAULT_OPTIONS);
989 
991  static void
992  draw_ellipsoid(std::ostream &,
993  const vector_3d &,
994  const rotation_3d &,
995  const ellipsoid &,
996  uint32_t options_ = DEFAULT_OPTIONS);
997 
999  static void
1000  draw_ellipsoid(std::ostream &,
1001  const vector_3d &,
1002  const rotation_3d &,
1003  double rx_, double ry_, double rz_,
1004  double z_min_, double z_max_,
1005  uint32_t options_ = DEFAULT_OPTIONS);
1006 
1007  // Polycone:
1008 
1010  static void
1011  draw_polycone(std::ostream &,
1012  const polycone &,
1013  uint32_t options_ = DEFAULT_OPTIONS);
1014 
1016  static void
1017  draw_polycone(std::ostream &,
1018  const placement &,
1019  const polycone &,
1020  uint32_t options_ = DEFAULT_OPTIONS);
1021 
1023  static void
1024  draw_polycone(std::ostream &,
1025  const vector_3d &,
1026  const rotation_3d &,
1027  const polycone &,
1028  uint32_t options_ = DEFAULT_OPTIONS);
1029 
1030  // Right circular conical nappe:
1031 
1032  static void
1033  draw_right_circular_conical_nappe(std::ostream &,
1035  uint32_t options_ = DEFAULT_OPTIONS);
1036 
1037  static void
1038  draw_right_circular_conical_nappe(std::ostream &,
1039  const placement &,
1041  uint32_t options_ = DEFAULT_OPTIONS);
1042 
1043  static void
1044  draw_right_circular_conical_nappe(std::ostream &,
1045  const vector_3d &,
1046  const rotation_3d &,
1048  uint32_t options_ = DEFAULT_OPTIONS);
1049 
1050  // Right circular conical frustrum:
1051 
1052  static void
1053  draw_right_circular_conical_frustrum(std::ostream &,
1055  uint32_t options_ = DEFAULT_OPTIONS);
1056 
1057  static void
1058  draw_right_circular_conical_frustrum(std::ostream &,
1059  const placement &,
1061  uint32_t options_ = DEFAULT_OPTIONS);
1062 
1063  static void
1064  draw_right_circular_conical_frustrum(std::ostream &,
1065  const vector_3d &,
1066  const rotation_3d &,
1068  uint32_t options_ = DEFAULT_OPTIONS);
1069 
1070 
1071  static void
1072  draw_right_circular_conical_frustrum(std::ostream &,
1073  const vector_3d &,
1074  const rotation_3d &,
1075  double rmin1_, double rmax1_,
1076  double rmin2_, double rmax2_,
1077  double z_,
1078  double phi1_ = 0.0, double phi2_ = 2 * M_PI,
1079  uint32_t options_ = DEFAULT_OPTIONS);
1080 
1081  // Right polygonal frustrum:
1082 
1083  static void
1084  draw_right_polygonal_frustrum(std::ostream &,
1085  const right_polygonal_frustrum &,
1086  uint32_t options_ = DEFAULT_OPTIONS);
1087 
1088  static void
1089  draw_right_polygonal_frustrum(std::ostream &,
1090  const placement &,
1091  const right_polygonal_frustrum &,
1092  uint32_t options_ = DEFAULT_OPTIONS);
1093 
1094  static void
1095  draw_right_polygonal_frustrum(std::ostream &,
1096  const vector_3d &,
1097  const rotation_3d &,
1098  const right_polygonal_frustrum &,
1099  uint32_t options_ = DEFAULT_OPTIONS);
1100 
1101  // Polyhedra:
1102 
1104  static void
1105  draw_polyhedra(std::ostream &,
1106  const polyhedra &,
1107  uint32_t options_ = DEFAULT_OPTIONS);
1108 
1110  static void
1111  draw_polyhedra(std::ostream &,
1112  const placement &,
1113  const polyhedra &,
1114  uint32_t options_ = DEFAULT_OPTIONS);
1115 
1117  static void
1118  draw_polyhedra(std::ostream &,
1119  const vector_3d &,
1120  const rotation_3d &,
1121  const polyhedra &,
1122  uint32_t options_ = DEFAULT_OPTIONS);
1123 
1124  // Wall:
1125 
1127  static void
1128  draw_wall(std::ostream &,
1129  const wall_solid &,
1130  uint32_t options_ = DEFAULT_OPTIONS);
1131 
1133  static void
1134  draw_wall(std::ostream &,
1135  const placement &,
1136  const wall_solid &,
1137  uint32_t options_ = DEFAULT_OPTIONS);
1138 
1140  static void
1141  draw_wall(std::ostream &,
1142  const vector_3d &,
1143  const rotation_3d &,
1144  const wall_solid &,
1145  uint32_t options_ = DEFAULT_OPTIONS);
1146 
1147  // Tessellated:
1148 
1150  static void
1151  draw_tessellated(std::ostream &,
1152  const tessellated_solid &,
1153  uint32_t options_ = DEFAULT_OPTIONS);
1154 
1156  static void
1157  draw_tessellated(std::ostream &,
1158  const placement &,
1159  const tessellated_solid &,
1160  uint32_t options_ = DEFAULT_OPTIONS);
1161 
1163  static void
1164  draw_tessellated(std::ostream &,
1165  const vector_3d &,
1166  const rotation_3d &,
1167  const tessellated_solid &,
1168  uint32_t options_ = DEFAULT_OPTIONS);
1169 
1170  // Union:
1171 
1173  static void
1174  draw_union_3d(std::ostream &,
1175  const union_3d &,
1176  uint32_t options_ = DEFAULT_OPTIONS);
1177 
1179  static void
1180  draw_union_3d(std::ostream &,
1181  const placement &,
1182  const union_3d &,
1183  uint32_t options_ = DEFAULT_OPTIONS);
1184 
1186  static void
1187  draw_union_3d(std::ostream &,
1188  const vector_3d &,
1189  const rotation_3d &,
1190  const union_3d &,
1191  uint32_t options_ = DEFAULT_OPTIONS);
1192 
1193  // Intersection:
1194 
1196  static void
1197  draw_intersection_3d(std::ostream &,
1198  const intersection_3d &,
1199  uint32_t options_ = DEFAULT_OPTIONS);
1200 
1202  static void
1203  draw_intersection_3d(std::ostream &,
1204  const placement &,
1205  const intersection_3d &,
1206  uint32_t options_ = DEFAULT_OPTIONS);
1207 
1209  static void
1210  draw_intersection_3d(std::ostream &,
1211  const vector_3d &,
1212  const rotation_3d &,
1213  const intersection_3d &,
1214  uint32_t options_ = DEFAULT_OPTIONS);
1215 
1216  // Subtraction:
1217 
1219  static void
1220  draw_subtraction_3d(std::ostream &,
1221  const subtraction_3d &,
1222  uint32_t options_ = DEFAULT_OPTIONS);
1223 
1225  static void
1226  draw_subtraction_3d(std::ostream &,
1227  const placement &,
1228  const subtraction_3d &,
1229  uint32_t options_ = DEFAULT_OPTIONS);
1230 
1232  static void
1233  draw_subtraction_3d(std::ostream &,
1234  const vector_3d &,
1235  const rotation_3d &,
1236  const subtraction_3d &,
1237  uint32_t options_ = DEFAULT_OPTIONS);
1238 
1239  // Display data:
1240 
1242  static void
1243  draw_display_data(std::ostream &,
1244  const display_data &,
1245  bool static_scene_ = true,
1246  int frame_index_ = -1,
1247  const std::string & color_ = "",
1248  const std::string & group_ = "",
1249  const std::string & name_ = "");
1250 
1252  static void
1253  draw_display_data(std::ostream &,
1254  const placement &,
1255  const display_data &,
1256  bool static_scene_ = true,
1257  int frame_index_ = -1,
1258  const std::string & color_ = "",
1259  const std::string & group_ = "",
1260  const std::string & name_ = "");
1261 
1263  static void
1264  draw_display_data(std::ostream &,
1265  const vector_3d &,
1266  const rotation_3d &,
1267  const display_data &,
1268  bool static_scene_ = true,
1269  int frame_index_ = -1,
1270  const std::string & color_ = "",
1271  const std::string & group_ = "",
1272  const std::string & name_ = "");
1273 
1274  // Generic:
1275 
1277  static void basic_draw(std::ostream & out_,
1278  const i_object_3d & o_,
1279  uint32_t options_ = DEFAULT_OPTIONS);
1280 
1282  static void basic_draw(std::ostream & out_,
1283  const placement & p_,
1284  const i_object_3d & o_,
1285  uint32_t options_ = DEFAULT_OPTIONS);
1286 
1288  static void basic_draw(std::ostream & out_,
1289  const vector_3d & position_,
1290  const rotation_3d & rotation_,
1291  const i_object_3d & o_,
1292  uint32_t options_ = DEFAULT_OPTIONS);
1293 
1295  static void draw(std::ostream & out_,
1296  const i_placement &,
1297  const i_object_3d &,
1298  uint32_t options_ = DEFAULT_OPTIONS);
1299 
1300  };
1301 
1302 } // end of namespace geomtools
1303 
1304 #endif // GEOMTOOLS_GNUPLOT_DRAW_H
1305 
1306 /*
1307 ** Local Variables: --
1308 ** mode: c++ --
1309 ** c-file-style: "gnu" --
1310 ** tab-width: 2 --
1311 ** End: --
1312 */
static void draw_extruded_box(std::ostream &, const extruded_box &, uint32_t options_=DEFAULT_OPTIONS)
Draw an extruded box.
Right circular conical frustrum (3D shape)
Definition: right_circular_conical_frustrum.h:32
bool is_activated() const
Check activation flag.
Mother abstract class for all 3D object classes.
Definition: i_object_3d.h:49
static void draw(std::ostream &out_, const i_placement &, const i_object_3d &, uint32_t options_=DEFAULT_OPTIONS)
Draw a 3D-object.
A sperical sector (2D shape)
Definition: spherical_sector.h:24
void add_point(double x_, double y_, double z_)
Add a point only if activated.
static void basic_draw_facet3(std::ostream &out_, const vector_3d &p1_, const vector_3d &p2_, const vector_3d &p3_, double color_=1.0)
Basic draw a 3 vertice facet.
A spherical volume (3D solid)
Definition: sphere.h:44
Definition: gnuplot_draw.h:89
A regular polygon.
Definition: regular_polygon.h:50
Right circular conical nappe (2D shape)
Definition: right_circular_conical_nappe.h:29
mode_flags_type
Mode of drawing.
Definition: gnuplot_draw.h:88
Right polygonal frustrum (3D shape)
Definition: right_polygonal_frustrum.h:27
A circular arc (1D shape)
Definition: circle.h:31
The abstract base class for all 2D shapes/surfaces.
Definition: composite_surface.h:26
Polycone 3D solid shape.
Definition: polycone.h:39
const mygsl::min_max & get_z_range() const
Return the const range on Z axis.
static void draw_union_3d(std::ostream &, const union_3d &, uint32_t options_=DEFAULT_OPTIONS)
Draw an union object.
The 3D shape model for a solid torus.
Definition: torus.h:43
The 2D shape/surface model for an elliptical cylinder sector.
Definition: elliptical_cylinder_sector.h:39
static void draw_composite_surface(std::ostream &, const composite_surface &, uint32_t options_=DEFAULT_OPTIONS)
Draw a composite surface.
The 3D shape model for a box.
Definition: box.h:44
The 3D shape model for an ellipsoid.
Definition: ellipsoid.h:42
Tessellated solid made of facets.
Definition: tessellation.h:294
Union of two 3D shapes.
Definition: union_3d.h:25
static void draw_cylindrical_sector(std::ostream &, const cylindrical_sector &, uint32_t options_=DEFAULT_OPTIONS)
Draw a cylindrical sector.
static void basic_draw_polylines(std::ostream &out_, const wires_type &wires_)
Basic draw a list of polylines.
static void draw_disk(std::ostream &, const disk &, uint32_t options_=DEFAULT_OPTIONS)
Draw a disk.
static void draw_intersection_3d(std::ostream &, const intersection_3d &, uint32_t options_=DEFAULT_OPTIONS)
Draw an intersection object.
An helix (1D shape) in a 3D space.
Definition: helix_3d.h:38
A simple polygon in the XY plane.
Definition: simple_polygon.h:38
An line/segment (1D shape) in a 3D space.
Definition: line_3d.h:38
Record the min and max values from a set of values.
Definition: min_max.h:24
Subtraction of two 3D shapes.
Definition: subtraction_3d.h:24
Intersection of two 3D shapes.
Definition: intersection_3d.h:25
static void draw_simple_polygon(std::ostream &, const simple_polygon &, uint32_t options_=DEFAULT_OPTIONS)
Draw a simple polygon.
static bool basic_draw_polyline(std::ostream &, const polyline_type &, bool new_line_=true, bool gnuplot_trick=true)
Basic draw a polyline.
The 3D shape model for an elliptical cylinder.
Definition: elliptical_cylinder.h:43
static void basic_draw(std::ostream &out_, const i_object_3d &o_, uint32_t options_=DEFAULT_OPTIONS)
Draw a 3D-object.
static void draw_toroid_nappe(std::ostream &, const toroid_nappe &, uint32_t options_=DEFAULT_OPTIONS)
Draw a toroid nappe.
void activate()
Activate the recording of drawn points.
static void draw_quadrangle(std::ostream &, const quadrangle &, uint32_t options_=DEFAULT_OPTIONS)
Draw a quadrangle.
The 3D shape model for a tube.
Definition: tube.h:45
A spherical sector (2D shape)
Definition: cylindrical_sector.h:24
The 3D shape model for an extruded box.
Definition: extruded_box.h:43
static void draw_wall(std::ostream &, const wall_solid &, uint32_t options_=DEFAULT_OPTIONS)
Draw a wall solid object.
static color::context & color_context()
Return a mutable reference to the color context singleton.
static const color::context & color_context_const()
Return a const reference to the color context singleton.
static xyz_range & bounding_box(bounding_box_action_type action_=BB_ACTION_NONE)
Return a mutable reference to the display bounding box singleton.
static void draw_vertex(std::ostream &, const vector_3d &vertex_, uint32_t options_=DEFAULT_OPTIONS)
Draw a vertex.
Definition: gnuplot_draw.h:145
void deactivate()
Deactivate the recording of drawn points.
Polyhedra 3D solid shape.
Definition: polyhedra.h:35
static const uint32_t DEFAULT_OPTIONS
Default rendering option flags.
Definition: gnuplot_draw.h:94
A sequence of connected linear segments (3D)
Definition: polyline_3d.h:27
A elliptical_sector sector surface (2D shape)
Definition: elliptical_sector.h:29
static void draw_torus(std::ostream &, const torus &, uint32_t options_=DEFAULT_OPTIONS)
Draw a torus.
static void draw_line(std::ostream &, const line_3d &, uint32_t options_=DEFAULT_OPTIONS)
Draw a line object.
A triangle.
Definition: triangle.h:29
static void basic_draw_point(std::ostream &, double x_, double y_, double z_, bool new_line_=true)
Basic draw an uncolored point.
A circular arc (1D shape)
Definition: ellipse.h:31
The 3D shape model for a wall solid.
Definition: wall_solid.h:43
static void draw_sphere(std::ostream &, const sphere &s_, uint32_t options_=DEFAULT_OPTIONS)
Draw a sphere.
static void draw_right_circular_conical_frustrum(std::ostream &, const right_circular_conical_frustrum &, uint32_t options_=DEFAULT_OPTIONS)
static void draw_tessellated(std::ostream &, const tessellated_solid &, uint32_t options_=DEFAULT_OPTIONS)
Draw a tessellated solid object.
static void basic_draw_facet4(std::ostream &out_, const vector_3d &p1_, const vector_3d &p2_, const vector_3d &p3_, const vector_3d &p4_, double color_=1.0)
Basic draw a 4 vertice facet.
CLHEP::HepRotation rotation_3d
Alias for the CLHEP 3D-rotation class.
Definition: clhep.h:66
static void basic_draw_point_with_color(std::ostream &, double x_, double y_, double z_, double color_, bool new_line_=true)
Basic draw a colored point.
static void draw_right_circular_conical_nappe(std::ostream &, const right_circular_conical_nappe &, uint32_t options_=DEFAULT_OPTIONS)
static void draw_triangle(std::ostream &, const triangle &, uint32_t options_=DEFAULT_OPTIONS)
Draw a triangle.
static void draw_ellipse(std::ostream &, const ellipse &, uint32_t options_=DEFAULT_OPTIONS)
Draw a ellipse.
Definition: gnuplot_draw.h:142
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
A toroid nappe (2D shape)
Definition: toroid_nappe.h:24
static void draw_tube(std::ostream &, const tube &, uint32_t options_=DEFAULT_OPTIONS)
Draw a tube.
static void draw_subtraction_3d(std::ostream &, const subtraction_3d &, uint32_t options_=DEFAULT_OPTIONS)
Draw a subtraction object.
A XYZ range used to record drawn points in an effective bounding box.
Definition: gnuplot_draw.h:99
A rectangular surface (2D shape)
Definition: rectangle.h:30
static void draw_box(std::ostream &, const box &, uint32_t options_=DEFAULT_OPTIONS)
Draw a box.
Abstract interface for all placement objects.
Definition: i_placement.h:42
static void draw_wires(std::ostream &, const wires_type &wires)
Draw a list of polylines in some arbitrary reference frame.
static void draw_polyline(std::ostream &, const polyline_3d &poly_, uint32_t options_=DEFAULT_OPTIONS)
Draw a polyline.
std::list< vector_3d > polyline_type
Definition: utils.h:55
The 3D shape model for a cylinder.
Definition: cylinder.h:41
static void draw_display_data(std::ostream &, const display_data &, bool static_scene_=true, int frame_index_=-1, const std::string &color_="", const std::string &group_="", const std::string &name_="")
Draw a display_data object.
The placement for a geometry volume with its translation and rotation with respect to some mother ref...
Definition: placement.h:34
static void draw_elliptical_cylinder_sector(std::ostream &, const elliptical_cylinder_sector &, uint32_t options_=DEFAULT_OPTIONS)
Draw an elliptical cylinder sector.
Color context object.
Definition: color.h:156
static void draw_rectangle(std::ostream &, const rectangle &, uint32_t options_=DEFAULT_OPTIONS)
Draw a rectangle.
static void draw_circle(std::ostream &, const circle &, uint32_t options_=DEFAULT_OPTIONS)
Draw a circle.
void reset_ranges()
Reset the embedded X, Y, Z ranges.
basic_segment_3d segment_type
Definition: utils.h:51
static void draw_elliptical_sector(std::ostream &, const elliptical_sector &, uint32_t options_=DEFAULT_OPTIONS)
Draw a elliptical sector.
static void draw_ellipsoid(std::ostream &, const placement &, const ellipsoid &, uint32_t options_=DEFAULT_OPTIONS)
Draw an ellipsoid.
std::list< polyline_type > wires_type
Alias for a list of 3D-polylines.
Definition: utils.h:61
bounding_box_action_type
On the fly bounding box action.
Definition: gnuplot_draw.h:141
static const xyz_range & bounding_box_const()
Return a const reference to the display bounding box singleton.
static void draw_polycone(std::ostream &, const polycone &, uint32_t options_=DEFAULT_OPTIONS)
Draw a polycone.
const mygsl::min_max & get_y_range() const
Return the const range on Y axis.
Definition: gnuplot_draw.h:143
static void basic_draw_segment(std::ostream &, const vector_3d &, const vector_3d &, bool gp_trick_=false)
Basic draw a segment.
static void draw_ellipsoid_sector(std::ostream &, const ellipsoid_sector &, uint32_t options_=DEFAULT_OPTIONS)
Draw a ellipsoid sector.
static void basic_draw_wires(std::ostream &out_, const wires_type &wires_)
Basic draw a list of polylines.
static void draw_right_polygonal_frustrum(std::ostream &, const right_polygonal_frustrum &, uint32_t options_=DEFAULT_OPTIONS)
The 2D shape/surface model for an ellipsoid sector.
Definition: ellipsoid_sector.h:38
Definition: gnuplot_draw.h:144
static void draw_polyhedra(std::ostream &, const polyhedra &, uint32_t options_=DEFAULT_OPTIONS)
Draw a polyhedra object.
const mygsl::min_max & get_x_range() const
Return the const range on X axis.
A quadrangle.
Definition: quadrangle.h:36
static void draw_polylines(std::ostream &, const std::list< polyline_3d > &, uint32_t options_=DEFAULT_OPTIONS)
Draw a list of polylines.
static void draw_helix(std::ostream &, const helix_3d &helix_, uint32_t options_=DEFAULT_OPTIONS)
Draw a helix object.
static void draw_regular_polygon(std::ostream &, const regular_polygon &, uint32_t options_=DEFAULT_OPTIONS)
Draw a regular polygon.
static void draw_cylinder(std::ostream &, const cylinder &, uint32_t options_=DEFAULT_OPTIONS)
Draw a cylinder.
A disk/ring sector surface (2D shape)
Definition: disk.h:26
Definition: display_data.h:41
static void draw_spherical_sector(std::ostream &, const spherical_sector &, uint32_t options_=DEFAULT_OPTIONS)
Draw a spherical sector.
static void draw_elliptical_cylinder(std::ostream &, const elliptical_cylinder &, uint32_t options_=DEFAULT_OPTIONS)
Draw an elliptical cylinder/tube.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
Drawing primitives for various solid shapes.
Definition: gnuplot_draw.h:83