本文整理汇总了C++中PView::getTag方法的典型用法代码示例。如果您正苦于以下问题:C++ PView::getTag方法的具体用法?C++ PView::getTag怎么用?C++ PView::getTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PView
的用法示例。
在下文中一共展示了PView::getTag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: computeAndSendVertexArrays
static void computeAndSendVertexArrays(GmshClient *client, bool compute=true)
{
for(unsigned int i = 0; i < PView::list.size(); i++){
PView *p = PView::list[i];
if(compute) p->fillVertexArrays();
PViewData *data = p->getData();
PViewOptions *opt = p->getOptions();
double min = data->getMin(), max = data->getMax();
if(opt->rangeType == PViewOptions::PerTimeStep){
min = data->getMin(opt->timeStep);
max = data->getMax(opt->timeStep);
}
VertexArray *va[4] =
{p->va_points, p->va_lines, p->va_triangles, p->va_vectors};
for(int type = 0; type < 4; type++){
if(va[type]){
int len;
char *str = va[type]->toChar
(p->getTag(), data->getName(), type + 1, min, max,
data->getNumTimeSteps(), data->getTime(opt->timeStep),
data->getBoundingBox(), len);
client->SendMessage(GmshSocket::GMSH_VERTEX_ARRAY, len, str);
delete [] str;
}
}
}
}
示例2: getViewByTag
PView::PView(PView *ref, bool copyOptions)
{
_init();
if(ref->getAliasOf() >= 0){ // alias of an alias
PView *orig = getViewByTag(ref->getAliasOf());
if(orig) _aliasOf = orig->getTag();
else{
Msg::Warning("Original view for alias does not exist anymore");
_aliasOf = ref->getTag();
}
}
else
_aliasOf = ref->getTag();
_data = ref->getData();
if(copyOptions)
_options = new PViewOptions(*ref->getOptions());
else
_options = new PViewOptions(*PViewOptions::reference());
if(_options->adaptVisualizationGrid)
_data->initAdaptiveData(_options->timeStep, _options->maxRecursionLevel,
_options->targetError);
}