~ubuntu-branches/debian/experimental/openscenegraph/experimental

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgAnimation/MorphGeometry.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Luaces
  • Date: 2011-01-29 11:36:29 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20110129113629-qisrm2kdqlurc7t3
Tags: 2.9.11-1
* Removed bug-555869-ftbfs_with_binutils_gold.dpatch since upstream has
  already taken care of the issue.
* Removed bug-528229.dpatch since the pkgconfig files are now also split
  in upstream.
* Removed explicit dependency on GLU.
* Upstream no longer includes osgIntrospection (Closes: #592420).
* Disabled zip plugin as its implementation stores an embedded copy of
  zlib.
* Enabled Qt support. Thanks James Goppert.
* Enabled SVG and PDF plugins. Thanks James Goppert.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <osg/Geode>
25
25
#include <osgAnimation/MorphGeometry>
26
26
 
27
 
#include <stdlib.h>
 
27
#include <sstream>
28
28
 
29
29
using namespace osgAnimation;
30
30
 
255
255
{
256
256
    // Typically morph geometries only have the weights for morph targets animated
257
257
 
258
 
    // Expect a weight value
259
 
    // TODO Should we make this more generic to handle other things than single values?
260
 
    int weightIndex = atoi(channel->getName().c_str());
 
258
    std::istringstream iss(channel->getName());
 
259
 
 
260
    int weightIndex;
 
261
    iss >> weightIndex;
 
262
 
 
263
    if (iss.fail())
 
264
    {
 
265
        return false;
 
266
    }
261
267
 
262
268
    if (weightIndex >= 0)
263
269
    {
271
277
    }
272
278
    else
273
279
    {
274
 
        osg::notify(osg::WARN) << "Channel " << channel->getName() << " does not contain a valid symbolic name for this class" << std::endl;
 
280
        OSG_WARN << "Channel " << channel->getName() << " does not contain a valid symbolic name for this class" << std::endl;
275
281
    }
276
282
    return false;
277
283
}