97 TAttLine::operator=(ts);
98 TAttFill::operator=(ts);
99 TAtt3D::operator=(ts);
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 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)
Set the line color.
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
Return the line color.
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
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