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 #include "boost/intrusive_ptr.hpp"
19 
20 class Cone : public virtual Surface {
21 public:
24 
25 
30  const RotationType& rot,
31  const PositionType& vert,
33  return ConePointer(new Cone(pos, rot, vert, angle));
34  }
35 
36 
37  // -- DEPRECATED CONSTRUCTOR
38 
42  Cone( const PositionType& pos, const RotationType& rot,
43  const PositionType& vert, Geom::Theta<Scalar> angle) :
44  Surface( pos, rot), theVertex(vert), theAngle(angle) {}
45 
46 
47  // -- Extension of Surface interface for cone
48 
50  GlobalPoint vertex() const {return theVertex;}
51 
54 
55 
56  // -- Implementation of Surface interface
57 
58  virtual Side side( const LocalPoint& p, Scalar tolerance) const {return side( toGlobal(p), tolerance);}
59  virtual Side side( const GlobalPoint& p, Scalar tolerance) const;
60 
61  // Tangent plane to surface from global point
63  // Tangent plane to surface from local point
65 
66 protected:
67  // Private constructor - use build() instead
68  Cone(const PositionType& pos, const RotationType& rot,
70  MediumProperties* mp) :
71  Surface(pos, rot, mp), theVertex(vert), theAngle(angle) {}
72 
73 private:
74 
77 
78 };
79 
80 #endif
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
Definition: Cone.h:20
Cone(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle)
Definition: Cone.h:42
GlobalPoint theVertex
Definition: Cone.h:75
virtual ReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const
Definition: Cone.cc:8
Geom::Theta< Scalar > theAngle
Definition: Cone.h:76
GlobalPoint vertex() const
Global position of the cone vertex.
Definition: Cone.h:50
SurfaceOrientation::Side Side
Definition: Surface.h:36
ReferenceCountingPointer< Cone > ConstConePointer
Definition: Cone.h:23
Cone(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle, MediumProperties *mp)
Definition: Cone.h:68
static ConePointer build(const PositionType &pos, const RotationType &rot, const PositionType &vert, Geom::Theta< Scalar > angle)
Definition: Cone.h:29
virtual Side side(const LocalPoint &p, Scalar tolerance) const
Definition: Cone.h:58
ReferenceCountingPointer< Cone > ConePointer
Definition: Cone.h:22
Geom::Theta< float > openingAngle() const
Angle of the cone.
Definition: Cone.h:53
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11