CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Cone.h
Go to the documentation of this file.
1 #ifndef Geom_Cone_H
2 #define Geom_Cone_H
3 
16 
17 class Cone GCC11_FINAL : public Surface {
18 public:
19 
20  template<typename... Args>
21  Cone(const PositionType& vert,
23  Args&& ... args) :
24  Surface(std::forward<Args>(args)...),
25  theVertex(vert), theAngle(angle) {}
26 
29 
30 
34  static ConePointer build(const PositionType& pos,
35  const RotationType& rot,
36  const PositionType& vert,
38  return ConePointer(new Cone(vert, angle, pos, rot));
39  }
40 
41 
42  // -- DEPRECATED CONSTRUCTOR
43 
47  Cone( const PositionType& pos, const RotationType& rot,
48  const PositionType& vert, Geom::Theta<Scalar> angle) :
49  Surface( pos, rot), theVertex(vert), theAngle(angle) {}
50 
51 
52  // -- Extension of Surface interface for cone
53 
55  GlobalPoint vertex() const {return theVertex;}
56 
58  Geom::Theta<float> openingAngle() const {return theAngle;}
59 
60 
61  // -- Implementation of Surface interface
62 
63  virtual Side side( const LocalPoint& p, Scalar tolerance) const {return side( toGlobal(p), tolerance);}
64  virtual Side side( const GlobalPoint& p, Scalar tolerance) const;
65 
66  // Tangent plane to surface from global point
67  virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const GlobalPoint&) const;
68  // Tangent plane to surface from local point
69  virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const LocalPoint&) const;
70 
71 
72 private:
73 
76 
77 };
78 
79 #endif
ReferenceCountingPointer< Cone > ConePointer
Definition: Cone.h:27
Geom::Theta< float > openingAngle() const
Angle of the cone.
Definition: Cone.h:58
Geom::Theta< Scalar > theAngle
Definition: Cone.h:75
double Scalar
Definition: Definitions.h:27
GloballyPositioned< float >::GlobalPoint GlobalPoint
Definition: MagVolume.h:20
Base::Scalar Scalar
Point3DBase< Scalar, GlobalTag > PositionType
Definition: Definitions.h:30
GlobalPoint theVertex
Definition: Cone.h:74
Cone(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle)
Definition: Cone.h:47
ReferenceCountingPointer< Cone > ConstConePointer
Definition: Cone.h:28
static ConePointer build(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle)
Definition: Cone.h:34
virtual Side side(const LocalPoint &p, Scalar tolerance) const
Definition: Cone.h:63
GlobalPoint vertex() const
Global position of the cone vertex.
Definition: Cone.h:55
Cone(const PositionType &vert, Geom::Theta< Scalar > angle, Args &&...args)
Definition: Cone.h:21
dictionary args
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
Unlimited (trivial) bounds.