From bfd614f907b7b1113ac21469579b7d419ce88252 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 10 Oct 2002 14:58:44 +0000 Subject: [PATCH] Fixed the names of the ControlPoint parameters so they weren't capitals, to avoid the clash with the parameter type itself. Addd a PER_PRIMTIIVE_SET handling to the existing PER_PRIMTIIVE code, this code is still flacky though and needs a rewrite as it doens't handle all attributes or the full consequences of per primitive and per primitive set bindings. --- include/osg/AnimationPath | 4 ++-- src/osg/AnimationPath.cpp | 4 ++-- src/osgUtil/Tesselator.cpp | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/osg/AnimationPath b/include/osg/AnimationPath index c91dc76f7..82e25f69f 100644 --- a/include/osg/AnimationPath +++ b/include/osg/AnimationPath @@ -89,9 +89,9 @@ class SG_EXPORT AnimationPath : public osg::Referenced } /** get the local ControlPoint frame for a point in time.*/ - virtual bool getInterpolatedControlPoint(double time,ControlPoint& ControlPoint) const; + virtual bool getInterpolatedControlPoint(double time,ControlPoint& controlPoint) const; - void insert(double time,const ControlPoint& ControlPoint); + void insert(double time,const ControlPoint& controlPoint); double getFirstTime() const { if (!_timeControlPointMap.empty()) return _timeControlPointMap.begin()->first; else return 0.0;} double getLastTime() const { if (!_timeControlPointMap.empty()) return _timeControlPointMap.rbegin()->first; else return 0.0;} diff --git a/src/osg/AnimationPath.cpp b/src/osg/AnimationPath.cpp index da4d981c8..7423e0328 100644 --- a/src/osg/AnimationPath.cpp +++ b/src/osg/AnimationPath.cpp @@ -3,9 +3,9 @@ using namespace osg; -void AnimationPath::insert(double time,const ControlPoint& ControlPoint) +void AnimationPath::insert(double time,const ControlPoint& controlPoint) { - _timeControlPointMap[time] = ControlPoint; + _timeControlPointMap[time] = controlPoint; } bool AnimationPath::getInterpolatedControlPoint(double time,ControlPoint& controlPoint) const diff --git a/src/osgUtil/Tesselator.cpp b/src/osgUtil/Tesselator.cpp index 0ae6e3eda..d0cd66e71 100644 --- a/src/osgUtil/Tesselator.cpp +++ b/src/osgUtil/Tesselator.cpp @@ -305,10 +305,13 @@ void Tesselator::retesselatePolygons(osg::Geometry& geom) } + // we don't properly handle per primitive and per primitive bindings yet + // will need to address this soon. Robert Oct 2002. { osg::Vec3Array* normals = NULL; // GWM Sep 2002 - add normals for extra facets int iprim=0; - if (geom.getNormalBinding()==osg::Geometry::BIND_PER_PRIMITIVE) + if (geom.getNormalBinding()==osg::Geometry::BIND_PER_PRIMITIVE || + geom.getNormalBinding()==osg::Geometry::BIND_PER_PRIMITIVE_SET) { normals = geom.getNormalArray(); // GWM Sep 2002 }