85 fVisibility(ts.fVisibility),
86 fMaterial(ts.fMaterial)
123 if (!(numPoints && view))
return dist;
128 for (
Int_t i = 0; i < numPoints; i++) {
130 view->
WCtoNDC(&points[3*i], xndc);
131 x1 =
gPad->XtoAbsPixel(xndc[0]);
132 y1 =
gPad->YtoAbsPixel(xndc[1]);
133 dpoint2= (px-
x1)*(px-x1) + (py-y1)*(py-y1);
134 if (dpoint2 < dist) dist = (
Int_t)dpoint2;
163 void TShape::Streamer(
TBuffer &R__b)
173 TNamed::Streamer(R__b);
174 TAttLine::Streamer(R__b);
175 TAttFill::Streamer(R__b);
176 TAtt3D::Streamer(R__b);
196 for (
UInt_t j=0; j<NbPnts; j++) {
197 dlocal[0] = points[3*j];
198 dlocal[1] = points[3*j+1];
199 dlocal[2] = points[3*j+2];
201 points[3*j] = dmaster[0];
202 points[3*j+1] = dmaster[1];
203 points[3*j+2] = dmaster[2];
245 if (basicColor < 0) basicColor = 0;
256 Warning(
"GetBuffer3D",
"this must be implemented for shapes in a TNode::Paint hierarchy. This will become a pure virtual fn eventually.");
virtual ~TShape()
Shape default destructor.
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
THashList * GetListOfShapes() const
Use this attribute class when an object should have 3D capabilities.
Buffer base class used for serializing objects.
void SetLocalMasterIdentity()
Set kRaw tessellation section of buffer with supplied sizes.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
void ClearSectionsValid()
Clear any sections marked valid.
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...
Fill Area Attributes class.
The TNamed class is the base class for all named ROOT classes.
virtual void Local2Master(Double_t *local, Double_t *master)
Convert one point from local system to master reference system.
virtual void SetPoints(Double_t *points) const
Set points.
Abstract 3D shapes viewer.
void SetSectionsValid(UInt_t mask)
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Stub to avoid forcing implementation at this stage.
Int_t ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py)
Distance to primitive.
virtual void SetLineColor(Color_t lcolor)
This is the base class for all geometry shapes.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
void TransformPoints(Double_t *points, UInt_t NbPnts) const
Transform points (LocalToMaster)
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
TMaterial * GetMaterial(const char *name) const
Return pointer to Material with name.
TObject * Remove(TObject *obj)
Remove object from the list.
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
Int_t GetBasicColor() const
Get basic color.
Generic 3D primitive description class.
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract...
virtual Color_t GetLineColor() const
virtual void Paint(Option_t *option="")
This method is used only when a shape is painted outside a TNode.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t GetSize() const
static const double x1[5]
Binding & operator=(OUT(*fun)(void))
virtual void Add(TObject *obj)
Double_t Sqrt(Double_t x)
TShape & operator=(const TShape &)
assignment operator
R__EXTERN TGeometry * gGeometry
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
Bool_t SectionsValid(UInt_t mask) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.