220 Error(
"ctor",
"Composite %s: cannot parse expression: %s", name, expression);
252 Error(
"ctor",
"Composite shape %s has null node", name);
350 Error(
"Divide",
"Composite shapes cannot be divided");
370 printf(
" Bounding box:\n");
389 Error(
"MakeNode",
"parser error");
393 Warning(
"MakeNode",
"no geometrical transformation allowed at this level");
396 Error(
"MakeNode",
"Expression has no boolean operation");
420 if (!painter || !viewer)
return kFALSE;
435 paintComponents = viewer->
OpenComposite(buffer, &addChildren);
442 if (preferLocal) matrix->
Clear();
444 if (preferLocal) *matrix = backup;
513 out <<
" TGeoShape *" <<
GetPointerName() <<
" = new TGeoCompositeShape(\"" <<
GetName() <<
"\", pBoolNode);" << std::endl;
547 if (!
fNode)
return 0;
558 for (
Int_t i=0; i<vecsize; i++) inside[i] =
Contains(&points[3*i]);
576 for (
Int_t i=0; i<vecsize; i++) dists[i] =
DistFromInside(&points[3*i], &dirs[3*i], 3, step[i]);
584 for (
Int_t i=0; i<vecsize; i++) dists[i] =
DistFromOutside(&points[3*i], &dirs[3*i], 3, step[i]);
594 for (
Int_t i=0; i<vecsize; i++) safe[i] =
Safety(&points[3*i], inside[i]);
virtual void CloseComposite()=0
virtual void Sizeof3D() const
compute size of this 3D object
virtual TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
Divide all range of iaxis in range/step cells.
Random number generator class based on M.
virtual Bool_t PaintComposite(Option_t *option="") const
Paint this composite shape into the current 3D viewer Returns bool flag indicating if the caller shou...
void MakeNode(const char *expression)
Make a boolean node according to the top level boolean operation of expression.
TGeoShape * GetLeftShape() const
Geometrical transformation package.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual Bool_t OpenComposite(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
Bool_t TestBit(UInt_t f) const
virtual void SetName(const char *name)
Set the name of the TNamed.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
virtual Int_t GetNpoints()=0
void RegisterYourself()
Register the shape and all components to TGeoManager class.
virtual Int_t GetNmeshVertices() const
Return number of vertices of the mesh representation.
Matrix class used for computing global transformations Should NOT be used for node definition...
virtual void SetPoints(Double_t *points) const
Fill buffer with shape vertices.
virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=0, Double_t *safe=0) const =0
static Int_t Parse(const char *expr, TString &expr1, TString &expr2, TString &expr3)
Parse a string boolean expression and do a syntax check.
virtual void InspectShape() const
Prints shape parameters.
static UInt_t GetCSLevel()
Return CS level.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Paint(Option_t *option)
Special schema for feeding the 3D buffers to the painter client.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
TGeoMatrix * GetLeftMatrix() const
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Abstract 3D shapes viewer.
static void IncCSLevel()
Increment CS level.
virtual Double_t Capacity() const
Computes capacity of this shape [length^3] by sampling with 1% error.
virtual void Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const
Compute safe distance from each of the points in the input array.
virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const
Compute distance from outside point to this composite shape.
const char * GetPointerName() const
Provide a pointer name containing uid.
virtual Double_t Rndm()
Machine independent random number generator.
virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const
Compute distance from inside point to outside of this composite shape.
Class handling Boolean composition of shapes.
virtual const char * GetName() const
Get the shape name.
Int_t ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
Returns distance to shape primitive mesh.
Base abstract class for all shapes.
void Clear(Option_t *option="")
clear the data for this matrix
virtual void ComputeBBox(Double_t &dx, Double_t &dy, Double_t &dz, Double_t *origin)=0
virtual void ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize)
Compute the normal for an array o points so that norm.dot.dir is positive Input: Arrays of point coor...
virtual Bool_t IsComposite() const
TObjArray * GetListOfShapes() const
Bool_t IsRegistered() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
void CreateThreadData(Int_t nthreads)
Create thread data for n threads max.
Generic 3D primitive description class.
R__EXTERN TRandom * gRandom
TObjArray * GetListOfMatrices() const
static UInt_t DecCSLevel()
Decrement CS level.
virtual void DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const
Compute distance from array of input points having directions specified by dirs. Store output in dist...
virtual Bool_t Contains(const Double_t *point) const =0
virtual void ClearThreadData() const
Needed just for cleanup.
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Computes normal vector in POINT to the composite shape.
virtual Bool_t PreferLocalFrame() const =0
R__EXTERN TGeoManager * gGeoManager
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute closest distance from point px,py to each corner.
virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const
Compute distance from outside point to surface of the box.
TGeoCompositeShape()
Default constructor.
virtual void SetPoints(Double_t *points) const
create points for a composite shape
virtual void Sizeof3D() const
Register size of this 3D object.
Int_t AddShape(const TGeoShape *shape)
Add a shape to the list. Returns index of the shape in list.
TGeoMatrix * GetRightMatrix() const
virtual void Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const
Check the inside status for each of the points in the array.
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const =0
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
void SetShapeBit(UInt_t f, Bool_t set)
Equivalent of TObject::SetBit.
virtual void DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t *step) const
Compute distance from array of input points having directions specified by dirs. Store output in dist...
virtual void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections, Bool_t localFrame) const
Fills the supplied buffer, with sections in desired frame See TBuffer3D.h for explanation of sections...
typedef void((*Func_t)())
Abstract class for geometry painters.
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const
computes the closest distance from given point to this shape, according to option.
Base class for Boolean operations between two shapes.
virtual void InspectShape() const
print shape parameters
virtual void ComputeBBox()
compute bounding box of the sphere
virtual Bool_t Contains(const Double_t *point) const
Tests if point is inside the shape.
virtual void CreateThreadData(Int_t nthreads)
Needed just for cleanup.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=0, Double_t *safe=0) const =0
double norm(double *x, double *p)
TGeoShape * GetRightShape() const
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
virtual ~TGeoCompositeShape()
destructor
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual const char * GetTitle() const
Returns title of object.
virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
const char * Data() const
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)=0