#ifndef TUBULARSHELL_HH #define TUBULARSHELL_HH //============================================================================ // // Class : TubularShell // Created : 19-DEC-1997 by Stephen Kahn // Purpose : TUBE type GeometryElement // //============================================================================ #include #include #include namespace dgs { class CylindricalCoordinate; /// A tubular shell. class TubularShell : public GeometryElement { private: /// Zhalf. double _zhalf; /// Inner radius double _inner_radius; /// Outer radius double _outer_radius; /// Convert local point to global one SpacePoint local_to_global(const CartesianCoordinate&) const; /// Convert global point to local one CartesianCoordinate global_to_local(const SpacePoint&) const; /// Support for positioning children. CartesianCoordinate xform_to_local( const GeometryXform&) const; /// Support for positioning children. GeometryXform local_to_xform(const CartesianCoordinate&) const; /// Tubular shell center CartesianCoordinate _TubeCenter; /// RCS version std::string _cvers; // Replaced at checkout public : /// Default constructor TubularShell(): _cvers("$Revision: 1.7 $") {} /// Construct tubular shell of specified size TubularShell( double dz, double ri, double ro) : _zhalf(dz), _inner_radius(ri), _outer_radius(ro), _cvers("$Revision: 1.7 $") {} /// Fill tubular shell void fill_TubularShell( double dz, double ri, double ro) ; /// Get zhalf double get_zhalf() { return _zhalf; } /// Get inner radius double get_inner_radius() { return _inner_radius; } /// Get outer radius double get_outer_radius() { return _outer_radius; } /// Set center of tubular shell to specified x,y,z point void set_center_xyz( double, double, double); void set_center_xyz(); /// Position child surface at specified local point bool position_child_at(const CartesianCoordinate&, GeometryElement& ); bool position_child_at(const GeometryXform&, GeometryElement&); /// Set xform void set_Xform( double, double, double); /// Get center of tubular shell CartesianCoordinate get_center() { return _TubeCenter; } /// Get source code version. Kept to allow following code changes const std::string& code_version() const { return _cvers; } D0_OBJECT_SETUP(TubularShell); // persistent class }; } #endif // TUBULARSHELL_HH