Beginning of crease angle support for SmoothingVisitor to all it duplicate vertices are creases
thus enabling separate normals for triangles adjacent to the creases.
This commit is contained in:
@@ -34,11 +34,20 @@ class OSGUTIL_EXPORT SmoothingVisitor : public osg::NodeVisitor
|
||||
virtual ~SmoothingVisitor();
|
||||
|
||||
/// smooth geoset by creating per vertex normals.
|
||||
static void smooth(osg::Geometry& geoset);
|
||||
static void smooth(osg::Geometry& geoset, double creaseAngle=osg::PI);
|
||||
|
||||
/// apply smoothing method to all geode geosets.
|
||||
virtual void apply(osg::Geode& geode);
|
||||
|
||||
/// set the maximum angle, in radians, at which angle between adjacent triangles that normals are smoothed
|
||||
/// for edges that greater the shared vertices are duplicated
|
||||
void setCreaseAngle(double angle) { _creaseAngle = angle; }
|
||||
double getCreaseAngle() const { return _creaseAngle; }
|
||||
|
||||
protected:
|
||||
|
||||
double _creaseAngle;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user