本文整理汇总了C++中SoNode::writeFooter方法的典型用法代码示例。如果您正苦于以下问题:C++ SoNode::writeFooter方法的具体用法?C++ SoNode::writeFooter怎么用?C++ SoNode::writeFooter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoNode
的用法示例。
在下文中一共展示了SoNode::writeFooter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
/*!
Action method for SoWriteAction.
Writes out a node object, and any connected nodes, engines etc, if
necessary.
*/
void
SoNode::write(SoWriteAction * action)
{
SoOutput * out = action->getOutput();
SoNode * node = this;
SoProtoInstance * proto = SoProtoInstance::findProtoInstance(this);
if (proto) { node = proto; }
if (out->getStage() == SoOutput::COUNT_REFS) {
node->addWriteReference(out, FALSE);
}
else if (out->getStage() == SoOutput::WRITE) {
if (node->writeHeader(out, FALSE, FALSE)) return;
// check for special case where we actually have to write out an
// SoEngineOutput "field". An engine output might be connected via
// an IS reference in a PROTO, and we then need to write back this
// IS reference when exporting the VRML file.
SoProto * proto = out->getCurrentProto();
if (proto && node->isOfType(SoNodeEngine::getClassTypeId())) {
SoEngineOutputList l;
const int num = ((SoNodeEngine*)node)->getOutputs(l);
for (int i = 0; i < num; i++) {
SbName name;
if (((SoNodeEngine*)node)->getOutputName(l[i], name)) {
SbName pname = proto->findISReference(node, name);
if (pname.getLength()) {
out->indent();
out->write(name.getString());
out->write(" IS ");
out->write(pname.getString());
out->write("\n");
}
}
}
}
node->getFieldData()->write(out, node);
node->writeFooter(out);
}
else assert(0 && "unknown stage");
}