NullGeometry.h 2.18 KB
Newer Older
gsell's avatar
gsell committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#ifndef CLASSIC_NullGeometry_HH
#define CLASSIC_NullGeometry_HH

// ------------------------------------------------------------------------
// $RCSfile: NullGeometry.h,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Class: NullGeometry
//
// ------------------------------------------------------------------------
// Class category: BeamlineGeometry
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:32:34 $
// $Author: fci $
//
// ------------------------------------------------------------------------

#include "BeamlineGeometry/Geometry.h"

class Euclid3D;


// Class NullGeometry
// ------------------------------------------------------------------------
/// Geometry representing an identity transform.

32
class NullGeometry: public BGeometryBase {
gsell's avatar
gsell committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
public:

    NullGeometry();
    NullGeometry(const NullGeometry &);
    virtual ~NullGeometry();
    const NullGeometry &operator=(const NullGeometry &);

    /// Get arc length.
    //  Always zero for this class.
    virtual double getArcLength() const;

    /// Get design length.
    //  Always zero for this class.
    virtual double getElementLength() const;

    /// Get origin position.
    //  Always zero for this class.
    virtual double getOrigin() const;

    /// Get transform.
    //  transform from [b]fromS[/b] to [b]toS[/b] is always an identity
    //  for this class.
    virtual Euclid3D getTransform(double fromS, double toS) const;

    /// Get transform.
    //  Equivalent to getTransform(0.0, s).
    //  Return the transform of the local coordinate system from the
    //  origin and [b]s[/b].
    virtual Euclid3D getTransform(double s) const;
};


// inlined (trivial) member functions
inline NullGeometry::NullGeometry()
{}

69
inline NullGeometry::NullGeometry(const NullGeometry & o) : BGeometryBase(o)
gsell's avatar
gsell committed
70 71 72 73 74 75 76 77
{}

inline const NullGeometry &
NullGeometry::operator=(const NullGeometry &) {
    return *this;
}

#endif // CLASSIC_NullGeometry_HH