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.
This commit is contained in:
Robert Osfield 2002-10-10 14:58:44 +00:00
parent 6ba195efea
commit bfd614f907
3 changed files with 8 additions and 5 deletions

View File

@ -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;}

View File

@ -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

View File

@ -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
}