StDraw3D
class description - header file - source file - inheritance tree (.pdf)
class StDraw3D : public TObject
private:
TVirtualPad* InitPad()
void InitViewer()
void Redraw()
void SetMaster(StDraw3D* master)
public:
StDraw3D(const char* detectorName = "TPC", TVirtualPad* pad = 0)
StDraw3D(const StDraw3D&)
virtual ~StDraw3D()
virtual void AddComment(const char* cmnt)
virtual void AddDetectors(const char* nameDetectors)
virtual const StDraw3DStyle& AddStyle(EDraw3DStyle type, Color_t col, Style_t sty, Size_t siz)
static TClass* Class()
virtual void Clear(Option_t* opt = "")
virtual const TString& DetectorNames() const
virtual TObject* Draw(TObject* o)
virtual void Draw(Option_t* option = "")
virtual TObject* Draw3D(int n, const float* xyz)
void Draw3DTest()
virtual TClass* IsA() const
virtual void Joint(StDraw3D* dsp)
virtual TObject* Line(int n, const float* xyz, Color_t col = Color_t(-1), Style_t sty = Style_t(-1), Size_t siz = Size_t(-1))
virtual TObject* Line(int n, const float* xyz, EDraw3DStyle sty)
virtual void Modified()
StDraw3D& operator=(const StDraw3D&)
TVirtualPad* Pad() const
virtual TObject* Point(float x, float y, float z, Color_t col = Color_t(-1), Style_t sty = Style_t(-1), Size_t siz = Size_t(-1))
virtual TObject* Point(float x, float y, float z, EDraw3DStyle sty)
virtual TObject* Points(int n, const float* xyz, EDraw3DStyle sty)
virtual TObject* Points(int n, const float* xyz, Color_t col = Color_t(-1), Style_t sty = Style_t(-1), Size_t siz = Size_t(-1))
virtual void SetBkColor(Color_t newBkColor)
virtual void SetComment(const char* cmnt)
virtual void SetDetectors(const char* nameDetectors)
virtual void SetModel(TObject* model)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
static void ShowTest()
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual const StDraw3DStyle& Style(EDraw3DStyle type)
virtual void Update()
TVirtualViewer3D* Viewer() const
private:
static int fgDraw_3d_init
map<EDraw3DStyle,StDraw3DStyle> fStyles
TVirtualPad* fPad
Color_t fBkColor background color
TVirtualViewer3D* fViewer
view_3D* fView
TString fDetectorName
StDraw3D* fMaster
static Color_t fgColorDefault
static Style_t fgStyDefault
static Size_t fgSizDefault
static Color_t fgBkColor
static Int_t fDrawCanvasCounter
Class StDraw3D - to draw the 3D primitives like 3D points and 3D lines
decoratated with the STAR detector geometry
It provides the simple way to visualize the event
primitives in 3D against of the STAR detector
geometry quickly.
<
>

void InitViewer()
Create 3D viewer if no master provided
void SetDetectors(const char*nameDetectors)
The detectorName is a comma separated list of the OpenInventor files with no extension
For all names on the list one should provide the iv file with the "iv extension:
<name>.iv
void AddDetectors(const char*nameDetectors)
The detectorName is a comma separated list of the OpenInventor files with no extension
For all names on the list one should provide the iv file with the "iv extension:
<name>.iv
TObject * Points(int n, const float *xyz, EDraw3DStyle sty)
Draw "n" points of the "xyz" array of the float coordinates
with ROOT TPolyMarker3D class and the predefined attrbutes
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function.
TObject * Draw3D(int n, const float *xyz)
Draw "n" points of the "xyz" array of the float coordinates
and the kVtx attrbute
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function.
TObject * Point(float x, float y, float z, EDraw3DStyle sty)
Draw ONE 3D marker with ROOT TPolyMarker3D class at x,y,z position
and the predefined attrbutes
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function.
TObject * Line(int n, const float *xyz,EDraw3DStyle sty)
Draw "n" points of the "xyz" array of the float coordinates
with ROOT TPolyLine3D class and the predefined attrbutes
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function.
void Joint(StDraw3D *dsp)
The method to force two different instancses
of the StDraw3D class paint onto one and the same
TPad.
void Redraw()
Move all existent view to the master window if any
void SetModel(TObject *model)
add the "model" reference to the current view
void SetComment(const char *cmnt)
set the "model" comment for the current view
void AddComment(const char *cmnt)
add the "model" comment for the current view
void Modified()
One doesn't need to call this method
because one can not change any object yet
void Draw3DTest()
------------------------------------------------
The method to test the class
It should produce the #D Coin widget:
<
>

------------------------------------------------
x y z
------------------------------------------------
void ShowTest()
More complex test.
It creates TWO different widgets
One is decorated with the detector geometry,
another one "plain"
Method does not recreate the widgets when it is called
for several times
It creates the widget at once and reuses it with each call.
Last update: Thu May 14 19:54:54 2009
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.