71 unsigned int nbok = 0;
76 typedef Z3::Point
Point;
77 typedef Point::Coordinate Coordinate;
94 Point p1( -50, -50, -50 );
95 Point p2( 50, 50, 50 );
100 Adj6 adj6(
domain, madj6 );
101 Adj18 adj18(
domain, madj18 );
108 double radius = (double) (r+1);
113 sstr <<
"Creating 3D ball( r < " << radius <<
" ) ...";
119 if ( (*it - c ).norm() < radius )
125 trace.
beginBlock (
"Testing Object instanciation and smart copy ..." );
126 ObjectType ball( dt6_18, ball_set );
127 ObjectType ball2( ball );
129 trace.
info() <<
"ball.size() = " << ball.size()
130 <<
" 4/3*pi*r^3 = " << ( 4.0*M_PI*radius*radius*radius/3.0 )
132 trace.
info() <<
"ball = " << ball << endl;
133 trace.
info() <<
"ball2 = " << ball2 << endl;
137 ObjectType sphere = ball.border();
140 trace.
info() <<
"sphere.size() = " << sphere.size()
141 <<
" 4*pi*r^2 = " << ( 4.0*M_PI*radius*radius )
145 trace.
beginBlock (
"Testing expansion by layers in the ball from center..." );
146 ObjectExpander expander( ball, c );
147 while ( ! expander.finished() )
150 expander.nextLayer();
152 nbok += expander.distance() <= sqrt(3.0)*radius ? 1 : 0;
154 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
155 <<
"expander.distance() = " << expander.distance()
156 <<
" <= " << sqrt(3.0)*radius << std::endl;
159 trace.
beginBlock (
"Testing expansion by layers on the sphere from a point ..." );
160 ObjectExpander expander2( sphere, l );
161 while ( ! expander2.finished() )
164 expander2.nextLayer();
166 nbok += expander2.distance() <= sqrt(2.0)*M_PI*radius ? 1 : 0;
168 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
169 <<
"expander2.distance() = " << expander2.distance()
170 <<
" <= " << sqrt(2.0)*M_PI*radius << std::endl;
Aim: Given a domain and an adjacency, limits the given adjacency to the specified domain for all adja...
Iterator for HyperRectDomain.
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
const ConstIterator & begin() const
const ConstIterator & end() const