#include <View3D.h>
Public Member Functions | |
| View3D () | |
| ~View3D () | |
| void | Draw () |
| void | Clear () |
| TMarker3DBox & | AddMarker3DBox (double x, double y, double z, double dx, double dy, double dz, double th=0.0, double ph=0.0) |
| TPolyMarker3D & | AddPolyMarker3D (int n, int c, int st, double sz) |
| TPolyLine3D & | AddPolyLine3D (int n, int c, int w, int s) |
| TText & | AddText (double x, double y, const char *text) |
Private Attributes | |
| std::list< TMarker3DBox * > | fMarker3DBoxL |
| List of 3D marker boxes. | |
| std::list< TPolyMarker3D * > | fPolyMarker3DL |
| List of poly markers. | |
| std::list< TPolyLine3D * > | fPolyLine3DL |
| List of poly lines. | |
| std::list< TText * > | fText3DL |
| List of texts. | |
| std::list< TMarker3DBox * >::iterator | fNextMarker3DBox |
| Top of the list. | |
| std::list< TPolyMarker3D * >::iterator | fNextPolyMarker3D |
| Top of the list. | |
| std::list< TPolyLine3D * >::iterator | fNextPolyLine3D |
| Top of the list. | |
| std::list< TText * >::iterator | fNextText3D |
| Top of the list. | |
|
|
Definition at line 8 of file View3D.cxx. References AddMarker3DBox(), AddPolyLine3D(), AddPolyMarker3D(), AddText(), Clear(), fMarker3DBoxL, fNextMarker3DBox, fNextPolyLine3D, fNextPolyMarker3D, fNextText3D, fPolyLine3DL, fPolyMarker3DL, and fText3DL.
00009 {
00010 fNextMarker3DBox = fMarker3DBoxL.end();
00011 fNextPolyMarker3D = fPolyMarker3DL.end();
00012 fNextPolyLine3D = fPolyLine3DL.end();
00013 fNextText3D = fText3DL.end();
00014
00015 // Add one object of every type to get lists started
00016 this->AddMarker3DBox(0.0,0.0,0.0,50.0,50.0,50.0,0.0,0.0);
00017 this->AddPolyMarker3D(1,2,24,1.0);
00018 this->AddPolyLine3D(1,2,5,1);
00019 this->AddText(0.0,0.0,"");
00020 this->Clear();
00021 }
|
|
|
Definition at line 25 of file View3D.cxx. References fMarker3DBoxL, fPolyLine3DL, fPolyMarker3DL, and fText3DL.
00026 {
00027 for_each(fMarker3DBoxL.begin(), fMarker3DBoxL.end(), delete_marker3dbox());
00028 for_each(fPolyMarker3DL.begin(),fPolyMarker3DL.end(),delete_polymarker3d());
00029 for_each(fPolyLine3DL.begin(), fPolyLine3DL.end(), delete_polyline3d());
00030 for_each(fText3DL.begin(), fText3DL.end(), delete_text());
00031 }
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 58 of file View3D.cxx. References fMarker3DBoxL, and fNextMarker3DBox. Referenced by View3D().
00061 {
00062 TMarker3DBox* m = 0;
00063 if (fNextMarker3DBox == fMarker3DBoxL.end()) {
00064 // Grow the list...
00065 m = new TMarker3DBox(x,y,z,dx,dy,dz,th,ph);
00066 m->SetBit(kCanDelete,kFALSE);
00067 fMarker3DBoxL.push_back(m);
00068 fNextMarker3DBox = fMarker3DBoxL.end();
00069 }
00070 else {
00071 // Reuse the marker at the current position
00072 m = *fNextMarker3DBox;
00073 m->SetPosition(x,y,z);
00074 m->SetSize(dx,dy,dz);
00075 ++fNextMarker3DBox;
00076 }
00077 // Return the marker just added so users can twiddle it
00078 return *m;
00079 }
|
|
||||||||||||||||||||
|
Definition at line 111 of file View3D.cxx. References fNextPolyLine3D, and fPolyLine3DL. Referenced by evd::DetectorView::DrawMCTruth(), and View3D().
00112 {
00113 TPolyLine3D* pl = 0;
00114 if (fNextPolyLine3D == fPolyLine3DL.end()) {
00115 // Grow the list...
00116 pl = new TPolyLine3D(n);
00117 pl->SetBit(kCanDelete,kFALSE);
00118 pl->SetLineColor(c);
00119 pl->SetLineWidth(w);
00120 pl->SetLineStyle(s);
00121 fPolyLine3DL.push_back(pl);
00122 fNextPolyLine3D = fPolyLine3DL.end();
00123 }
00124 else {
00125 // Reuse the polyline at the current position
00126 pl = *fNextPolyLine3D;
00127 pl->SetPolyLine(n,(double*)0,"");
00128 pl->SetLineColor(c);
00129 pl->SetLineWidth(w);
00130 pl->SetLineStyle(s);
00131 ++fNextPolyLine3D;
00132 }
00133 // Return the marker just added so users can twiddle it (ie. add points)
00134 return *pl;
00135 }
|
|
||||||||||||||||||||
|
Definition at line 83 of file View3D.cxx. References fNextPolyMarker3D, and fPolyMarker3DL. Referenced by View3D().
00084 {
00085 TPolyMarker3D* pm = 0;
00086 if (fNextPolyMarker3D == fPolyMarker3DL.end()) {
00087 // Grow the list...
00088 pm = new TPolyMarker3D(n);
00089 pm->SetBit(kCanDelete,kFALSE);
00090 pm->SetMarkerColor(c);
00091 pm->SetMarkerStyle(st);
00092 pm->SetMarkerSize(sz);
00093 fPolyMarker3DL.push_back(pm);
00094 fNextPolyMarker3D = fPolyMarker3DL.end();
00095 }
00096 else {
00097 // Reuse the polymarker at the current position
00098 pm = *fNextPolyMarker3D;
00099 pm->SetPolyMarker(n,(double*)0,1,"");
00100 pm->SetMarkerColor(c);
00101 pm->SetMarkerStyle(st);
00102 pm->SetMarkerSize(sz);
00103 ++fNextPolyMarker3D;
00104 }
00105 // Return the marker just added so users can twiddle it (ie. add points)
00106 return *pm;
00107 }
|
|
||||||||||||||||
|
Definition at line 139 of file View3D.cxx. References fNextText3D, and fText3DL. Referenced by View3D().
00140 {
00141 TText* itxt = 0;
00142 if (fNextText3D == fText3DL.end()) {
00143 // Grow the list...
00144 itxt = new TText(x,y,text);
00145 itxt->SetBit(kCanDelete,kFALSE);
00146 fText3DL.push_back(itxt);
00147 fNextText3D = fText3DL.end();
00148 }
00149 else {
00150 // Reuse the text at the current position
00151 itxt = *fNextText3D;
00152 itxt->SetText(x,y,text);
00153 ++fNextText3D;
00154 }
00155
00156 // Return the marker just added so users can twiddle it
00157 return *itxt;
00158 }
|
|
|
Definition at line 45 of file View3D.cxx. References fMarker3DBoxL, fNextMarker3DBox, fNextPolyLine3D, fNextPolyMarker3D, fNextText3D, fPolyLine3DL, fPolyMarker3DL, and fText3DL. Referenced by evd::DetectorView::Draw(), and View3D().
00046 {
00047 // To clear, just reset the next positions to use for inserts to the
00048 // begining of the lists. Keep all the memory around as it it very likely
00049 // we will reuse it
00050 fNextMarker3DBox = fMarker3DBoxL.begin();
00051 fNextPolyMarker3D = fPolyMarker3DL.begin();
00052 fNextPolyLine3D = fPolyLine3DL.begin();
00053 fNextText3D = fText3DL.begin();
00054 }
|
|
|
Definition at line 35 of file View3D.cxx. References fMarker3DBoxL, fNextMarker3DBox, fNextPolyLine3D, fNextPolyMarker3D, fNextText3D, fPolyLine3DL, fPolyMarker3DL, and fText3DL. Referenced by evd::DetectorView::Draw().
00036 {
00037 for_each(fMarker3DBoxL.begin(), fNextMarker3DBox, draw_tobject());
00038 for_each(fPolyMarker3DL.begin(),fNextPolyMarker3D,draw_tobject());
00039 for_each(fPolyLine3DL.begin(), fNextPolyLine3D, draw_tobject());
00040 for_each(fText3DL.begin(), fNextText3D, draw_tobject());
00041 }
|
|
|
List of 3D marker boxes.
Definition at line 34 of file View3D.h. Referenced by AddMarker3DBox(), Clear(), Draw(), View3D(), and ~View3D(). |
|
|
Top of the list.
Definition at line 39 of file View3D.h. Referenced by AddMarker3DBox(), Clear(), Draw(), and View3D(). |
|
|
Top of the list.
Definition at line 41 of file View3D.h. Referenced by AddPolyLine3D(), Clear(), Draw(), and View3D(). |
|
|
Top of the list.
Definition at line 40 of file View3D.h. Referenced by AddPolyMarker3D(), Clear(), Draw(), and View3D(). |
|
|
Top of the list.
|
|
|
List of poly lines.
Definition at line 36 of file View3D.h. Referenced by AddPolyLine3D(), Clear(), Draw(), View3D(), and ~View3D(). |
|
|
List of poly markers.
Definition at line 35 of file View3D.h. Referenced by AddPolyMarker3D(), Clear(), Draw(), View3D(), and ~View3D(). |
|
|
List of texts.
Definition at line 37 of file View3D.h. Referenced by AddText(), Clear(), Draw(), View3D(), and ~View3D(). |
1.3.5