33#include "DGtal/base/Common.h"
34#include "DGtal/helpers/StdDefs.h"
37#include "DGtal/shapes/EuclideanShapesDecorator.h"
40#include "DGtal/shapes/implicit/ImplicitBall.h"
52 unsigned int nbok = 0;
65 CSG s_union ( shapeA );
66 s_union.plus( shapeB );
68 CSG s_intersec ( shapeA );
69 s_intersec.plus( shapeB );
70 s_intersec.intersection( shapeC );
72 CSG s_minus ( shapeA );
73 s_minus.minus( shapeC );
77 || ( s_union.orientation(
RealPoint( -5.1, 0.0 )) ==
ON ))? 0 : 1;
79 || ( s_union.orientation(
RealPoint( 0.0, 0.0 )) ==
ON ))? 1 : 0;
81 || ( s_union.orientation(
RealPoint( 4.6, 0.0 )) ==
ON ))? 0 : 1;
83 || ( s_union.orientation(
RealPoint( 4.5, 0.0 )) ==
ON ))? 1 : 0;
85 || ( s_union.orientation(
RealPoint( -5.0, 0.0 )) ==
ON ))? 1 : 0;
89 || ( s_intersec.orientation(
RealPoint( -2.6, 0.0 )) ==
ON ))? 0 : 1;
91 || ( s_intersec.orientation(
RealPoint( 2.5, 0.0 )) ==
ON ))? 1 : 0;
93 || ( s_intersec.orientation(
RealPoint( 2.6, 0.0 )) ==
ON ))? 0 : 1;
95 || ( s_intersec.orientation(
RealPoint( 0.0, 2.5 )) ==
ON ))? 0 : 1;
99 || ( s_minus.orientation(
RealPoint( -5.0, 0.0 )) ==
ON ))? 1 : 0;
101 || ( s_minus.orientation(
RealPoint( -1.0, 0.0 )) ==
ON ))? 0 : 1;
103 || ( s_minus.orientation(
RealPoint( 0.0, 2.0 )) ==
ON ))? 0 : 1;
105 || ( s_minus.orientation(
RealPoint( -2.6, 0.0 )) ==
ON ))? 1 : 0;
111 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
112 <<
"true == true" << std::endl;
120int main(
int argc,
char** argv )
124 for (
int i = 0; i < argc; ++i )
129 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << std::endl;
Aim: Constructive Solid Geometry (CSG) between models of CEuclideanBoundedShape and CEuclideanOriente...
Aim: model of CEuclideanOrientedShape and CEuclideanBoundedShape concepts to create a ball in nD....
Aim: Implements basic operations that will be used in Point and Vector classes.
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
bool testEuclideanShapesDecorator()