本文整理汇总了C++中Solid::numShells方法的典型用法代码示例。如果您正苦于以下问题:C++ Solid::numShells方法的具体用法?C++ Solid::numShells怎么用?C++ Solid::numShells使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solid
的用法示例。
在下文中一共展示了Solid::numShells方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: visit
void ForceValidityVisitor::visit( Solid& g )
{
g.forceValidityFlag( valid_ );
for ( size_t i = 0; i < g.numShells(); i++ ) {
visit( g.shellN( i ) );
}
}
示例2: triangulatePolygon3D
void triangulatePolygon3D(
const Solid& g,
TriangulatedSurface& triangulatedSurface
)
{
for ( size_t i = 0; i < g.numShells(); i++ ) {
triangulatePolygon3D( g.shellN( i ), triangulatedSurface );
}
}
示例3: distanceSolidSolid3D
double distanceSolidSolid3D( const Solid& gA, const Solid& gB )
{
//SFCGAL_DEBUG( boost::format("dispatch distancePolygonGeometry3D(%s,%s)") % gA.asText() % gB.asText() );
if ( gA.isEmpty() || gB.isEmpty() ) {
return std::numeric_limits< double >::infinity() ;
}
if ( intersects( gA, gB, NoValidityCheck() ) ) {
return 0.0 ;
}
double dMin = std::numeric_limits< double >::infinity() ;
for ( size_t i = 0; i < gA.numShells(); i++ ) {
for ( size_t j = 0; j < gB.numShells(); j++ ) {
dMin = std::min( dMin, gA.shellN( i ).distance3D( gB.shellN( j ) ) );
}
}
return dMin ;
}
示例4: distanceTriangleSolid3D
double distanceTriangleSolid3D( const Triangle& gA, const Solid& gB )
{
if ( gA.isEmpty() || gB.isEmpty() ) {
return std::numeric_limits< double >::infinity() ;
}
if ( intersects3D( gA, gB, NoValidityCheck() ) ) {
return 0.0 ;
}
double dMin = std::numeric_limits< double >::infinity() ;
for ( size_t i = 0; i < gB.numShells(); i++ ) {
dMin = std::min( dMin, gB.shellN( i ).distance3D( gA ) );
}
return dMin ;
}
示例5: distancePointSolid3D
double distancePointSolid3D( const Point& gA, const Solid& gB )
{
if ( gA.isEmpty() || gB.isEmpty() ) {
return std::numeric_limits< double >::infinity() ;
}
if ( intersects3D( gA, gB, NoValidityCheck() ) ) {
return 0.0 ;
}
double dMin = std::numeric_limits< double >::infinity() ;
for ( size_t i = 0; i < gB.numShells(); i++ ) {
dMin = std::min( dMin, distanceGeometryCollectionToGeometry3D( gB.shellN( i ), gA ) );
}
return dMin ;
}
示例6: volume
const Kernel::FT volume( const Solid& solid, NoValidityCheck )
{
Kernel::FT vol = 0;
const CGAL::Point_3<Kernel> origin( 0,0,0 );
const size_t numShells = solid.numShells();
for ( size_t i=0; i<numShells; i++ ) {
std::auto_ptr<Geometry> t( tesselate( solid.shellN( i ), NoValidityCheck() ) );
const TriangulatedSurface& tin = t->as<TriangulatedSurface>();
const size_t numTriangles = tin.numTriangles();
for ( size_t j=0; j<numTriangles; j++ ) {
const Triangle& tri = tin.triangleN( j );
vol = vol + CGAL::volume( origin, tri.vertex( 0 ).toPoint_3(),
tri.vertex( 1 ).toPoint_3(),
tri.vertex( 2 ).toPoint_3() );
}
}
return vol;
}
示例7: visit
void GetPointsVisitor::visit( const Solid& g )
{
for ( size_t i = 0; i < g.numShells(); i++ ) {
visit( g.shellN( i ) );
}
}