112 Error(
"TPolyLineShape",
"No polyline is defined");
152 if (size > 10000) mode = 1;
153 else if (size > 3000) mode = 2;
223 const Int_t inaxis = 7;
233 if (px < puxmin - inaxis)
goto END;
234 if (py > puymin + inaxis)
goto END;
235 if (px > puxmax + inaxis)
goto END;
236 if (py < puymax - inaxis)
goto END;
238 view =
gPad->GetView();
245 for (i=0;i<pointSize;i++) {
248 x1 =
gPad->XtoAbsPixel(xndc[0]);
249 y1 =
gPad->YtoAbsPixel(xndc[1]);
250 dpoint = (px-
x1)*(px-x1) + (py-y1)*(py-y1);
251 if (dpoint < dist) dist = dpoint;
333 vector[i]=end[i]-start[i];
334 nodeposition[i]=0.5*(start[i]+end[i]);
350 Gyrot(rotate,cosa,sina,mrot);
362 mrot[2][0] *= length;
363 mrot[2][1] *= length;
364 mrot[2][2] *= length;
368 TVolume node(
"SegmentNode",
"SegmentNode", shape);
373 TRotMatrix matrix (
"rotate",
"rotate",&mrot[0][0]);
375 ,nodeposition[2],&matrix);
386 length = width/length;
391 TRotMatrix kneeMatrix(
"knee",
"knee",&mrot[0][0]);
395 node.
Add(&knee,&kneePosition);
419 if (opt && !strstr(opt,
"x3d")) {
455 gPad->PaintLine3D(xyz, &xyz[3]);
478 for (
Int_t i = 0; i <
n; i++) {
481 if (xndc[0] <
gPad->GetX1() || xndc[0] >
gPad->GetX2())
continue;
482 if (xndc[1] <
gPad->GetY1() || xndc[1] >
gPad->GetY2())
continue;
485 pxy[nin].
fX =
gPad->XtoPixel(x[nin]);
486 pxy[nin].
fY =
gPad->YtoPixel(y[nin]);
518 for (
Int_t i=0;i<size;i++)
552 buff->
segs[3*i ] = c;
553 buff->
segs[3*i+1] = i;
554 buff->
segs[3*i+2] = i+1;
567 if (buff->
segs)
delete [] buff->
segs;
569 if (buff)
delete buff;
588 if (size > 10000) mode = 1;
589 else if (size > 3000) mode = 2;
604 for (i = 0; i < size; i++) {
605 for (j = 0; j < mode; j++) {
606 for (k = 0; k < 2; k++) {
608 for (n = 0; n < 3; n++) {
611 buff->
points[mode*6*i+6*j+3*k+
n] =
612 xyz[
n] * (1 + (j == n ?
delta : 0));
625 for (i = 0; i < buff->
numSegs; i++) {
626 buff->
segs[3*i ] = c;
627 buff->
segs[3*i+1] = 2*i;
628 buff->
segs[3*i+2] = 2*i+1;
641 if (buff->
segs)
delete [] buff->
segs;
643 if (buff)
delete buff;
653 if (v1 && v2 && ndim > 0)
654 for (
Int_t i=0; i<ndim; i++) p+= v1[i]*v2[i];
664 if (v1 && v2 && ndim > 0)
665 for (
Int_t i=0;i<ndim;i++) p+= v1[i]*v2[i];
700 ca1 = (sa*sa)/(1.+ca) ;
704 for(j1 = 0; j1 < 3; j1++) {
705 for(j2 = 0; j2 < 3; j2++)
706 trans[j1][j2] = ca1*ax[j1]*ax[j2];
710 trans[0][1] = trans[0][1] - sa*ax[2];
711 trans[1][0] = trans[1][0] + sa*ax[2];
712 trans[0][2] = trans[0][2] + sa*ax[1];
713 trans[2][0] = trans[2][0] - sa*ax[1];
714 trans[1][2] = trans[1][2] - sa*ax[0];
715 trans[2][1] = trans[2][1] + sa*ax[0];
727 if (color != currentColor) {
740 if (size != currentSize) {
795 else Error(
"Sizeof3D()",
"buffer size has not been defined yet");
virtual const char * GetName() const
Returns name of object.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
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...
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.
virtual Int_t Size() const
to be documented
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 void WCtoNDC(const Float_t *pw, Float_t *pn)=0
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
struct _x3d_data_ X3DBuffer
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 Size_t GetSizeAttribute() const
to be documented
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 void Create()
the X3D buffer sizes
virtual void Sizeof3D() const
-*-*-*-*-*-*Return total X3D size of this shape with its attributes-*-*-*-*-* *-* ===================...
virtual Float_t GetWidthFactor() const
virtual void Modify()
Change current line attributes if necessary.
TPolyLineShape()
to be documented
virtual void SetWidthFactor(Float_t fact=1.0)
virtual Color_t GetColorAttribute() const
to be documented
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
virtual Width_t GetLineWidth() const
Return the line width.
virtual const char * GetTitle() const
forward the GetObjectInfo call to the decorated object
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
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)
SetStyleAttribute(Style_t style) - set new style for this line Returns: previous value of the line st...
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 Style_t GetStyleAttribute() const
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 char * GetObjectInfo(Int_t px, Int_t py) const
forward the GetObjectInfo call to the decorated object
virtual Int_t GetN() const
GetN() returns the number of allocated cells if any.
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 Modify()
Change current marker attributes if necessary.
This is the base class for all geometry shapes.
Manages a detector rotation matrix.
virtual void PaintNodePosition(Option_t *option="", TVolumePosition *postion=0)
static Double_t * Gyrot(Double_t *dirc, Double_t cosang, Double_t sinang, Double_t trans[3][3])
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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 TPoints3DABC * GetPoints() const
virtual Color_t SetColorAttribute(Color_t color)
to be documented
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual Color_t GetLineColor() const
Return the line color.
A box with faces perpendicular to the axes.
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 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-*-*-*-*-*-*-* *-* ==================...
virtual const char * GetTitle() const
Returns title 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 Float_t Product(Float_t *v1, Float_t *v2, Int_t ndim=3)
to be documented
R__EXTERN TVirtualPS * gVirtualPS
Double_t Sqrt(Double_t x)
virtual Int_t Size() const =0
virtual const char * GetName() const
Returns name of object.
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-*-*-*-*-*-*-*-*-* *-* ===================...
virtual const char * GetName() const
forward the GetName call to the decorated object
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const