CMS 3D CMS Logo

Cone.h
Go to the documentation of this file.
1 #ifndef Geom_Cone_H
2 #define Geom_Cone_H
3 
16 
17 class Cone 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 
59 
60 
61  // -- Implementation of Surface interface
62 
63  Side side( const LocalPoint& p, Scalar tolerance) const override {return side( toGlobal(p), tolerance);}
64  Side side( const GlobalPoint& p, Scalar tolerance) const override;
65 
66  // Tangent plane to surface from global point
68  // Tangent plane to surface from local point
70 
71 
72 private:
73 
76 
77 };
78 
79 #endif
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
Definition: Cone.h:17
Side side(const LocalPoint &p, Scalar tolerance) const override
Definition: Cone.h:63
Cone(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle)
Definition: Cone.h:47
GlobalPoint theVertex
Definition: Cone.h:74
const double tolerance
Geom::Theta< Scalar > theAngle
Definition: Cone.h:75
GlobalPoint vertex() const
Global position of the cone vertex.
Definition: Cone.h:55
ReferenceCountingPointer< Cone > ConstConePointer
Definition: Cone.h:28
ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const override
Definition: Cone.cc:8
static ConePointer build(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle)
Definition: Cone.h:34
ReferenceCountingPointer< Cone > ConePointer
Definition: Cone.h:27
Cone(const PositionType &vert, Geom::Theta< Scalar > angle, Args &&...args)
Definition: Cone.h:21
Geom::Theta< float > openingAngle() const
Angle of the cone.
Definition: Cone.h:58
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11