本文整理汇总了C++中osgdb::Input::matchSequence方法的典型用法代码示例。如果您正苦于以下问题:C++ Input::matchSequence方法的具体用法?C++ Input::matchSequence怎么用?C++ Input::matchSequence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osgdb::Input
的用法示例。
在下文中一共展示了Input::matchSequence方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConeSector_readLocalData
bool ConeSector_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
bool iteratorAdvanced = false;
osgSim::ConeSector §or = static_cast<osgSim::ConeSector &>(obj);
if (fr.matchSequence("axis %f %f %f"))
{
float x, y, z;
fr[1].getFloat(x);
fr[2].getFloat(y);
fr[3].getFloat(z);
fr += 4;
sector.setAxis(osg::Vec3(x, y, z));
iteratorAdvanced = true;
}
if (fr.matchSequence("angle %f %f"))
{
float angle;
float fadeangle;
fr[1].getFloat(angle);
fr[2].getFloat(fadeangle);
fr += 3;
sector.setAngle(angle, fadeangle);
iteratorAdvanced = true;
}
return iteratorAdvanced;
}
示例2: ImageLayer_readLocalData
bool ImageLayer_readLocalData(osg::Object& obj, osgDB::Input &fr)
{
osgTerrain::ImageLayer& layer = static_cast<osgTerrain::ImageLayer&>(obj);
bool itrAdvanced = false;
if (fr.matchSequence("file %w") || fr.matchSequence("file %s"))
{
std::string filename = fr[1].getStr();
if (!filename.empty())
{
bool deferExternalLayerLoading = osgTerrain::TerrainTile::getTileLoadedCallback().valid() ?
osgTerrain::TerrainTile::getTileLoadedCallback()->deferExternalLayerLoading() : false;
layer.setFileName(filename);
if (!deferExternalLayerLoading)
{
osg::ref_ptr<osg::Image> image = fr.readImage(filename.c_str());
if (image.valid())
{
layer.setImage(image.get());
}
}
}
fr += 2;
itrAdvanced = true;
}
return itrAdvanced;
}
示例3: AzimElevationSector_readLocalData
bool AzimElevationSector_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
bool iteratorAdvanced = false;
osgSim::AzimElevationSector §or = static_cast<osgSim::AzimElevationSector &>(obj);
if (fr.matchSequence("azimuthRange %f %f %f"))
{
float minAzimuth;
float maxAzimuth;
float fadeAngle;
fr[1].getFloat(minAzimuth);
fr[2].getFloat(maxAzimuth);
fr[3].getFloat(fadeAngle);
fr += 4;
sector.setAzimuthRange(minAzimuth, maxAzimuth, fadeAngle);
iteratorAdvanced = true;
}
if (fr.matchSequence("elevationRange %f %f %f"))
{
float minElevation;
float maxElevation;
float fadeAngle;
fr[1].getFloat(minElevation);
fr[2].getFloat(maxElevation);
fr[3].getFloat(fadeAngle);
fr += 4;
sector.setElevationRange(minElevation, maxElevation, fadeAngle);
iteratorAdvanced = true;
}
return iteratorAdvanced;
}
示例4: DirectionalSector_readLocalData
bool DirectionalSector_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
bool iteratorAdvanced = false;
osgSim::DirectionalSector §or = static_cast<osgSim::DirectionalSector &>(obj);
if (fr.matchSequence("direction %f %f %f"))
{
float x, y, z;
fr[1].getFloat(x);
fr[2].getFloat(y);
fr[3].getFloat(z);
fr += 4;
sector.setDirection(osg::Vec3(x, y, z));
iteratorAdvanced = true;
}
if (fr.matchSequence("angles %f %f %f %f"))
{
float horizangle;
float vertangle;
float rollangle;
float fadeangle;
fr[1].getFloat(horizangle);
fr[2].getFloat(vertangle);
fr[3].getFloat(rollangle);
fr[4].getFloat(fadeangle);
fr += 5;
sector.setHorizLobeAngle(horizangle);
sector.setVertLobeAngle(vertangle);
sector.setLobeRollAngle(rollangle);
sector.setFadeAngle(fadeangle);
iteratorAdvanced = true;
}
return iteratorAdvanced;
}
示例5: AnimationPathCallback_readLocalData
bool AnimationPathCallback_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
osg::AnimationPathCallback *apc = dynamic_cast<osg::AnimationPathCallback*>(&obj);
if (!apc) return false;
bool iteratorAdvanced = false;
if (fr.matchSequence("pivotPoint %f %f %f"))
{
osg::Vec3 pivot;
fr[1].getFloat(pivot[0]);
fr[2].getFloat(pivot[1]);
fr[3].getFloat(pivot[2]);
apc->setPivotPoint(pivot);
fr += 4;
iteratorAdvanced = true;
}
if (fr.matchSequence("timeOffset %f"))
{
fr[1].getFloat(apc->_timeOffset);
fr+=2;
iteratorAdvanced = true;
}
else if(fr.matchSequence("timeMultiplier %f"))
{
fr[1].getFloat(apc->_timeMultiplier);
fr+=2;
iteratorAdvanced = true;
}
static osg::ref_ptr<osg::AnimationPath> s_path = new osg::AnimationPath;
ref_ptr<osg::Object> object = fr.readObjectOfType(*s_path);
if (object.valid())
{
osg::AnimationPath* animpath = dynamic_cast<osg::AnimationPath*>(object.get());
if (animpath) apc->setAnimationPath(animpath);
iteratorAdvanced = true;
}
return iteratorAdvanced;
}
示例6: OQN_readLocalData
bool OQN_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
osg::OcclusionQueryNode &oqn = static_cast<osg::OcclusionQueryNode&>(obj);
bool advanced(false);
int param;
if (fr[0].matchWord("QueriesEnabled"))
{
bool enable(fr[1].getStr() == std::string("TRUE"));
oqn.setQueriesEnabled(enable);
fr += 2;
advanced = true;
}
if (fr.matchSequence("VisibilityThreshold %i"))
{
fr[1].getInt(param);
oqn.setVisibilityThreshold(param);
fr += 2;
advanced = true;
}
if (fr.matchSequence("QueryFrameCount %i"))
{
fr[1].getInt(param);
oqn.setQueryFrameCount(param);
fr += 2;
advanced = true;
}
if (fr[0].matchWord("DebugDisplay"))
{
bool enable(fr[1].getStr() == std::string("TRUE"));
oqn.setDebugDisplay(enable);
fr += 2;
advanced = true;
}
return advanced;
}
示例7: HeightFieldLayer_readLocalData
bool HeightFieldLayer_readLocalData(osg::Object& obj, osgDB::Input &fr)
{
osgTerrain::HeightFieldLayer& layer = static_cast<osgTerrain::HeightFieldLayer&>(obj);
bool itrAdvanced = false;
if (fr.matchSequence("file %w") || fr.matchSequence("file %s"))
{
std::string setname;
std::string filename;
osgTerrain::extractSetNameAndFileName(fr[1].getStr(),setname, filename);
if (!filename.empty())
{
osg::ref_ptr<osg::HeightField> hf = osgDB::readHeightFieldFile(filename);
if (hf.valid())
{
layer.setName(setname);
layer.setFileName(filename);
layer.setHeightField(hf.get());
}
}
fr += 2;
itrAdvanced = true;
}
osg::ref_ptr<osg::Object> readObject = fr.readObjectOfType(osgDB::type_wrapper<osg::HeightField>());
if (readObject.valid()) itrAdvanced = true;
osg::HeightField* hf = dynamic_cast<osg::HeightField*>(readObject.get());
if (hf)
{
layer.setHeightField(hf);
}
return itrAdvanced;
}
示例8: ObjectRecordData_readLocalData
bool ObjectRecordData_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
bool iteratorAdvanced = false;
osgSim::ObjectRecordData &ord = static_cast<osgSim::ObjectRecordData&>(obj);
if (fr.matchSequence("flags %i"))
{
unsigned int flags;
fr[1].getUInt( flags );
ord._flags = flags;
fr += 2;
iteratorAdvanced = true;
}
if (fr.matchSequence("relativePriority %i"))
{
int relativePriority;
fr[1].getInt( relativePriority );
ord._relativePriority = (short) relativePriority;
fr += 2;
iteratorAdvanced = true;
}
if (fr.matchSequence("transparency %i"))
{
int transparency;
fr[1].getInt( transparency );
ord._transparency = (unsigned short) transparency;
fr += 2;
iteratorAdvanced = true;
}
if (fr.matchSequence("effectID1 %i"))
{
int effectID1;
fr[1].getInt( effectID1 );
ord._effectID1 = (short) effectID1;
fr += 2;
iteratorAdvanced = true;
}
if (fr.matchSequence("effectID2 %i"))
{
int effectID2;
fr[1].getInt( effectID2 );
ord._effectID2 = (short) effectID2;
fr += 2;
iteratorAdvanced = true;
}
if (fr.matchSequence("significance %i"))
{
int significance;
fr[1].getInt( significance );
ord._significance = (short) significance;
fr += 2;
iteratorAdvanced = true;
}
return iteratorAdvanced;
}
示例9: Locator_readLocalData
bool Locator_readLocalData(osg::Object& obj, osgDB::Input &fr)
{
osgVolume::Locator& locator = static_cast<osgVolume::Locator&>(obj);
bool itrAdvanced = false;
if (fr.matchSequence("Transform {"))
{
int tansform_entry = fr[0].getNoNestedBrackets();
fr += 2;
int row=0;
int col=0;
double v;
osg::Matrixd matrix;
while (!fr.eof() && fr[0].getNoNestedBrackets()>tansform_entry)
{
if (fr[0].getFloat(v))
{
matrix(row,col)=v;
++col;
if (col>=4)
{
col = 0;
++row;
}
++fr;
}
else fr.advanceOverCurrentFieldOrBlock();
}
locator.setTransform(matrix);
++fr;
itrAdvanced = true;
}
return itrAdvanced;
}
示例10: AnimationPath_readLocalData
bool AnimationPath_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
osg::AnimationPath *ap = dynamic_cast<osg::AnimationPath*>(&obj);
if (!ap) return false;
bool itAdvanced = false;
if (fr[0].matchWord("LoopMode"))
{
if (fr[1].matchWord("SWING"))
{
ap->setLoopMode(AnimationPath::SWING);
fr += 2;
itAdvanced = true;
}
else if (fr[1].matchWord("LOOP"))
{
ap->setLoopMode(AnimationPath::LOOP);
fr += 2;
itAdvanced = true;
}
else if (fr[1].matchWord("NO_LOOPING"))
{
ap->setLoopMode(AnimationPath::NO_LOOPING);
fr += 2;
itAdvanced = true;
}
}
if (fr.matchSequence("ControlPoints {"))
{
int entry = fr[0].getNoNestedBrackets();
fr += 2;
double time;
Vec3d position,scale;
Quat rotation;
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
if (fr[0].getFloat(time) &&
fr[1].getFloat(position[0]) &&
fr[2].getFloat(position[1]) &&
fr[3].getFloat(position[2]) &&
fr[4].getFloat(rotation[0]) &&
fr[5].getFloat(rotation[1]) &&
fr[6].getFloat(rotation[2]) &&
fr[7].getFloat(rotation[3]) &&
fr[8].getFloat(scale[0]) &&
fr[9].getFloat(scale[1]) &&
fr[10].getFloat(scale[2]))
{
osg::AnimationPath::ControlPoint ctrlPoint(position,rotation,scale);
ap->insert(time, ctrlPoint);
fr+=11;
}
else fr.advanceOverCurrentFieldOrBlock();
}
itAdvanced = true;
}
return itAdvanced;
}
示例11: SoundState_readLocalData
bool SoundState_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
SoundState &ss = static_cast<SoundState&>(obj);
if (fr.matchSequence("streamFileName %s")) {
osg::ref_ptr<osgAudio::Stream> s = SoundManager::instance()->getStream(fr[1].getStr());
if(s.valid()) {
ss.allocateSource();
ss.setStream(s.get());
}
fr += 2;
} else if (fr.matchSequence("fileName %s")) {
osg::ref_ptr<osgAudio::Sample> s = SoundManager::instance()->getSample(fr[1].getStr());
if(s.valid()) {
ss.allocateSource();
ss.setSample(s.get());
}
fr += 2;
} else if (fr[0].matchWord("playing")) {
if (fr[1].matchWord("TRUE")) {
ss.setPlay(true);
}
else if (fr[1].matchWord("FALSE"))
ss.setPlay(false);
fr += 2;
} else if (fr.matchSequence("gain %f")) {
float f;
fr[1].getFloat(f);
ss.setGain(f);
fr += 2;
} else if (fr[0].matchWord("looping")) {
if (fr[1].matchWord("TRUE"))
ss.setLooping(true);
else if (fr[1].matchWord("FALSE"))
ss.setLooping(false);
fr += 2;
} else if (fr[0].matchWord("ambient")) {
if (fr[1].matchWord("TRUE"))
ss.setAmbient(true);
else if (fr[1].matchWord("FALSE"))
ss.setAmbient(false);
fr += 2;
} else if (fr[0].matchWord("relative")) {
if (fr[1].matchWord("TRUE"))
ss.setRelative(true);
else if (fr[1].matchWord("FALSE"))
ss.setRelative(false);
fr += 2;
} else if (fr.matchSequence("referenceDistance %f")) {
float f;
fr[1].getFloat(f);
ss.setReferenceDistance(f);
fr += 2;
} else if (fr.matchSequence("maxDistance %f")) {
float f;
fr[1].getFloat(f);
ss.setMaxDistance(f);
fr += 2;
} else if (fr.matchSequence("rolloffFactor %f")) {
float f;
fr[1].getFloat(f);
ss.setRolloffFactor(f);
fr += 2;
} else if (fr.matchSequence("pitch %f")) {
float f;
fr[1].getFloat(f);
ss.setPitch(f);
fr += 2;
} else if (fr.matchSequence("occludeDampingFactor %f")) {
float f;
fr[1].getFloat(f);
ss.setOccludeDampingFactor(f);
fr += 2;
} else if (fr[0].matchWord("enabled")) {
if (fr[1].matchWord("TRUE"))
ss.setEnable(true);
else if (fr[1].matchWord("FALSE"))
ss.setEnable(false);
fr += 2;
} else if (fr.matchSequence("soundCone %f %f %f")) {
float f1, f2, f3;
fr[1].getFloat(f1); fr[2].getFloat(f2); fr[3].getFloat(f3);
ss.setSoundCone(f1, f2, f3);
fr += 2;
} else
return false;
if(ss.hasSource())
ss.apply();
return true;
}
示例12: Creation_readLocalData
bool Creation_readLocalData( osg::Object& obj, osgDB::Input& fr )
{
osgbDynamics::CreationRecord& cr = static_cast< osgbDynamics::CreationRecord& >( obj );
bool advance( false );
if( fr.matchSequence( "Version %i" ) )
{
fr[1].getUInt( cr._version );
fr+=2;
advance = true;
}
else if( fr.matchSequence( "COM %f %f %f" ) )
{
float x, y, z;
fr[1].getFloat( x );
fr[2].getFloat( y );
fr[3].getFloat( z );
cr._com = osg::Vec3( x, y, z );
fr+=4;
advance = true;
}
else if( fr.matchSequence( "Use COM" ) )
{
cr._comSet = ( fr[2].matchString( "true" ) );
fr+=3;
advance = true;
}
else if( fr.matchSequence( "Scale %f %f %f" ) )
{
float x, y, z;
fr[1].getFloat( x );
fr[2].getFloat( y );
fr[3].getFloat( z );
cr._scale = osg::Vec3( x, y, z );
fr+=4;
advance = true;
}
else if( fr.matchSequence( "Collision shape %i" ) )
{
unsigned int uint;
fr[2].getUInt( uint );
cr._shapeType = (BroadphaseNativeTypes)( uint );
fr+=3;
advance = true;
}
else if( fr.matchSequence( "Mass %f" ) )
{
fr[1].getFloat( cr._mass );
fr+=2;
advance = true;
}
else if( fr.matchSequence( "Decimator percent %f" ) )
{
// No longer supported.
//fr[2].getFloat( cr._decimatorPercent );
fr+=3;
advance = true;
}
else if( fr.matchSequence( "Decimator max error %f" ) )
{
// No longer supported.
//fr[3].getFloat( cr._decimatorMaxError );
fr+=4;
advance = true;
}
else if( fr.matchSequence( "Decimator ignore boundaries" ) )
{
// No longer supported.
//cr._decimatorIgnoreBoundaries = ( fr[3].matchString( "true" ) );
fr+=4;
advance = true;
}
else if( fr.matchSequence( "Simplify percent %f" ) )
{
// No longer supported.
//fr[2].getFloat( cr._simplifyPercent );
fr+=3;
advance = true;
}
else if( fr.matchSequence( "VertexAgg max verts %i" ) )
{
// No longer supported.
//fr[3].getUInt( cr._vertexAggMaxVerts );
fr+=4;
advance = true;
}
else if( fr.matchSequence( "VertexAgg min cell size %f %f %f" ) )
{
// No longer supported.
/*
float x, y, z;
fr[4].getFloat( x );
fr[5].getFloat( y );
fr[6].getFloat( z );
cr._vertexAggMinCellSize = osg::Vec3( x, y, z );
*/
fr+=7;
advance = true;
}
else if( fr.matchSequence( "Reducer group threshold %f" ) )
//.........这里部分代码省略.........
示例13: TextBase_readLocalData
bool TextBase_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
osgText::Text &text = static_cast<osgText::Text &>(obj);
bool itAdvanced = false;
// color
if (fr[0].matchWord("color"))
{
osg::Vec4 c;
if (fr[1].getFloat(c.x()) && fr[2].getFloat(c.y()) && fr[3].getFloat(c.z()) && fr[4].getFloat(c.w()))
{
text.setColor(c);
fr += 4;
itAdvanced = true;
}
}
if (fr.matchSequence("font %w"))
{
text.setFont(fr[1].getStr());
fr += 2;
itAdvanced = true;
}
if (fr[0].matchWord("fontResolution") || fr[0].matchWord("fontSize"))
{
unsigned int width;
unsigned int height;
if (fr[1].getUInt(width) && fr[2].getUInt(height))
{
text.setFontResolution(width,height);
fr += 3;
itAdvanced = true;
}
}
if (fr[0].matchWord("characterSize"))
{
float height;
float aspectRatio;
if (fr[1].getFloat(height) && fr[2].getFloat(aspectRatio))
{
text.setCharacterSize(height,aspectRatio);
fr += 3;
itAdvanced = true;
}
}
if (fr.matchSequence("characterSizeMode %w"))
{
std::string str = fr[1].getStr();
if (str=="OBJECT_COORDS") text.setCharacterSizeMode(osgText::Text::OBJECT_COORDS);
else if (str=="SCREEN_COORDS") text.setCharacterSizeMode(osgText::Text::SCREEN_COORDS);
else if (str=="OBJECT_COORDS_WITH_MAXIMUM_SCREEN_SIZE_CAPPED_BY_FONT_HEIGHT") text.setCharacterSizeMode(osgText::Text::OBJECT_COORDS_WITH_MAXIMUM_SCREEN_SIZE_CAPPED_BY_FONT_HEIGHT);
}
// maximum dimentsions of text box.
if (fr[0].matchWord("maximumWidth"))
{
float width;
if (fr[1].getFloat(width))
{
text.setMaximumWidth(width);
fr += 2;
itAdvanced = true;
}
}
if (fr[0].matchWord("maximumHeight"))
{
float height;
if (fr[1].getFloat(height))
{
text.setMaximumHeight(height);
fr += 2;
itAdvanced = true;
}
}
if (fr[0].matchWord("lineSpacing"))
{
float height;
if (fr[1].getFloat(height))
{
text.setLineSpacing(height);
fr += 2;
itAdvanced = true;
}
}
if (fr.matchSequence("alignment %w"))
{
std::string str = fr[1].getStr();
if (str=="LEFT_TOP") text.setAlignment(osgText::Text::LEFT_TOP);
else if (str=="LEFT_CENTER") text.setAlignment(osgText::Text::LEFT_CENTER);
else if (str=="LEFT_BOTTOM") text.setAlignment(osgText::Text::LEFT_BOTTOM);
else if (str=="CENTER_TOP") text.setAlignment(osgText::Text::CENTER_TOP);
else if (str=="CENTER_CENTER") text.setAlignment(osgText::Text::CENTER_CENTER);
else if (str=="CENTER_BOTTOM") text.setAlignment(osgText::Text::CENTER_BOTTOM);
else if (str=="RIGHT_TOP") text.setAlignment(osgText::Text::RIGHT_TOP);
//.........这里部分代码省略.........
示例14: LightPointNode_readLocalData
bool LightPointNode_readLocalData(osg::Object &obj, osgDB::Input &fr)
{
LightPointNode &lightpointnode = static_cast<LightPointNode &>(obj);
bool itAdvanced = false;
if (fr.matchSequence("num_lightpoints %d")) {
// Could allocate space for lightpoints here
fr += 2;
itAdvanced = true;
}
if (fr.matchSequence("minPixelSize %f")) {
float size = 0.0f;
fr[1].getFloat(size);
lightpointnode.setMinPixelSize(size);
fr += 2;
itAdvanced = true;
}
if (fr.matchSequence("maxPixelSize %f")) {
float size = 30.0f;
fr[1].getFloat(size);
lightpointnode.setMaxPixelSize(size);
fr += 2;
itAdvanced = true;
}
if (fr.matchSequence("maxVisibleDistance2 %f")) {
float distance = FLT_MAX;
fr[1].getFloat(distance);
lightpointnode.setMaxVisibleDistance2(distance);
fr += 2;
itAdvanced = true;
}
if (fr[0].matchWord("pointSprite"))
{
if (fr[1].matchWord("FALSE"))
{
lightpointnode.setPointSprite(false);
fr+=2;
itAdvanced = true;
}
else if (fr[1].matchWord("TRUE"))
{
lightpointnode.setPointSprite(true);
fr+=2;
itAdvanced = true;
}
}
if (fr[0].matchWord("lightPoint")) {
LightPoint lp;
if (readLightPoint(lp, fr)) {
lightpointnode.addLightPoint(lp);
itAdvanced = true;
}
}
return itAdvanced;
}
示例15: buildHierarchy
void buildHierarchy( osgDB::Input& fr, int level, osgAnimation::Bone* parent )
{
bool isRecognized = false;
if ( !parent ) return;
if ( fr.matchSequence("OFFSET %f %f %f") )
{
isRecognized = true;
++fr;
osg::Vec3 offset;
if ( fr.readSequence(offset) )
{
// Process OFFSET section
parent->setBindMatrixInBoneSpace( osg::Matrix::translate(offset) );
if ( _drawingFlag && parent->getNumParents() && level>0 )
parent->getParent(0)->addChild( createRefGeometry(offset, 0.5).get() );
}
}
if ( fr.matchSequence("CHANNELS %i") )
{
isRecognized = true;
// Process CHANNELS section
int noChannels;
fr[1].getInt( noChannels );
fr += 2;
for ( int i=0; i<noChannels; ++i )
{
// Process each channel
std::string channelName;
fr.readSequence( channelName );
alterChannel( channelName, _joints.back().second );
}
}
if ( fr.matchSequence("End Site {") )
{
isRecognized = true;
fr += 3;
if ( fr.matchSequence("OFFSET %f %f %f") )
{
++fr;
osg::Vec3 offsetEndSite;
if ( fr.readSequence(offsetEndSite) )
{
// Process End Site section
osg::ref_ptr<osgAnimation::Bone> bone = new osgAnimation::Bone( parent->getName()+"End" );
bone->setBindMatrixInBoneSpace( osg::Matrix::translate(offsetEndSite) );
bone->setDataVariance( osg::Object::DYNAMIC );
parent->addChild( bone.get() );
if ( _drawingFlag )
parent->addChild( createRefGeometry(offsetEndSite, 0.5).get() );
}
}
fr.advanceOverCurrentFieldOrBlock();
}
if ( fr.matchSequence("ROOT %w {") || fr.matchSequence("JOINT %w {") )
{
isRecognized = true;
// Process JOINT section
osg::ref_ptr<osgAnimation::Bone> bone = new osgAnimation::Bone( fr[1].getStr() );
bone->setDefaultUpdateCallback();
bone->setDataVariance( osg::Object::DYNAMIC );
parent->addChild( bone.get() );
_joints.push_back( JointNode(bone, 0) );
int entry = fr[1].getNoNestedBrackets();
fr += 3;
while ( !fr.eof() && fr[0].getNoNestedBrackets()>entry )
buildHierarchy( fr, entry, bone.get() );
fr.advanceOverCurrentFieldOrBlock();
}
if ( !isRecognized )
{
osg::notify(osg::WARN) << "BVH Reader: Unrecognized symbol " << fr[0].getStr()
<< ". Ignore current field or block." << std::endl;
fr.advanceOverCurrentFieldOrBlock();
}
}