122 if (!(numPoints && view))
return dist;
127 for (
Int_t i = 0; i < numPoints; i++) {
129 view->
WCtoNDC(&points[3*i], xndc);
130 x1 =
gPad->XtoAbsPixel(xndc[0]);
131 y1 =
gPad->YtoAbsPixel(xndc[1]);
132 dpoint2= (px-
x1)*(px-x1) + (py-y1)*(py-y1);
133 if (dpoint2 < dist) dist = (
Int_t)dpoint2;
162 void TShape::Streamer(
TBuffer &R__b)
172 TNamed::Streamer(R__b);
173 TAttLine::Streamer(R__b);
174 TAttFill::Streamer(R__b);
175 TAtt3D::Streamer(R__b);
195 for (
UInt_t j=0; j<NbPnts; j++) {
196 dlocal[0] = points[3*j];
197 dlocal[1] = points[3*j+1];
198 dlocal[2] = points[3*j+2];
200 points[3*j] = dmaster[0];
201 points[3*j+1] = dmaster[1];
202 points[3*j+2] = dmaster[2];
244 if (basicColor < 0) basicColor = 0;
255 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 FillBuffer3D(TBuffer3D &buffer, Int_t reqSections) const
We have to set kRawSize (unless already done) to allocate buffer space before kRaw can be filled...
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
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 const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Stub to avoid forcing implementation at this stage.
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.
Abstract 3D shapes viewer.
void SetSectionsValid(UInt_t mask)
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.
Bool_t SectionsValid(UInt_t mask) const
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
TShape()
Shape default constructor.
TObject * Remove(TObject *obj)
Remove object from the list.
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
TMaterial * GetMaterial(const char *name) const
Return pointer to Material with name.
Generic 3D primitive description class.
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
static const double x1[5]
THashList * GetListOfShapes() const
Binding & operator=(OUT(*fun)(void))
Int_t GetBasicColor() const
Get basic color.
virtual void Add(TObject *obj)
virtual void SetPoints(Double_t *points) const
Set points.
Double_t Sqrt(Double_t x)
virtual Int_t GetSize() const
TShape & operator=(const TShape &)
assignment operator
R__EXTERN TGeometry * gGeometry
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract...
void TransformPoints(Double_t *points, UInt_t NbPnts) const
Transform points (LocalToMaster)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0