CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions
Plane Class Reference

#include <Plane.h>

Inheritance diagram for Plane:
Surface GloballyPositioned< float > BasicReferenceCounted BoundaryPlane BoundPlane TangentPlane BoundDisk BoundDiskSector

Public Types

typedef
ConstReferenceCountingPointer
< Plane
ConstPlanePointer
 
typedef
ReferenceCountingPointer
< Plane
PlanePointer
 
- Public Types inherited from Surface
typedef GloballyPositioned< float > Base
 
typedef SurfaceOrientation::Side Side
 
- Public Types inherited from GloballyPositioned< float >
typedef Point3DBase< float,
GlobalTag
GlobalPoint
 
typedef Vector3DBase< float,
GlobalTag
GlobalVector
 
typedef Point3DBase< float,
LocalTag
LocalPoint
 
typedef Vector3DBase< float,
LocalTag
LocalVector
 
typedef Point3DBase< float,
GlobalTag
PositionType
 
typedef TkRotation< float > RotationType
 
typedef float Scalar
 

Public Member Functions

float localZ (const GlobalPoint &gp) const
 Fast access to distance from plane for a point. More...
 
float localZ (const GlobalVector &gv) const
 Fast access to component perpendicular to plane for a vector. More...
 
GlobalVector normalVector () const
 
 Plane (const PositionType &pos, const RotationType &rot)
 
 Plane (const PositionType &pos, const RotationType &rot, MediumProperties *mp)
 
virtual SurfaceOrientation::Side side (const LocalPoint &p, Scalar toler) const
 
virtual SurfaceOrientation::Side side (const GlobalPoint &p, Scalar toler) const
 
virtual
ReferenceCountingPointer
< TangentPlane
tangentPlane (const GlobalPoint &) const
 tangent plane to surface from global point More...
 
virtual
ReferenceCountingPointer
< TangentPlane
tangentPlane (const LocalPoint &) const
 tangent plane to surface from local point More...
 
- Public Member Functions inherited from Surface
const MediumPropertiesmediumProperties () const
 
void setMediumProperties (const MediumProperties &mp)
 
void setMediumProperties (MediumProperties *mp)
 
 Surface (const PositionType &pos, const RotationType &rot)
 
 Surface (const PositionType &pos, const RotationType &rot, MediumProperties *mp)
 
 Surface (const PositionType &pos, const RotationType &rot, MediumProperties mp)
 
 Surface (const Surface &iSurface)
 
GlobalPoint toGlobal (const Point2DBase< Scalar, LocalTag > lp) const
 
virtual ~Surface ()=0
 
- Public Member Functions inherited from GloballyPositioned< float >
float eta () const
 
 GloballyPositioned (const PositionType &pos, const RotationType &rot)
 
void move (const GlobalVector &displacement)
 
float phi () const
 
const PositionTypeposition () const
 
void rotate (const RotationType &rotation)
 
const RotationTyperotation () const
 
GlobalPoint toGlobal (const LocalPoint &lp) const
 
Point3DBase< U, GlobalTagtoGlobal (const Point3DBase< U, LocalTag > &lp) const
 
GlobalVector toGlobal (const LocalVector &lv) const
 
Vector3DBase< U, GlobalTagtoGlobal (const Vector3DBase< U, LocalTag > &lv) const
 
LocalPoint toLocal (const GlobalPoint &gp) const
 
Point3DBase< U, LocalTagtoLocal (const Point3DBase< U, GlobalTag > &gp) const
 
LocalVector toLocal (const GlobalVector &gv) const
 
Vector3DBase< U, LocalTagtoLocal (const Vector3DBase< U, GlobalTag > &gv) const
 
virtual ~GloballyPositioned ()
 
- Public Member Functions inherited from BasicReferenceCounted
void addReference () const
 
 BasicReferenceCounted ()
 
 BasicReferenceCounted (const BasicReferenceCounted &iRHS)
 
const BasicReferenceCountedoperator= (const BasicReferenceCounted &)
 
unsigned int references () const
 
void removeReference () const
 
virtual ~BasicReferenceCounted ()
 

Static Public Member Functions

static PlanePointer build (const PositionType &pos, const RotationType &rot, MediumProperties *mp=0)
 
- Static Public Member Functions inherited from GloballyPositioned< float >
static float iniEta ()
 
static float iniPhi ()
 

Detailed Description

A plane in 3D space.

Warning
Surfaces are reference counted, so only ReferenceCountingPointer should be used to point to them. For this reason, they should be using the static build() method. (The normal constructor will become private in the future).

Definition at line 17 of file Plane.h.

Member Typedef Documentation

Definition at line 20 of file Plane.h.

Definition at line 19 of file Plane.h.

Constructor & Destructor Documentation

Plane::Plane ( const PositionType pos,
const RotationType rot 
)
inline

Do not use this constructor directly; use the static build method, which returns a ReferenceCountingPointer. This constructor will soon become private

Definition at line 36 of file Plane.h.

Referenced by build().

36  :
37  Surface( pos, rot) {}
Surface(const PositionType &pos, const RotationType &rot)
Definition: Surface.h:40
Plane::Plane ( const PositionType pos,
const RotationType rot,
MediumProperties mp 
)
inline

Do not use this constructor directly; use the static build method, which returns a ReferenceCountingPointer. This constructor will soon become private

Definition at line 42 of file Plane.h.

42  :
43  Surface( pos, rot, mp) {}
Surface(const PositionType &pos, const RotationType &rot)
Definition: Surface.h:40

Member Function Documentation

static PlanePointer Plane::build ( const PositionType pos,
const RotationType rot,
MediumProperties mp = 0 
)
inlinestatic
float Plane::localZ ( const GlobalPoint gp) const
inline
float Plane::localZ ( const GlobalVector gv) const
inline

Fast access to component perpendicular to plane for a vector.

Definition at line 57 of file Plane.h.

References Vector3DBase< T, FrameTag >::dot(), and normalVector().

57  {
58  return normalVector().dot(gv);
59  }
GlobalVector normalVector() const
Definition: Plane.h:47
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:107
GlobalVector Plane::normalVector ( ) const
inline
virtual SurfaceOrientation::Side Plane::side ( const LocalPoint p,
Scalar  tolerance 
) const
inlinevirtual

Returns the side of the surface on which the point is. Not defined for 1-sided surfaces (Moebius leaf etc.) For normal 2-sided surfaces the meaning of side is surface type dependent.

Implements Surface.

Definition at line 63 of file Plane.h.

References abs, SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, SurfaceOrientation::positiveSide, and PV3DBase< T, PVType, FrameType >::z().

Referenced by NavVolume6Faces::computeBounds(), and NavPropagator::destinationCrossed().

virtual SurfaceOrientation::Side Plane::side ( const GlobalPoint p,
Scalar  toler 
) const
inlinevirtual

Reimplemented from Surface.

Definition at line 68 of file Plane.h.

References abs, localZ(), SurfaceOrientation::negativeSide, SurfaceOrientation::onSurface, and SurfaceOrientation::positiveSide.

68  {
69  Scalar lz = localZ(p);
70  return (std::abs(lz)<toler ? SurfaceOrientation::onSurface :
72  }
float localZ(const GlobalPoint &gp) const
Fast access to distance from plane for a point.
Definition: Plane.h:52
#define abs(x)
Definition: mlp_lapack.h:159
ReferenceCountingPointer< TangentPlane > Plane::tangentPlane ( const GlobalPoint ) const
virtual

tangent plane to surface from global point

Implements Surface.

Definition at line 9 of file Plane.cc.

References GloballyPositioned< float >::position(), and GloballyPositioned< float >::rotation().

10 {
12  rotation(),
13  this));
14 }
const RotationType & rotation() const
const PositionType & position() const
ReferenceCountingPointer< TangentPlane > Plane::tangentPlane ( const LocalPoint ) const
virtual

tangent plane to surface from local point

Implements Surface.

Definition at line 17 of file Plane.cc.

References GloballyPositioned< float >::position(), and GloballyPositioned< float >::rotation().

18 {
20  rotation(),
21  this));
22 }
const RotationType & rotation() const
const PositionType & position() const