42 template <
typename TSpace,
typename TInternalInteger>
49 template <
typename TSpace,
typename TInternalInteger>
54 _axesToErase.reserve( 3 );
57 template <
typename TSpace,
typename TInternalInteger>
61 : myAxes( other.myAxes )
69 template <
typename TSpace,
typename TInternalInteger>
85 template <
typename TSpace,
typename TInternalInteger>
91 ASSERT( myAxes.size() > 0 );
95 template <
typename TSpace,
typename TInternalInteger>
101 return myComputers[ active() ].
ic();
104 template <
typename TSpace,
typename TInternalInteger>
111 for (
unsigned int i = 0; i < 3; ++i )
113 myAxes.push_back( i );
114 myComputers[ i ].clear();
118 template <
typename TSpace,
typename TInternalInteger>
127 for (
unsigned int i = 0; i < 3; ++i )
128 myComputers[ i ].init( i, diameter, widthNumerator, widthDenominator );
131 template <
typename TSpace,
typename TInternalInteger>
137 return myComputers[ active() ].
size();
140 template <
typename TSpace,
typename TInternalInteger>
146 return myComputers[ active() ].
empty();
149 template <
typename TSpace,
typename TInternalInteger>
155 return myComputers[ active() ].
max_size();
158 template <
typename TSpace,
typename TInternalInteger>
167 template <
typename TSpace,
typename TInternalInteger>
176 template <
typename TSpace,
typename TInternalInteger>
182 return myComputers[ active() ].operator()( p );
186 template <
typename TSpace,
typename TInternalInteger>
193 unsigned int nbok = 0;
197 nbok += myComputers[ *it ].operator()( p ) ? 1 : 0;
201 for (
AxisIterator it = myAxes.begin(); it != myAxes.end(); )
205 bool ok = myComputers[ *it ].extendAsIs( p );
207 it = myAxes.erase( *it );
211 ASSERT( ! myAxes.empty() );
218 template <
typename TSpace,
typename TInternalInteger>
224 unsigned int nbok = 0;
225 _axesToErase.clear();
227 axIt != axItE; ++axIt )
229 bool ok = myComputers[ *axIt ].extend( p );
230 if ( ! ok ) _axesToErase.push_back( *axIt );
237 for (
unsigned int i = 0; i < _axesToErase.size(); ++i )
239 while ( *axIt != _axesToErase[ i ] ) ++axIt;
240 axIt = myAxes.erase( axIt );
247 template <
typename TSpace,
typename TInternalInteger>
253 unsigned int nbok = 0;
257 nbok += myComputers[ *it ].isExtendable( p ) ? 1 : 0;
262 template <
typename TSpace,
typename TInternalInteger>
263 template <
typename TInputIterator>
266 extend( TInputIterator it, TInputIterator itE )
268 BOOST_CONCEPT_ASSERT(( boost::InputIterator<TInputIterator> ));
271 unsigned int nbok = 0;
272 _axesToErase.clear();
274 axIt != axItE; ++axIt )
276 bool ok = myComputers[ *axIt ].extend( it, itE );
277 if ( ! ok ) _axesToErase.push_back( *axIt );
284 for (
unsigned int i = 0; i < _axesToErase.size(); ++i )
286 while ( *axIt != _axesToErase[ i ] ) ++axIt;
287 axIt = myAxes.erase( axIt );
294 template <
typename TSpace,
typename TInternalInteger>
295 template <
typename TInputIterator>
300 BOOST_CONCEPT_ASSERT(( boost::InputIterator<TInputIterator> ));
303 unsigned int nbok = 0;
305 axIt != axItE; ++axIt )
307 nbok += myComputers[ *axIt ].isExtendable( it, itE ) ? 1 : 0;
314 template <
typename TSpace,
typename TInternalInteger>
315 template <
typename Vector3D>
321 myComputers[ active() ].
getNormal( normal );
325 template <
typename TSpace,
typename TInternalInteger>
326 template <
typename Vector3D>
335 template <
typename TSpace,
typename TInternalInteger>
341 myComputers[ active() ].
getBounds( min, max );
344 template <
typename TSpace,
typename TInternalInteger>
353 template <
typename TSpace,
typename TInternalInteger>
371 template <
typename TSpace,
typename TInternalInteger>
378 out <<
"[COBAGenericNaivePlane";
380 axIt != axItE; ++axIt )
381 out <<
" " << myComputers[ *axIt ];
389 template <
typename TSpace,
typename TInternalInteger>
394 return myComputers[ active() ].
isValid();
405 template <
typename TSpace,
typename TInternalInteger>
411 object.selfDisplay( out );