From 4c149bd2e7632e72f19beac79c204d1582c9c294 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 27 Jun 2016 11:38:30 +0100 Subject: [PATCH] Added initializers and fixed float setting --- src/osgPlugins/ac/ac3d.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/osgPlugins/ac/ac3d.cpp b/src/osgPlugins/ac/ac3d.cpp index 4bf6a1c0b..19dcb6158 100644 --- a/src/osgPlugins/ac/ac3d.cpp +++ b/src/osgPlugins/ac/ac3d.cpp @@ -585,7 +585,9 @@ struct VertexIndex { class VertexSet : public osg::Referenced { public: - VertexSet() : _dirty(true) + VertexSet() : + _cosCreaseAngle(1.0f), + _dirty(true) { } void reserve(unsigned n) { @@ -599,9 +601,9 @@ public: { _dirty = true; if (crease <= 0) - _cosCreaseAngle = 1; + _cosCreaseAngle = 1.0f; else if (180 <= crease) - _cosCreaseAngle = -1; + _cosCreaseAngle = -1.0f; else _cosCreaseAngle = cosf(osg::DegreesToRadians(crease)); }