diff --git a/Framework/Geometry/inc/MantidGeometry/Objects/Track.h b/Framework/Geometry/inc/MantidGeometry/Objects/Track.h index 7c37087e3a84529f3a51b229fabbf42e8d4304ad..9ef4b51d811dfdf34f411ceb7199119899829cba 100644 --- a/Framework/Geometry/inc/MantidGeometry/Objects/Track.h +++ b/Framework/Geometry/inc/MantidGeometry/Objects/Track.h @@ -167,9 +167,9 @@ public: /// Clear the current set of intersection results void clearIntersectionResults(); /// Returns the starting point - const Kernel::V3D startPoint() const { return m_line.getOrigin(); } + const Kernel::V3D &startPoint() const { return m_line.getOrigin(); } /// Returns the direction as a unit vector - const Kernel::V3D direction() const { return m_line.getDirect(); } + const Kernel::V3D &direction() const { return m_line.getDirect(); } /// Returns an interator to the start of the set of links LType::iterator begin() { return m_links.begin(); } /// Returns an interator to one-past-the-end of the set of links diff --git a/Framework/Geometry/inc/MantidGeometry/Surfaces/Line.h b/Framework/Geometry/inc/MantidGeometry/Surfaces/Line.h index 12d6ac953ac7af01b66f37aff19483001b30ffb6..f033a1db4bb0b4311cae1e0553802806503f1763 100644 --- a/Framework/Geometry/inc/MantidGeometry/Surfaces/Line.h +++ b/Framework/Geometry/inc/MantidGeometry/Surfaces/Line.h @@ -57,10 +57,14 @@ public: Line *clone() const; Kernel::V3D getPoint(const double lambda) const; ///< gets the point O+lam*N - Kernel::V3D getOrigin() const { return Origin; } ///< returns the origin - Kernel::V3D getDirect() const { return Direct; } ///< returns the direction - double distance(const Kernel::V3D &) const; ///< distance from line - int isValid(const Kernel::V3D &) const; ///< Is the point on the line + const Kernel::V3D &getOrigin() const { + return Origin; + } ///< returns the origin + const Kernel::V3D &getDirect() const { + return Direct; + } ///< returns the direction + double distance(const Kernel::V3D &) const; ///< distance from line + int isValid(const Kernel::V3D &) const; ///< Is the point on the line void print() const; void rotate(const Kernel::Matrix<double> &);