#include "precompiled.h" # include "sr_box.h" # include "sr_polygons.h" //# define SR_USE_TRACE1 // Constructor and Destructor # include "sr_trace.h" //============================= SrPolygons ================================== const char* SrPolygons::class_name = "Polygons"; SrPolygons::SrPolygons () { SR_TRACE1 ( "Default Constructor" ); } SrPolygons::SrPolygons ( const SrPolygons& polys ) { SR_TRACE1 ( "Copy Constructor" ); int i; _data.size ( polys.size() ); for ( i=0; i<_data.size(); i++ ) _data[i] = new SrPolygon ( polys.const_get(i) ); } SrPolygons::~SrPolygons () { SR_TRACE1 ( "Destructor" ); size (0); } void SrPolygons::size ( int ns ) { int i, s = _data.size(); if ( ns>s ) { _data.size(ns); for ( i=s; i=0 ) { if ( vid<0 || dist2> ( SrInput& in, SrPolygons& p ) { p.size(0); in.get_token(); while (true) { in.get_token(); if ( in.last_token()[0]==']' ) break; in.unget_token(); p.push(); in >> p.top(); } return in; } //================================ EOF =================================================