本文整理汇总了C++中osgdb::InputStream::PROPERTY方法的典型用法代码示例。如果您正苦于以下问题:C++ InputStream::PROPERTY方法的具体用法?C++ InputStream::PROPERTY怎么用?C++ InputStream::PROPERTY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osgdb::InputStream
的用法示例。
在下文中一共展示了InputStream::PROPERTY方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readInfluenceMap
static bool readInfluenceMap( osgDB::InputStream& is, osgAnimation::RigGeometry& geom )
{
osg::ref_ptr<osgAnimation::VertexInfluenceMap> map = new osgAnimation::VertexInfluenceMap;
unsigned int size = is.readSize(); is >> is.BEGIN_BRACKET;
for ( unsigned int i=0; i<size; ++i )
{
std::string name;
unsigned int viSize = 0;
is >> is.PROPERTY("VertexInfluence");
is.readWrappedString(name);
viSize = is.readSize(); is >> is.BEGIN_BRACKET;
osgAnimation::VertexInfluence vi;
vi.setName( name );
vi.reserve( viSize );
for ( unsigned int j=0; j<viSize; ++j )
{
int index = 0;
float weight = 0.0f;
is >> index >> weight;
vi.push_back( osgAnimation::VertexIndexWeight(index, weight) );
}
(*map)[name] = vi;
is >> is.END_BRACKET;
}
is >> is.END_BRACKET;
if ( !map->empty() ) geom.setInfluenceMap( map.get() );
return true;
}
示例2: readValues
static bool readValues( osgDB::InputStream& is, osgSim::MultiSwitch& node )
{
unsigned int size = is.readSize(); is >> is.BEGIN_BRACKET;
for ( unsigned int i=0; i<size; ++i )
{
is >> is.PROPERTY("SwitchSet");
unsigned int valueSize = is.readSize(); is >> is.BEGIN_BRACKET;
osgSim::MultiSwitch::ValueList values;
for ( unsigned int j=0; j<valueSize; ++j )
{
bool value; is >> value;
values.push_back( value );
}
node.setValueList( i, values );
is >> is.END_BRACKET;
}
is >> is.END_BRACKET;
return true;
}