本文整理汇总了C++中osg::ProxyNode::getUserData方法的典型用法代码示例。如果您正苦于以下问题:C++ ProxyNode::getUserData方法的具体用法?C++ ProxyNode::getUserData怎么用?C++ ProxyNode::getUserData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::ProxyNode
的用法示例。
在下文中一共展示了ProxyNode::getUserData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: guard
void
FltExportVisitor::apply( osg::ProxyNode& node )
{
_firstNode = false;
ScopedStatePushPop guard( this, node.getStateSet() );
writeExternalReference( node );
writeMatrix( node.getUserData() );
writeComment( node );
}
示例2: length
void
FltExportVisitor::writeExternalReference(const osg::ProxyNode &proxy)
{
uint16 length(216);
// Set sane defaults for the override flags
unsigned long flags = COLOR_PALETTE_OVERRIDE |
MATERIAL_PALETTE_OVERRIDE |
TEXTURE_PALETTE_OVERRIDE |
LIGHT_POINT_PALETTE_OVERRIDE |
SHADER_PALETTE_OVERRIDE;
// Selectively turn off overrides for resources we don't need
const ParentPools *pp = dynamic_cast<const ParentPools*>(proxy.getUserData());
if (pp && pp->getColorPool())
flags &= ~COLOR_PALETTE_OVERRIDE;
if (pp && pp->getMaterialPool())
flags &= ~MATERIAL_PALETTE_OVERRIDE;
if (pp && pp->getTexturePool())
flags &= ~TEXTURE_PALETTE_OVERRIDE;
if (pp && pp->getLightSourcePool())
flags &= ~LIGHT_SOURCE_PALETTE_OVERRIDE;
if (pp && pp->getLPAppearancePool())
flags &= ~LIGHT_POINT_PALETTE_OVERRIDE;
if (pp && pp->getShaderPool())
flags &= ~SHADER_PALETTE_OVERRIDE;
_records->writeInt16((int16) EXTERNAL_REFERENCE_OP);
_records->writeInt16(length);
_records->writeString(proxy.getFileName(0), 200);
_records->writeInt32(0); // Reserved
_records->writeInt32(flags);
_records->writeInt16(0); // ViewAsBoundingBox flag
_records->writeInt16(0); // Reserved
}