Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TShape.h
Go to the documentation of this file.
1// @(#)root/g3d:$Id$
2// Author: Nenad Buncic 17/09/95
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TShape
13#define ROOT_TShape
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TShape //
19// //
20// Basic shape class //
21// //
22// //
23//////////////////////////////////////////////////////////////////////////
24
25#include "TNamed.h"
26#include "TMaterial.h"
27#include "TAttLine.h"
28#include "TAttFill.h"
29#include "TAtt3D.h"
30#include "X3DBuffer.h"
31
32class TBuffer3D;
33class TNode;
34
35class TShape : public TNamed, public TAttLine, public TAttFill, public TAtt3D {
36
37protected:
38 Int_t fNumber; //Shape number
39 Int_t fVisibility; //Visibility flag
40 TMaterial *fMaterial; //Pointer to material
41
42 virtual void FillBuffer3D(TBuffer3D & buffer, Int_t reqSections) const;
43 Int_t GetBasicColor() const;
44
46
47
48public:
49 TShape();
50 TShape(const char *name, const char *title, const char *material);
51 TShape(const TShape&);
52 TShape& operator=(const TShape&);
53 ~TShape() override;
54
55 virtual const TBuffer3D &GetBuffer3D(Int_t reqSections) const;
56 TMaterial *GetMaterial() const {return fMaterial;}
57 virtual Int_t GetNumber() const {return fNumber;}
59 void Paint(Option_t *option="") override;
60 void SetName(const char *name) override;
61 virtual void SetPoints(Double_t *points) const ;
62 virtual void SetVisibility(Int_t vis) {fVisibility = vis;} // *MENU*
63 void TransformPoints(Double_t *points, UInt_t NbPnts) const;
64
65 ClassDefOverride(TShape,2) //Basic shape
66};
67
69
70inline void TShape::SetName(const char *) { }
71
72#endif
#define R__EXTERN
Definition DllImport.h:27
unsigned int UInt_t
Definition RtypesCore.h:46
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
char name[80]
Definition TGX11.cxx:110
R__EXTERN TNode * gNode
Definition TShape.h:68
Use this attribute class when an object should have 3D capabilities.
Definition TAtt3D.h:19
Fill Area Attributes class.
Definition TAttFill.h:19
Line Attributes class.
Definition TAttLine.h:18
Generic 3D primitive description class.
Definition TBuffer3D.h:18
Manages a detector material.
Definition TMaterial.h:28
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
TNode description.
Definition TNode.h:33
This is the base class for all geometry shapes.
Definition TShape.h:35
TShape & operator=(const TShape &)
assignment operator
Definition TShape.cxx:92
void SetName(const char *name) override
Set the name of the TNamed.
Definition TShape.h:70
virtual void SetPoints(Double_t *points) const
Set points.
Definition TShape.cxx:154
void Paint(Option_t *option="") override
This method is used only when a shape is painted outside a TNode.
Definition TShape.cxx:142
Int_t GetBasicColor() const
Get basic color.
Definition TShape.cxx:241
virtual Int_t GetNumber() const
Definition TShape.h:57
Int_t fVisibility
Definition TShape.h:39
Int_t GetVisibility() const
Definition TShape.h:58
Int_t ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py)
Distance to primitive.
Definition TShape.cxx:117
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Stub to avoid forcing implementation at this stage.
Definition TShape.cxx:252
TShape()
Shape default constructor.
Definition TShape.cxx:50
TMaterial * GetMaterial() const
Definition TShape.h:56
~TShape() override
Shape default destructor.
Definition TShape.cxx:109
virtual void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections) const
We have to set kRawSize (unless already done) to allocate buffer space before kRaw can be filled.
Definition TShape.cxx:211
Int_t fNumber
Definition TShape.h:38
TMaterial * fMaterial
Definition TShape.h:40
virtual void SetVisibility(Int_t vis)
Definition TShape.h:62
void TransformPoints(Double_t *points, UInt_t NbPnts) const
Transform points (LocalToMaster)
Definition TShape.cxx:190