112 Error(
"TPolyLineShape",
"No polyline is defined");
152 if (size > 10000) mode = 1;
153 else if (size > 3000) mode = 2;
218 const Int_t inaxis = 7;
228 if (px < puxmin - inaxis)
goto END;
229 if (py > puymin + inaxis)
goto END;
230 if (px > puxmax + inaxis)
goto END;
231 if (py < puymax - inaxis)
goto END;
233 view =
gPad->GetView();
240 for (i=0;i<pointSize;i++) {
243 x1 =
gPad->XtoAbsPixel(xndc[0]);
244 y1 =
gPad->YtoAbsPixel(xndc[1]);
245 dpoint = (px-
x1)*(px-x1) + (py-y1)*(py-y1);
246 if (dpoint < dist) dist = dpoint;
328 vector[i]=end[i]-start[i];
329 nodeposition[i]=0.5*(start[i]+end[i]);
345 Gyrot(rotate,cosa,sina,mrot);
357 mrot[2][0] *= length;
358 mrot[2][1] *= length;
359 mrot[2][2] *= length;
363 TVolume node(
"SegmentNode",
"SegmentNode", shape);
368 TRotMatrix matrix (
"rotate",
"rotate",&mrot[0][0]);
370 ,nodeposition[2],&matrix);
381 length = width/length;
386 TRotMatrix kneeMatrix(
"knee",
"knee",&mrot[0][0]);
390 node.
Add(&knee,&kneePosition);
414 if (opt && !strstr(opt,
"x3d")) {
449 gPad->PaintLine3D(xyz, &xyz[3]);
471 for (
Int_t i = 0; i <
n; i++) {
474 if (xndc[0] <
gPad->GetX1() || xndc[0] >
gPad->GetX2())
continue;
475 if (xndc[1] <
gPad->GetY1() || xndc[1] >
gPad->GetY2())
continue;
478 pxy[nin].
fX =
gPad->XtoPixel(x[nin]);
479 pxy[nin].
fY =
gPad->YtoPixel(y[nin]);
511 for (
Int_t i=0;i<size;i++)
545 buff->
segs[3*i ] = c;
546 buff->
segs[3*i+1] = i;
547 buff->
segs[3*i+2] = i+1;
560 if (buff->
segs)
delete [] buff->
segs;
562 if (buff)
delete buff;
581 if (size > 10000) mode = 1;
582 else if (size > 3000) mode = 2;
597 for (i = 0; i < size; i++) {
598 for (j = 0; j < mode; j++) {
599 for (k = 0; k < 2; k++) {
601 for (n = 0; n < 3; n++) {
604 buff->
points[mode*6*i+6*j+3*k+
n] =
605 xyz[
n] * (1 + (j == n ? delta : 0));
618 for (i = 0; i < buff->
numSegs; i++) {
619 buff->
segs[3*i ] = c;
620 buff->
segs[3*i+1] = 2*i;
621 buff->
segs[3*i+2] = 2*i+1;
634 if (buff->
segs)
delete [] buff->
segs;
636 if (buff)
delete buff;
646 if (v1 && v2 && ndim > 0)
647 for (
Int_t i=0; i<ndim; i++) p+= v1[i]*v2[i];
657 if (v1 && v2 && ndim > 0)
658 for (
Int_t i=0;i<ndim;i++) p+= v1[i]*v2[i];
693 ca1 = (sa*sa)/(1.+ca) ;
697 for(j1 = 0; j1 < 3; j1++) {
698 for(j2 = 0; j2 < 3; j2++)
699 trans[j1][j2] = ca1*ax[j1]*ax[j2];
703 trans[0][1] = trans[0][1] - sa*ax[2];
704 trans[1][0] = trans[1][0] + sa*ax[2];
705 trans[0][2] = trans[0][2] + sa*ax[1];
706 trans[2][0] = trans[2][0] - sa*ax[1];
707 trans[1][2] = trans[1][2] - sa*ax[0];
708 trans[2][1] = trans[2][1] + sa*ax[0];
720 if (color != currentColor) {
733 if (size != currentSize) {
786 else Error(
"Sizeof3D()",
"buffer size has not been defined yet");
virtual const char * GetTitle() const
Returns title of object.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)=0
Computes distance from point (px,py) to the object.
Float_t Normalize(Float_t v[3])
Normalize a vector v in place.
virtual void SetShape(TShape *shape)
to be documented
virtual void PaintPoints3D(const TPoints3DABC *points, Option_t *opt="")
virtual char * GetObjectInfo(Int_t px, Int_t py) const
forward the GetObjectInfo call to the decorated object
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
virtual Size_t GetSizeAttribute() const
to be documented
Abstract class to define Arrays of 3D points.
virtual void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)=0
virtual Size_t SetSizeAttribute(Size_t size)
to be documented
virtual Int_t GetN() const
GetN() returns the number of allocated cells if any.
struct _x3d_data_ X3DBuffer
virtual Int_t Size() const
to be documented
virtual void PaintNode(Float_t *start, Float_t *end, Option_t *option)
Double_t *start - coordinate of the start point of the current segment Double_t *end - coordinate of ...
virtual void SetConnection(TShape *connection)
virtual Size3D * CreateX3DSize(Bool_t marker=kFALSE)
to be documented
virtual Int_t PointDistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a 3-D points.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
forward the ExecuteEvent call to the decorated object
virtual void Paint(Option_t *opt)
to be documented
virtual Color_t GetColorAttribute() const
to be documented
virtual void Create()
the X3D buffer sizes
virtual void Modify()
Change current line attributes if necessary.
TPolyLineShape()
to be documented
virtual void SetWidthFactor(Float_t fact=1.0)
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual const char * GetTitle() const
forward the GetObjectInfo call to the decorated object
virtual void PaintX3DLine(Option_t *opt="")
to be documented
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a 3-D polyline.
virtual Style_t SetStyleAttribute(Style_t style)
Set new style for this line.
const char * Data() const
virtual void Add(TDataSet *dataset)
virtual void SetVisibility(ENodeSEEN vis=TVolume::kBothVisible)
Set visibility for this volume and its sons.
virtual void Paint3d(Option_t *opt)
to be documented
virtual ~TPolyLineShape()
to be documented
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void PaintX3DMarker(Option_t *opt="")
to be documented
void FillX3DBuffer(X3DBuffer *buff)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Float_t * GetXYZ(Float_t *xyz, Int_t idx, Int_t num=1) const
GetXYZ(Float_t *xyz,Int_t idx,Int_t num=1) fills the buffer supplied by the calling code with the poi...
struct _x3d_sizeof_ Size3D
virtual Float_t * GetP() const
GetP() returns the pointer to the float point array of points if available The number of the availabl...
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void Sizeof3D() const
Return total X3D size of this shape with its attributes.
virtual void Modify()
Change current marker attributes if necessary.
This is the base class for all geometry shapes.
virtual TPoints3DABC * GetPoints() const
Manages a detector rotation matrix.
virtual void PaintNodePosition(Option_t *option="", TVolumePosition *postion=0)
virtual const char * GetName() const
forward the GetName call to the decorated object
static Double_t * Gyrot(Double_t *dirc, Double_t cosang, Double_t sinang, Double_t trans[3][3])
virtual const char * GetName() const
Returns name of object.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
T * Cross(const T v1[3], const T v2[3], T out[3])
virtual Color_t SetColorAttribute(Color_t color)
to be documented
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
A box with faces perpendicular to the axes.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
static const double x1[5]
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to an event at (px,py).
virtual const char * GetName() const
Returns name of object.
virtual Float_t * GetP() const
GetP() returns the pointer to the float point array of points if available The number of the availabl...
static constexpr double s
virtual void SetLineAttr(Color_t color, Int_t width, Option_t *opt="")
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void PaintPolyMarker(Int_t n, Float_t *p=0, Marker_t m=0, Option_t *opt="")
Paint polymarker in CurrentPad World coordinates.
static Float_t Product(Float_t *v1, Float_t *v2, Int_t ndim=3)
to be documented
virtual Float_t GetWidthFactor() const
R__EXTERN TVirtualPS * gVirtualPS
Double_t Sqrt(Double_t x)
virtual Int_t Size() const =0
virtual Width_t GetLineWidth() const
Return the line width.
virtual const char * GetTitle() const
Returns title of object.
virtual Style_t GetStyleAttribute() const
to be documented
virtual void Draw(Option_t *opt="")
to be documented
virtual void PaintPoints(Int_t n, Float_t *p=0, Option_t *opt="")
Draw this 3-D polyline with new coordinates.