#ifndef REFERENCEPOINT_HH #define REFERENCEPOINT_HH // // $Id: ReferencePoint.hpp,v 1.6 1998/10/23 14:32:53 hobbs Exp $ // // File: ReferencePoint.hh // Purpose: Define a geometry support element which is an arbirary reference // point. // Created: 08-OCT-1997 John Hobbs // // $Revision: 1.6 $ // // // Include files #include namespace dgs { class CartesianCoordinate; /** Define a geometry support element which is an arbirary reference point. Defines an arbitrary reference point, using Cartesian Coordinates. */ class ReferencePoint: public GeometryElement { public: /// Default constructor. ReferencePoint(): _cvers("$Revision: 1.6 $") {} /// The interface required by GeometryElement from which this is inherited. SpacePoint local_to_global(const CartesianCoordinate& lpt) const; /// The interface required by GeometryElement from which this is inherited. CartesianCoordinate global_to_local(const SpacePoint& gpt) const; /// Can't resize a reference point, but can attach kids. bool position_child_at(const CartesianCoordinate& lpt, GeometryElement& kid); /// Get source code version. Kept to allow following code changes const std::string& code_version() const { return _cvers; } /// Stream insertion operator. friend std::ostream& operator<<(std::ostream& os, const ReferencePoint& me); private: /// Help out positioning children. CartesianCoordinate xform_to_local(const GeometryXform& xf) const; /// Help out positioning children. GeometryXform local_to_xform(const CartesianCoordinate& lpt) const; /// RCS version std::string _cvers; // Replaced at checkout public: // Make me persistable. D0_OBJECT_SETUP(ReferencePoint); }; } #endif //REFERENCEPOINT_HH