本文整理汇总了C++中Span::getPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ Span::getPoint方法的具体用法?C++ Span::getPoint怎么用?C++ Span::getPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Span
的用法示例。
在下文中一共展示了Span::getPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: adaptive_sampling_run
void AdaptiveWaterline::adaptive_sampling_run() {
minx = surf->bb.minpt.x - 2*cutter->getRadius();
maxx = surf->bb.maxpt.x + 2*cutter->getRadius();
miny = surf->bb.minpt.y - 2*cutter->getRadius();
maxy = surf->bb.maxpt.y + 2*cutter->getRadius();
Line* line = new Line( Point(minx,miny,zh) , Point(maxx,maxy,zh) );
Span* linespan = new LineSpan(*line);
xfibers.clear();
Point xstart_p1 = Point( minx, linespan->getPoint(0.0).y, zh );
Point xstart_p2 = Point( maxx, linespan->getPoint(0.0).y, zh );
Point xstop_p1 = Point( minx, linespan->getPoint(1.0).y, zh );
Point xstop_p2 = Point( maxx, linespan->getPoint(1.0).y, zh );
Fiber xstart_f = Fiber( xstart_p1, xstart_p2 ) ;
Fiber xstop_f = Fiber( xstop_p1, xstop_p2 );
subOp[0]->run(xstart_f);
subOp[0]->run(xstop_f);
xfibers.push_back(xstart_f);
std::cout << " XFiber adaptive sample \n";
xfiber_adaptive_sample( linespan, 0.0, 1.0, xstart_f, xstop_f);
yfibers.clear();
Point ystart_p1 = Point( linespan->getPoint(0.0).x, miny, zh );
Point ystart_p2 = Point( linespan->getPoint(0.0).x, maxy, zh );
Point ystop_p1 = Point( linespan->getPoint(1.0).x, miny, zh );
Point ystop_p2 = Point( linespan->getPoint(1.0).x, maxy, zh );
Fiber ystart_f = Fiber( ystart_p1, ystart_p2 ) ;
Fiber ystop_f = Fiber( ystop_p1, ystop_p2 );
subOp[1]->run(ystart_f);
subOp[1]->run(ystop_f);
yfibers.push_back(ystart_f);
std::cout << " YFiber adaptive sample \n";
yfiber_adaptive_sample( linespan, 0.0, 1.0, ystart_f, ystop_f);
delete line;
delete linespan;
}
示例2: adaptive_sampling_run
void AdaptiveWaterline::adaptive_sampling_run() {
minx = surf->bb.minpt.x - 2*cutter->getRadius();
maxx = surf->bb.maxpt.x + 2*cutter->getRadius();
miny = surf->bb.minpt.y - 2*cutter->getRadius();
maxy = surf->bb.maxpt.y + 2*cutter->getRadius();
Line* line = new Line( Point(minx,miny,zh) , Point(maxx,maxy,zh) );
Span* linespan = new LineSpan(*line);
#ifdef _WIN32 // OpenMP task not supported with the version 2 of VS2013 OpenMP
#pragma omp parallel sections
{
#pragma omp section // Replace OMP Task by Parallel sections
{ // first child
#else
#pragma omp parallel
{
#pragma omp single nowait
{ // initial root task
#pragma omp task
{ // first child task
#endif // _WIN32
xfibers.clear();
Point xstart_p1 = Point(minx, linespan->getPoint(0.0).y, zh);
Point xstart_p2 = Point(maxx, linespan->getPoint(0.0).y, zh);
Point xstop_p1 = Point(minx, linespan->getPoint(1.0).y, zh);
Point xstop_p2 = Point(maxx, linespan->getPoint(1.0).y, zh);
Fiber xstart_f = Fiber(xstart_p1, xstart_p2);
Fiber xstop_f = Fiber(xstop_p1, xstop_p2);
subOp[0]->run(xstart_f);
subOp[0]->run(xstop_f);
xfibers.push_back(xstart_f);
std::cout << " XFiber adaptive sample \n";
xfiber_adaptive_sample(linespan, 0.0, 1.0, xstart_f, xstop_f);
#ifdef _WIN32 // OpenMP task not supported with the version 2 of VS2013 OpenMP
}
#pragma omp section
{ // second child
#else
}
# pragma omp task
{ // second child task
#endif // _WIN32
yfibers.clear();
Point ystart_p1 = Point(linespan->getPoint(0.0).x, miny, zh);
Point ystart_p2 = Point(linespan->getPoint(0.0).x, maxy, zh);
Point ystop_p1 = Point(linespan->getPoint(1.0).x, miny, zh);
Point ystop_p2 = Point(linespan->getPoint(1.0).x, maxy, zh);
Fiber ystart_f = Fiber(ystart_p1, ystart_p2);
Fiber ystop_f = Fiber(ystop_p1, ystop_p2);
subOp[1]->run(ystart_f);
subOp[1]->run(ystop_f);
yfibers.push_back(ystart_f);
std::cout << " YFiber adaptive sample \n";
yfiber_adaptive_sample(linespan, 0.0, 1.0, ystart_f, ystop_f);
#ifdef _WIN32 // OpenMP task not supported with the version 2 of VS2013 OpenMP
}
} // end omp parallel
#else
}
}
} // end omp parallel
#endif // _WIN32
delete line;
delete linespan;
}