Logo ROOT  
Reference Guide
TGeoScaledShape.cxx
Go to the documentation of this file.
1 // @(#)root/geom:$Id$
2 // Author: Andrei Gheata 26/09/05
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #include <iostream>
14 
15 #include "TGeoManager.h"
16 #include "TGeoMatrix.h"
17 #include "TGeoVolume.h"
18 #include "TGeoNode.h"
19 #include "TGeoScaledShape.h"
20 #include "TBuffer3D.h"
21 #include "TBuffer3DTypes.h"
22 #include "TMath.h"
23 
24 /** \class TGeoScaledShape
25 \ingroup Geometry_classes
26 
27 A shape scaled by a TGeoScale transformation
28 \image html geom_scaledshape.png
29 */
30 
32 
33 ////////////////////////////////////////////////////////////////////////////////
34 /// Default constructor
35 
37 {
38  fShape = 0;
39  fScale = 0;
40 }
41 
42 
43 ////////////////////////////////////////////////////////////////////////////////
44 /// Constructor
45 
47  :TGeoBBox(name,0,0,0)
48 {
49  fShape = shape;
50  fScale = scale;
53 
54 }
55 
56 ////////////////////////////////////////////////////////////////////////////////
57 /// Constructor
58 
60 {
61  fShape = shape;
62  fScale = scale;
65 }
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 /// destructor
69 
71 {
72 }
73 
74 ////////////////////////////////////////////////////////////////////////////////
75 /// Computes capacity of this shape [length^3]
76 
78 {
79  Double_t capacity = fShape->Capacity();
80  const Double_t *scale = fScale->GetScale();
81  capacity *= scale[0]*scale[1]*scale[2];
82  return capacity;
83 }
84 
85 ////////////////////////////////////////////////////////////////////////////////
86 /// Compute bounding box of the scaled shape
87 
89 {
90  if (!fShape) {
91  Error("ComputeBBox", "Scaled shape %s without shape", GetName());
92  return;
93  }
96  const Double_t *orig = box->GetOrigin();
97  Double_t point[3], master[3];
98  point[0] = box->GetDX();
99  point[1] = box->GetDY();
100  point[2] = box->GetDZ();
101 
102  fScale->LocalToMaster(orig, fOrigin);
103  fScale->LocalToMaster(point, master);
104  fDX = TMath::Abs(master[0]);
105  fDY = TMath::Abs(master[1]);
106  fDZ = TMath::Abs(master[2]);
107 }
108 
109 ////////////////////////////////////////////////////////////////////////////////
110 /// Compute normal to closest surface from POINT.
111 
112 void TGeoScaledShape::ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
113 {
114  Double_t local[3], ldir[3], lnorm[3];
115  fScale->MasterToLocal(point,local);
116  fScale->MasterToLocalVect(dir,ldir);
117  TGeoMatrix::Normalize(ldir);
118  fShape->ComputeNormal(local,ldir,lnorm);
119 // fScale->LocalToMasterVect(lnorm, norm);
120  fScale->MasterToLocalVect(lnorm, norm);
121  TGeoMatrix::Normalize(norm);
122 }
123 
124 ////////////////////////////////////////////////////////////////////////////////
125 /// Test if point is inside the scaled shape
126 
128 {
129  Double_t local[3];
130  fScale->MasterToLocal(point,local);
131  return fShape->Contains(local);
132 }
133 
134 ////////////////////////////////////////////////////////////////////////////////
135 /// compute closest distance from point px,py to each vertex. Should not be called.
136 
138 {
140  return ShapeDistancetoPrimitive(n, px, py);
141 }
142 
143 ////////////////////////////////////////////////////////////////////////////////
144 /// Compute distance from inside point to surface of the scaled shape.
145 
146 Double_t TGeoScaledShape::DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact, Double_t step, Double_t *safe) const
147 {
148  Double_t local[3], ldir[3];
149  Double_t lstep;
150  fScale->MasterToLocal(point,local);
151  lstep = fScale->MasterToLocal(step, dir);
152  fScale->MasterToLocalVect(dir,ldir);
153  TGeoMatrix::Normalize(ldir);
154  Double_t dist = fShape->DistFromInside(local,ldir, iact, lstep, safe);
155  if (iact<3 && safe) *safe = fScale->LocalToMaster(*safe);
156  dist = fScale->LocalToMaster(dist, ldir);
157  return dist;
158 }
159 
160 
161 ////////////////////////////////////////////////////////////////////////////////
162 /// Compute distance from outside point to surface of the scaled shape.
163 
164 Double_t TGeoScaledShape::DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact, Double_t step, Double_t *safe) const
165 {
166  Double_t local[3], ldir[3];
167  Double_t lstep;
168 // printf("DistFromOutside(%f,%f,%f, %f,%f,%f)\n", point[0], point[1], point[2], dir[0], dir[1],dir[2]);
169  fScale->MasterToLocal(point,local);
170 // printf("local: %f,%f,%f\n", local[0],local[1], local[2]);
171  lstep = fScale->MasterToLocal(step, dir);
172  fScale->MasterToLocalVect(dir,ldir);
173  TGeoMatrix::Normalize(ldir);
174 // printf("localdir: %f,%f,%f\n",ldir[0],ldir[1],ldir[2]);
175  Double_t dist = fShape->DistFromOutside(local,ldir, iact, lstep, safe);
176 // printf("local distance: %f\n", dist);
177  if (safe) *safe = fScale->LocalToMaster(*safe);
178  dist = fScale->LocalToMaster(dist, ldir);
179 // printf("converted distance: %f\n",dist);
180  return dist;
181 }
182 
183 ////////////////////////////////////////////////////////////////////////////////
184 /// Cannot divide assemblies.
185 
186 TGeoVolume *TGeoScaledShape::Divide(TGeoVolume * /*voldiv*/, const char *divname, Int_t /*iaxis*/, Int_t /*ndiv*/,
187  Double_t /*start*/, Double_t /*step*/)
188 {
189  Error("Divide", "Scaled shapes cannot be divided. Division volume %s not created", divname);
190  return 0;
191 }
192 
193 ////////////////////////////////////////////////////////////////////////////////
194 /// Fills a static 3D buffer and returns a reference.
195 
196 const TBuffer3D & TGeoScaledShape::GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
197 {
198  TBuffer3D &buffer = (TBuffer3D &)fShape->GetBuffer3D(reqSections, localFrame);
199 
200 // TGeoBBox::FillBuffer3D(buffer, reqSections, localFrame);
201  Double_t halfLengths[3] = { fDX, fDY, fDZ };
202  buffer.SetAABoundingBox(fOrigin, halfLengths);
203  if (!buffer.fLocalFrame) {
204  TransformPoints(buffer.fBBVertex[0], 8);
205  }
206 
207  if ((reqSections & TBuffer3D::kRaw) && buffer.SectionsValid(TBuffer3D::kRawSizes)) {
208  SetPoints(buffer.fPnts);
209  if (!buffer.fLocalFrame) {
210  TransformPoints(buffer.fPnts, buffer.NbPnts());
211  }
212  }
213 
214  return buffer;
215 }
216 ////////////////////////////////////////////////////////////////////////////////
217 /// in case shape has some negative parameters, these has to be computed
218 /// in order to fit the mother
219 
221 {
222  Error("GetMakeRuntimeShape", "Scaled shapes cannot be parametrized.");
223  return NULL;
224 }
225 
226 ////////////////////////////////////////////////////////////////////////////////
227 /// Returns numbers of vertices, segments and polygons composing the shape mesh.
228 
229 void TGeoScaledShape::GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
230 {
231  fShape->GetMeshNumbers(nvert, nsegs, npols);
232 }
233 
234 ////////////////////////////////////////////////////////////////////////////////
235 /// print shape parameters
236 
238 {
239  printf("*** Shape %s: TGeoScaledShape ***\n", GetName());
240  fScale->Print();
241  fShape->InspectShape();
243 }
244 
245 ////////////////////////////////////////////////////////////////////////////////
246 /// Returns true if the scaled shape is an assembly.
247 
249 {
250  return fShape->IsAssembly();
251 }
252 
253 ////////////////////////////////////////////////////////////////////////////////
254 /// Check if the scale transformation is a reflection.
255 
257 {
258  return fScale->IsReflection();
259 }
260 
261 ////////////////////////////////////////////////////////////////////////////////
262 /// Creates a TBuffer3D describing *this* shape.
263 /// Coordinates are in local reference frame.
264 
266 {
267  TBuffer3D *buff = fShape->MakeBuffer3D();
268  if (buff) SetPoints(buff->fPnts);
269  return buff;
270 }
271 
272 ////////////////////////////////////////////////////////////////////////////////
273 /// Create a scaled shape starting from a non-scaled one.
274 
276 {
277  TGeoShape *old_shape = shape;
278  TGeoShape *new_shape = nullptr;
279  if (shape->IsA() == TGeoScaledShape::Class()) {
280  TGeoScaledShape *sshape = (TGeoScaledShape*)shape;
281  TGeoScale *old_scale = sshape->GetScale();
282  old_shape = sshape->GetShape();
283  scale->SetScale(scale->GetScale()[0]*old_scale->GetScale()[0],
284  scale->GetScale()[1]*old_scale->GetScale()[1],
285  scale->GetScale()[2]*old_scale->GetScale()[2]);
286  }
287  if (old_shape->IsAssembly()) {
288  // The shape is owned by the assembly, so make sure it does not register to TGeoManager
289  new_shape = new TGeoScaledShape(old_shape, scale);
290  new_shape->SetName(name);
291  } else {
292  new_shape = new TGeoScaledShape(name, old_shape, scale);
293  }
294  return new_shape;
295 }
296 
297 ////////////////////////////////////////////////////////////////////////////////
298 /// Fill TBuffer3D structure for segments and polygons.
299 
301 {
302  fShape->SetSegsAndPols(buff);
303 }
304 
305 ////////////////////////////////////////////////////////////////////////////////
306 /// computes the closest distance from given point to this shape, according
307 /// to option. The matching point on the shape is stored in spoint.
308 
310 {
311  Double_t local[3];
312  fScale->MasterToLocal(point,local);
313  Double_t safe = fShape->Safety(local,in);
314  safe = fScale->LocalToMaster(safe);
315  return safe;
316 }
317 
318 ////////////////////////////////////////////////////////////////////////////////
319 /// Save a primitive as a C++ statement(s) on output stream "out".
320 
321 void TGeoScaledShape::SavePrimitive(std::ostream &out, Option_t *option)
322 {
323  if (TObject::TestBit(kGeoSavePrimitive)) return;
324  out << " // Shape: " << GetName() << " type: " << ClassName() << std::endl;
325  if (!fShape || !fScale) {
326  out << "##### Invalid shape or scale !. Aborting. #####" << std::endl;
327  return;
328  }
329  fShape->SavePrimitive(out, option);
330  TString sname = fShape->GetPointerName();
331  const Double_t *sc = fScale->GetScale();
332  out << " // Scale factor:" << std::endl;
333  out << " TGeoScale *pScale = new TGeoScale(\"" << fScale->GetName()
334  << "\"," << sc[0] << "," << sc[1] << "," << sc[2] << ");" << std::endl;
335  out << " TGeoScaledShape *" << GetPointerName() << " = new TGeoScaledShape(\""
336  << GetName() << "\"," << sname << ", pScale);" << std::endl;
337 }
338 
339 ////////////////////////////////////////////////////////////////////////////////
340 /// Mesh points for scaled shapes.
341 
343 {
344  Int_t npts = fShape->GetNmeshVertices();
346  Double_t master[3];
347  for (Int_t i=0; i<npts; i++) {
348  fScale->LocalToMaster(&points[3*i], master);
349  memcpy(&points[3*i], master, 3*sizeof(Double_t));
350  }
351 }
352 
353 ////////////////////////////////////////////////////////////////////////////////
354 /// Mesh points for scaled shapes.
355 
357 {
358  Int_t npts = fShape->GetNmeshVertices();
360  Double_t master[3];
361  Double_t local[3];
362  Int_t index;
363  for (Int_t i=0; i<npts; i++) {
364  index = 3*i;
365  local[0] = points[index];
366  local[1] = points[index+1];
367  local[2] = points[index+2];
368  fScale->LocalToMaster(local, master);
369  points[index] = master[0];
370  points[index+1] = master[1];
371  points[index+2] = master[2];
372  }
373 }
374 
375 ////////////////////////////////////////////////////////////////////////////////
376 /// Check the inside status for each of the points in the array.
377 /// Input: Array of point coordinates + vector size
378 /// Output: Array of Booleans for the inside of each point
379 
380 void TGeoScaledShape::Contains_v(const Double_t *points, Bool_t *inside, Int_t vecsize) const
381 {
382  for (Int_t i=0; i<vecsize; i++) inside[i] = Contains(&points[3*i]);
383 }
384 
385 ////////////////////////////////////////////////////////////////////////////////
386 /// Compute the normal for an array o points so that norm.dot.dir is positive
387 /// Input: Arrays of point coordinates and directions + vector size
388 /// Output: Array of normal directions
389 
390 void TGeoScaledShape::ComputeNormal_v(const Double_t *points, const Double_t *dirs, Double_t *norms, Int_t vecsize)
391 {
392  for (Int_t i=0; i<vecsize; i++) ComputeNormal(&points[3*i], &dirs[3*i], &norms[3*i]);
393 }
394 
395 ////////////////////////////////////////////////////////////////////////////////
396 /// Compute distance from array of input points having directions specified by dirs. Store output in dists
397 
398 void TGeoScaledShape::DistFromInside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t* step) const
399 {
400  for (Int_t i=0; i<vecsize; i++) dists[i] = DistFromInside(&points[3*i], &dirs[3*i], 3, step[i]);
401 }
402 
403 ////////////////////////////////////////////////////////////////////////////////
404 /// Compute distance from array of input points having directions specified by dirs. Store output in dists
405 
406 void TGeoScaledShape::DistFromOutside_v(const Double_t *points, const Double_t *dirs, Double_t *dists, Int_t vecsize, Double_t* step) const
407 {
408  for (Int_t i=0; i<vecsize; i++) dists[i] = DistFromOutside(&points[3*i], &dirs[3*i], 3, step[i]);
409 }
410 
411 ////////////////////////////////////////////////////////////////////////////////
412 /// Compute safe distance from each of the points in the input array.
413 /// Input: Array of point coordinates, array of statuses for these points, size of the arrays
414 /// Output: Safety values
415 
416 void TGeoScaledShape::Safety_v(const Double_t *points, const Bool_t *inside, Double_t *safe, Int_t vecsize) const
417 {
418  for (Int_t i=0; i<vecsize; i++) safe[i] = Safety(&points[3*i], inside[i]);
419 }
n
const Int_t n
Definition: legend1.C:16
TObject::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TObject.cxx:666
TGeoScaledShape::ComputeNormal
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)
Compute normal to closest surface from POINT.
Definition: TGeoScaledShape.cxx:112
TObject::TestBit
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
TBuffer3D::SectionsValid
Bool_t SectionsValid(UInt_t mask) const
Definition: TBuffer3D.h:67
TNamed::SetName
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGeoShape::DistFromOutside
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 =0
TGeoShape::GetNmeshVertices
virtual Int_t GetNmeshVertices() const
Definition: TGeoShape.h:127
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGeoScaledShape::Safety_v
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.
Definition: TGeoScaledShape.cxx:416
TBuffer3D::SetAABoundingBox
void SetAABoundingBox(const Double_t origin[3], const Double_t halfLengths[3])
Set fBBVertex in kBoundingBox section to a axis aligned (local) BB using supplied origin and box half...
Definition: TBuffer3D.cxx:320
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:890
TGeoScaledShape::TGeoScaledShape
TGeoScaledShape()
Default constructor.
Definition: TGeoScaledShape.cxx:36
TGeoScaledShape::GetShape
TGeoShape * GetShape() const
Definition: TGeoScaledShape.h:54
TGeoScaledShape
A shape scaled by a TGeoScale transformation.
Definition: TGeoScaledShape.h:21
TGeoBBox::fOrigin
Double_t fOrigin[3]
Definition: TGeoBBox.h:24
Float_t
float Float_t
Definition: RtypesCore.h:57
TGeoScaledShape::~TGeoScaledShape
virtual ~TGeoScaledShape()
destructor
Definition: TGeoScaledShape.cxx:70
TGeoShape::TransformPoints
void TransformPoints(Double_t *points, UInt_t NbPoints) const
Tranform a set of points (LocalToMaster)
Definition: TGeoShape.cxx:552
TGeoVolume.h
box
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition: fillpatterns.C:1
TGeoMatrix::Normalize
static void Normalize(Double_t *vect)
Normalize a vector.
Definition: TGeoMatrix.cxx:473
TGeoScaledShape::ComputeBBox
virtual void ComputeBBox()
Compute bounding box of the scaled shape.
Definition: TGeoScaledShape.cxx:88
TGeoScaledShape::DistFromOutside
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 scaled shape.
Definition: TGeoScaledShape.cxx:164
TBuffer3D::NbPnts
UInt_t NbPnts() const
Definition: TBuffer3D.h:80
TGeoScale::MasterToLocal
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
Convert a global point to local frame.
Definition: TGeoMatrix.cxx:1607
TMath::Abs
Short_t Abs(Short_t d)
Definition: TMathBase.h:120
TGeoShape::SetSegsAndPols
virtual void SetSegsAndPols(TBuffer3D &buff) const =0
TGeoScaledShape::SetSegsAndPols
virtual void SetSegsAndPols(TBuffer3D &buffer) const
Fill TBuffer3D structure for segments and polygons.
Definition: TGeoScaledShape.cxx:300
TGeoMatrix::Print
void Print(Option_t *option="") const
print the matrix in 4x4 format
Definition: TGeoMatrix.cxx:486
TGeoScaledShape::GetMakeRuntimeShape
virtual TGeoShape * GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const
in case shape has some negative parameters, these has to be computed in order to fit the mother
Definition: TGeoScaledShape.cxx:220
TString
Basic string class.
Definition: TString.h:136
TGeoMatrix::IsRegistered
Bool_t IsRegistered() const
Definition: TGeoMatrix.h:77
TGeoScaledShape::fShape
TGeoShape * fShape
Definition: TGeoScaledShape.h:24
TGeoShape::ComputeNormal
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)=0
TGeoShape::MakeBuffer3D
virtual TBuffer3D * MakeBuffer3D() const
Definition: TGeoShape.h:143
TGeoShape::InspectShape
virtual void InspectShape() const =0
bool
TGeoScaledShape::SetPoints
virtual void SetPoints(Double_t *points) const
Mesh points for scaled shapes.
Definition: TGeoScaledShape.cxx:342
TGeoShape::SetPoints
virtual void SetPoints(Double_t *points) const =0
TGeoScale::GetScale
virtual const Double_t * GetScale() const
Definition: TGeoMatrix.h:279
TGeoScaledShape::DistFromOutside_v
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...
Definition: TGeoScaledShape.cxx:406
TGeoScaledShape::Capacity
virtual Double_t Capacity() const
Computes capacity of this shape [length^3].
Definition: TGeoScaledShape.cxx:77
TGeoScaledShape::Contains
virtual Bool_t Contains(const Double_t *point) const
Test if point is inside the scaled shape.
Definition: TGeoScaledShape.cxx:127
ROOT::Math::gv_detail::dist
double dist(Rotation3D const &r1, Rotation3D const &r2)
Definition: 3DDistances.cxx:48
TBuffer3D
Generic 3D primitive description class.
Definition: TBuffer3D.h:18
TGeoScaledShape::fScale
TGeoScale * fScale
Definition: TGeoScaledShape.h:25
TGeoShape
Base abstract class for all shapes.
Definition: TGeoShape.h:26
TGeoScaledShape::GetScale
TGeoScale * GetScale() const
Definition: TGeoScaledShape.h:55
TGeoScaledShape::MakeBuffer3D
virtual TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape.
Definition: TGeoScaledShape.cxx:265
TGeoBBox::InspectShape
virtual void InspectShape() const
Prints shape parameters.
Definition: TGeoBBox.cxx:792
TGeoShape::ComputeBBox
virtual void ComputeBBox()=0
TGeoScaledShape::GetBuffer3D
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
Definition: TGeoScaledShape.cxx:196
TGeoBBox::fDY
Double_t fDY
Definition: TGeoBBox.h:22
TGeoMatrix::IsReflection
Bool_t IsReflection() const
Definition: TGeoMatrix.h:69
TBuffer3D.h
TGeoShape::kGeoSavePrimitive
@ kGeoSavePrimitive
Definition: TGeoShape.h:65
TGeoScale::SetScale
void SetScale(Double_t sx, Double_t sy, Double_t sz)
scale setter
Definition: TGeoMatrix.cxx:1541
TGeoScaledShape::DistFromInside_v
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...
Definition: TGeoScaledShape.cxx:398
TGeoScaledShape::IsAssembly
virtual Bool_t IsAssembly() const
Returns true if the scaled shape is an assembly.
Definition: TGeoScaledShape.cxx:248
TBuffer3DTypes.h
TBuffer3D::kRaw
@ kRaw
Definition: TBuffer3D.h:54
TGeoScaledShape::Divide
virtual TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
Cannot divide assemblies.
Definition: TGeoScaledShape.cxx:186
TGeoShape::GetName
virtual const char * GetName() const
Get the shape name.
Definition: TGeoShape.cxx:248
TGeoShape::IsAssembly
virtual Bool_t IsAssembly() const
Definition: TGeoShape.h:129
TGeoScale::LocalToMaster
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
Convert a local point to the master frame.
Definition: TGeoMatrix.cxx:1567
TGeoBBox
Box class.
Definition: TGeoBBox.h:18
TGeoScaledShape::InspectShape
virtual void InspectShape() const
print shape parameters
Definition: TGeoScaledShape.cxx:237
TGeoShape::GetBuffer3D
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Stub implementation to avoid forcing implementation at this stage.
Definition: TGeoShape.cxx:689
TGeoScaledShape::GetMeshNumbers
virtual void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
Definition: TGeoScaledShape.cxx:229
TGeoMatrix.h
TGeoScaledShape::DistFromInside
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 surface of the scaled shape.
Definition: TGeoScaledShape.cxx:146
TGeoShape::Contains
virtual Bool_t Contains(const Double_t *point) const =0
TGeoManager.h
TGeoBBox::fDZ
Double_t fDZ
Definition: TGeoBBox.h:23
TGeoScaledShape::IsReflected
virtual Bool_t IsReflected() const
Check if the scale transformation is a reflection.
Definition: TGeoScaledShape.cxx:256
TGeoScaledShape.h
TGeoShape::GetPointerName
const char * GetPointerName() const
Provide a pointer name containing uid.
Definition: TGeoShape.cxx:699
Double_t
double Double_t
Definition: RtypesCore.h:59
TGeoShape::DistFromInside
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 =0
TGeoMatrix
Geometrical transformation package.
Definition: TGeoMatrix.h:41
TBuffer3D::fLocalFrame
Bool_t fLocalFrame
Definition: TBuffer3D.h:90
TGeoScaledShape::Safety
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.
Definition: TGeoScaledShape.cxx:309
TGeoScale
Class describing scale transformations.
Definition: TGeoMatrix.h:245
TBuffer3D::fBBVertex
Double_t fBBVertex[8][3]
Definition: TBuffer3D.h:107
points
point * points
Definition: X3DBuffer.c:22
TGeoScaledShape::Contains_v
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.
Definition: TGeoScaledShape.cxx:380
TBuffer3D::kRawSizes
@ kRawSizes
Definition: TBuffer3D.h:53
name
char name[80]
Definition: TGX11.cxx:110
TGeoScaledShape::SavePrimitive
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Definition: TGeoScaledShape.cxx:321
TGeoShape::ShapeDistancetoPrimitive
Int_t ShapeDistancetoPrimitive(Int_t numpoints, Int_t px, Int_t py) const
Returns distance to shape primitive mesh.
Definition: TGeoShape.cxx:259
TBuffer3D::fPnts
Double_t * fPnts
Definition: TBuffer3D.h:112
TGeoShape::Capacity
virtual Double_t Capacity() const =0
TGeoMatrix::RegisterYourself
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
Definition: TGeoMatrix.cxx:526
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
TGeoScaledShape::DistancetoPrimitive
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
compute closest distance from point px,py to each vertex. Should not be called.
Definition: TGeoScaledShape.cxx:137
Class
void Class()
Definition: Class.C:29
TGeoScaledShape::MakeScaledShape
static TGeoShape * MakeScaledShape(const char *name, TGeoShape *shape, TGeoScale *scale)
Create a scaled shape starting from a non-scaled one.
Definition: TGeoScaledShape.cxx:275
TGeoScaledShape::ComputeNormal_v
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...
Definition: TGeoScaledShape.cxx:390
TGeoShape::Safety
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const =0
TObject::ClassName
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:130
TGeoVolume
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:49
TGeoBBox::fDX
Double_t fDX
Definition: TGeoBBox.h:21
TGeoNode.h
TMath.h
TGeoShape::GetMeshNumbers
virtual void GetMeshNumbers(Int_t &, Int_t &, Int_t &) const
Definition: TGeoShape.h:125
TGeoScale::MasterToLocalVect
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
Definition: TGeoMatrix.h:272
int