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 
18 
19 class Cone GCC11_FINAL : public Surface {
20 public:
21 
22  template<typename... Args>
23  Cone(const PositionType& vert,
25  Args&& ... args) :
26  Surface(std::forward<Args>(args)...),
27  theVertex(vert), theAngle(angle) {}
28 
31 
32 
37  const RotationType& rot,
38  const PositionType& vert,
40  return ConePointer(new Cone(vert, angle, pos, rot));
41  }
42 
43 
44  // -- DEPRECATED CONSTRUCTOR
45 
49  Cone( const PositionType& pos, const RotationType& rot,
50  const PositionType& vert, Geom::Theta<Scalar> angle) :
51  Surface( pos, rot), theVertex(vert), theAngle(angle) {}
52 
53 
54  // -- Extension of Surface interface for cone
55 
57  GlobalPoint vertex() const {return theVertex;}
58 
60  Geom::Theta<float> openingAngle() const {return theAngle;}
61 
62 
63  // -- Implementation of Surface interface
64 
65  virtual Side side( const LocalPoint& p, Scalar tolerance) const {return side( toGlobal(p), tolerance);}
66  virtual Side side( const GlobalPoint& p, Scalar tolerance) const;
67 
68  // Tangent plane to surface from global point
69  virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const GlobalPoint&) const;
70  // Tangent plane to surface from local point
71  virtual ReferenceCountingPointer<TangentPlane> tangentPlane (const LocalPoint&) const;
72 
73 
74 private:
75 
78 
79 };
80 
81 #endif
ReferenceCountingPointer< Cone > ConePointer
Definition: Cone.h:29
Geom::Theta< float > openingAngle() const
Angle of the cone.
Definition: Cone.h:60
Geom::Theta< Scalar > theAngle
Definition: Cone.h:77
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:76
Cone(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle)
Definition: Cone.h:49
ReferenceCountingPointer< Cone > ConstConePointer
Definition: Cone.h:30
static ConePointer build(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle)
Definition: Cone.h:36
virtual Side side(const LocalPoint &p, Scalar tolerance) const
Definition: Cone.h:65
GlobalPoint vertex() const
Global position of the cone vertex.
Definition: Cone.h:57
Cone(const PositionType &vert, Geom::Theta< Scalar > angle, Args &&...args)
Definition: Cone.h:23
dictionary args
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
Unlimited (trivial) bounds.