CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
NavPlane Class Referencefinal

#include <NavPlane.h>

Inheritance diagram for NavPlane:
NavSurface BasicReferenceCounted

Public Types

typedef ConstReferenceCountingPointer< PlanePlanePointer
 
- Public Types inherited from NavSurface
typedef Surface::GlobalPoint GlobalPoint
 
typedef Surface::GlobalVector GlobalVector
 
typedef Surface::LocalPoint LocalPoint
 
typedef Surface::LocalVector LocalVector
 
typedef std::pair< TrajectoryStateOnSurface, double > TSOSwithPath
 

Public Member Functions

void addVolume (const NavVolume *vol, const Bounds *bounds, SurfaceOrientation::Side side) override
 NavVolumes are supposed to call this method to "register" with the NavSurface. More...
 
const Boundsbounds (const NavVolume *vol) override
 Bounds corresponding to a NavVolume if present. More...
 
std::pair< bool, double > distanceAlongLine (const NavSurface::GlobalPoint &pos, const NavSurface::GlobalVector &dir) const override
 
 NavPlane (PlanePointer plane)
 
const NavVolumenextVolume (const NavSurface::LocalPoint &point, SurfaceOrientation::Side side) const override
 
TrajectoryStateOnSurface propagate (const Propagator &prop, const TrajectoryStateOnSurface &startingState) const override
 hook for double dispatch to avoid propagation to generic surface. More...
 
NavSurface::TSOSwithPath propagateWithPath (const Propagator &prop, const TrajectoryStateOnSurface &startingState) const override
 hook for double dispatch to avoid propagation to generic surface. More...
 
const Surfacesurface () const override
 Access to actual surface. More...
 
- Public Member Functions inherited from NavSurface
GlobalPoint toGlobal (const LocalPoint &p) const
 
GlobalVector toGlobal (const LocalVector &p) const
 
LocalPoint toLocal (const GlobalPoint &p) const
 Forwarding of part of surface interface for convenience. More...
 
LocalVector toLocal (const GlobalVector &p) const
 
 ~NavSurface () override
 
- Public Member Functions inherited from BasicReferenceCounted
void addReference () const
 
 BasicReferenceCounted ()
 
 BasicReferenceCounted (const BasicReferenceCounted &)
 
 BasicReferenceCounted (BasicReferenceCounted &&)=default
 
BasicReferenceCountedoperator= (BasicReferenceCounted &&)=default
 
BasicReferenceCountedoperator= (const BasicReferenceCounted &)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~BasicReferenceCounted ()
 

Private Attributes

LinearSearchNavSurfaceImpl theImpl
 
PlanePointer theSurfaceP
 

Detailed Description

Definition at line 12 of file NavPlane.h.

Member Typedef Documentation

Definition at line 18 of file NavPlane.h.

Constructor & Destructor Documentation

NavPlane::NavPlane ( PlanePointer  plane)
inline

Definition at line 22 of file NavPlane.h.

22 : theSurfaceP(plane) {}
PlanePointer theSurfaceP
Definition: NavPlane.h:52

Member Function Documentation

void NavPlane::addVolume ( const NavVolume vol,
const Bounds bounds,
SurfaceOrientation::Side  side 
)
inlineoverridevirtual

NavVolumes are supposed to call this method to "register" with the NavSurface.

Implements NavSurface.

Definition at line 42 of file NavPlane.h.

References LinearSearchNavSurfaceImpl::addVolume(), dir, distanceAlongLine(), and theImpl.

43  {
44  theImpl.addVolume( vol, bounds, side);
45  }
LinearSearchNavSurfaceImpl theImpl
Definition: NavPlane.h:53
void addVolume(const NavVolume *vol, const Bounds *bounds, SurfaceOrientation::Side side)
const Bounds* NavPlane::bounds ( const NavVolume vol)
inlineoverridevirtual

Bounds corresponding to a NavVolume if present.

Implements NavSurface.

Definition at line 40 of file NavPlane.h.

References LinearSearchNavSurfaceImpl::bounds(), and theImpl.

40 { return theImpl.bounds(vol);}
LinearSearchNavSurfaceImpl theImpl
Definition: NavPlane.h:53
const Bounds * bounds(const NavVolume *vol)
std::pair< bool, double > NavPlane::distanceAlongLine ( const NavSurface::GlobalPoint pos,
const NavSurface::GlobalVector dir 
) const
overridevirtual

Distance to surface from point pos along line dir. If the half-line does not cross the surface the returned value is (false,undefined), otherwise the returned value is (true,distance)

Implements NavSurface.

Definition at line 22 of file NavPlane.cc.

References PV3DBase< T, PVType, FrameType >::basicVector(), StraightLinePlaneCrossing::pathLength(), and theSurfaceP.

Referenced by addVolume().

24 {
26  return pc.pathLength(*theSurfaceP);
27 }
std::pair< bool, double > pathLength(const Plane &plane) const
PlanePointer theSurfaceP
Definition: NavPlane.h:52
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
const NavVolume* NavPlane::nextVolume ( const NavSurface::LocalPoint point,
SurfaceOrientation::Side  side 
) const
inlineoverridevirtual

Implements NavSurface.

Definition at line 28 of file NavPlane.h.

References LinearSearchNavSurfaceImpl::nextVolume(), propagate(), propagateWithPath(), and theImpl.

29  {
30  return theImpl.nextVolume( point,side);
31 
32  }
LinearSearchNavSurfaceImpl theImpl
Definition: NavPlane.h:53
const NavVolume * nextVolume(const NavSurface::LocalPoint &point, SurfaceOrientation::Side side) const
TrajectoryStateOnSurface NavPlane::propagate ( const Propagator prop,
const TrajectoryStateOnSurface startingState 
) const
overridevirtual

hook for double dispatch to avoid propagation to generic surface.

Implements NavSurface.

Definition at line 8 of file NavPlane.cc.

References Propagator::propagate(), and theSurfaceP.

Referenced by nextVolume().

10 {
11  return prop.propagate( startingState, *theSurfaceP);
12 }
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
PlanePointer theSurfaceP
Definition: NavPlane.h:52
std::pair< TrajectoryStateOnSurface, double > NavPlane::propagateWithPath ( const Propagator prop,
const TrajectoryStateOnSurface startingState 
) const
overridevirtual

hook for double dispatch to avoid propagation to generic surface.

Implements NavSurface.

Definition at line 15 of file NavPlane.cc.

References Propagator::propagateWithPath(), and theSurfaceP.

Referenced by nextVolume().

17 {
18  return prop.propagateWithPath( startingState, *theSurfaceP);
19 }
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:15
PlanePointer theSurfaceP
Definition: NavPlane.h:52
const Surface& NavPlane::surface ( ) const
inlineoverridevirtual

Access to actual surface.

Implements NavSurface.

Definition at line 26 of file NavPlane.h.

References theSurfaceP.

26 {return *theSurfaceP;}
PlanePointer theSurfaceP
Definition: NavPlane.h:52

Member Data Documentation

LinearSearchNavSurfaceImpl NavPlane::theImpl
private

Definition at line 53 of file NavPlane.h.

Referenced by addVolume(), bounds(), and nextVolume().

PlanePointer NavPlane::theSurfaceP
private

Definition at line 52 of file NavPlane.h.

Referenced by distanceAlongLine(), propagate(), propagateWithPath(), and surface().