// // $Id: SiWedgeHolder.cpp,v 1.5 2001/02/03 22:53:36 hobbs Exp $ // // File: SiWedgeHolder.cpp // Purpose: // Created: 23-JAN-1998 Tom Trippe // // $Revision: 1.5 $ // // // Include files #include "SiWedgeHolder.hpp" #include // Global definitions using namespace std; using namespace dgs; bool operator<(const SiWedgeHolder& lhs, const SiWedgeHolder&rhs) { return lhs.get_position()[2] < rhs.get_position()[2]; } // Constructors/Destructors SiWedgeHolder::SiWedgeHolder() {} SiWedgeHolder::SiWedgeHolder(int nwedges, const SiWedge* prototype/*NULL*/, float separation) { const SiWedge* use_this; // If no SiWedge is passed, just fill the vector with empties... if( prototype ) use_this = prototype; else use_this = new SiWedge; // Position the wedges. Typical calls are with one wedge and zero separation // or two wedges with spaced by separation. for( int i=0 ; i &wedges, float separation): _wedges(wedges) { // Position the wedges. Typical calls are with one wedge and zero separation // or two wedges spaced by separation. for( int i=0 ; i SiWedgeHolder::get_children() { list kids; for( int i=0 ; i<_wedges.size() ; i++ ) kids.push_back( &_wedges[i] ); return kids; } std::ostream& operator <<(std::ostream& os, const SiWedgeHolder& me ) { os << "SiWedgeHolder at " << me.get_position() << " has " << me._wedges.size() << " wedges. " << endl; for( int i=0 ; i