本文整理汇总了C++中voro::container::compute_cell方法的典型用法代码示例。如果您正苦于以下问题:C++ container::compute_cell方法的具体用法?C++ container::compute_cell怎么用?C++ container::compute_cell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类voro::container
的用法示例。
在下文中一共展示了container::compute_cell方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getCellsFromContainer
void getCellsFromContainer(voro::container &_con, vector<ofVboMesh>& cells, float _maxRadius, bool bWireframe){
cells.clear();
voro::c_loop_all vl( _con );
int i = 0;
if( vl.start() ){
do {
voro::voronoicell c;
if( !_con.compute_cell(c, vl) ) {
return;
} else {
if(getCellRadius(c)<_maxRadius){
double *pp = _con.p[vl.ijk] + _con.ps * vl.q;
ofVboMesh cellMesh;
getCellMesh(c, cellMesh, bWireframe);
cells.push_back( cellMesh );
}
i++;
}
} while( vl.inc() );
}
}
示例2: vl
vector<float> getCellsRadius(voro::container &_con){
vector<float> radius;
voro::c_loop_all vl( _con );
int i = 0;
if( vl.start() ){
do {
voro::voronoicell c;
if( !_con.compute_cell(c, vl) ) {
return radius;
} else {
double *pp = _con.p[vl.ijk] + _con.ps * vl.q;
float rad = getCellRadius(c);
radius.push_back( rad );
i++;
}
} while( vl.inc() );
}
return radius;
}
示例3: vl
vector<ofVboMesh> getCellsFromContainer(voro::container &_con, float _wallsThikness, float _maxRadius, bool bWireframe){
vector<ofVboMesh> cells;
voro::c_loop_all vl( _con );
int i = 0;
if( vl.start() ){
do {
voro::voronoicell c;
if( !_con.compute_cell(c, vl) ) {
return cells;
} else {
if(getCellRadius(c)<_maxRadius){
double *pp = _con.p[vl.ijk] + _con.ps * vl.q;
ofVboMesh cellMesh = getCellMesh(c, ofPoint(pp[0],pp[1],pp[2])*(float)(1.0+_wallsThikness), bWireframe);
cells.push_back( cellMesh );
}
i++;
}
} while( vl.inc() );
}
return cells;
}
示例4: getCellsFromContainerParallel
void VoroNode::getCellsFromContainerParallel(voro::container &_con, float _wallsThikness, vector<ofVboMesh>& cells, bool bWireframe){
cells.clear();
voro::c_loop_all vl( _con );
if( vl.start() ){
do {
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
voro::voronoicell c;
if( !_con.compute_cell(c, vl) ) {
return;
} else {
double *pp = _con.p[vl.ijk] + _con.ps * vl.q;
ofVboMesh cellMesh;
getCellMesh(c, ofPoint(pp[0],pp[1],pp[2])*(float)(1.0+_wallsThikness), cellMesh, bWireframe);
cells.push_back( cellMesh );
}
// });
} while( vl.inc() );
}
}