diff --git a/panda/src/parametrics/Sources.pp b/panda/src/parametrics/Sources.pp index e1864748c7..c938939c13 100644 --- a/panda/src/parametrics/Sources.pp +++ b/panda/src/parametrics/Sources.pp @@ -7,21 +7,25 @@ #define TARGET parametrics #define LOCAL_LIBS \ grutil sgattrib linmath express putil pandabase + + #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx #define SOURCES \ - classicNurbsCurve.I classicNurbsCurve.cxx classicNurbsCurve.h \ - config_parametrics.cxx config_parametrics.h \ - cubicCurveseg.cxx cubicCurveseg.h \ - parametricCurveDrawer.I parametricCurveDrawer.cxx parametricCurveDrawer.h \ - curveFitter.I curveFitter.cxx curveFitter.h \ - hermiteCurve.cxx hermiteCurve.h \ - nurbsCurve.h \ - nurbsCurveDrawer.I nurbsCurveDrawer.cxx nurbsCurveDrawer.h \ - nurbsCurveInterface.I nurbsCurveInterface.cxx nurbsCurveInterface.h \ - parametricCurve.cxx parametricCurve.h \ - parametricCurveCollection.I parametricCurveCollection.cxx \ - parametricCurveCollection.h \ - piecewiseCurve.cxx piecewiseCurve.h + classicNurbsCurve.I classicNurbsCurve.h config_parametrics.h \ + cubicCurveseg.h parametricCurveDrawer.I \ + parametricCurveDrawer.h curveFitter.I curveFitter.h \ + hermiteCurve.h nurbsCurve.h nurbsCurveDrawer.I \ + nurbsCurveDrawer.h nurbsCurveInterface.I \ + nurbsCurveInterface.h parametricCurve.h \ + parametricCurveCollection.I parametricCurveCollection.h \ + piecewiseCurve.h + + #define INCLUDED_SOURCES \ + classicNurbsCurve.cxx config_parametrics.cxx cubicCurveseg.cxx \ + parametricCurveDrawer.cxx curveFitter.cxx hermiteCurve.cxx \ + nurbsCurveDrawer.cxx nurbsCurveInterface.cxx \ + parametricCurve.cxx parametricCurveCollection.cxx \ + piecewiseCurve.cxx #define IF_NURBSPP_SOURCES \ nurbsPPCurve.cxx nurbsPPCurve.I nurbsPPCurve.h diff --git a/panda/src/parametrics/classicNurbsCurve.cxx b/panda/src/parametrics/classicNurbsCurve.cxx index 1edb353ffd..f9bfaddeb4 100644 --- a/panda/src/parametrics/classicNurbsCurve.cxx +++ b/panda/src/parametrics/classicNurbsCurve.cxx @@ -32,7 +32,7 @@ TypeHandle ClassicNurbsCurve::_type_handle; TypeHandle ClassicNurbsCurve::_orig_type_handle; -static const LVecBase3f zero = LVecBase3f(0.0, 0.0, 0.0); +static const LVecBase3f zero = LVecBase3f(0.0f, 0.0f, 0.0f); // This is returned occasionally from some of the functions, and is // used from time to time as an initializer. @@ -377,8 +377,8 @@ rebuild_curveseg(int rtype0, float t0, const LVecBase4f &v0, // properties depends on the original value. if ((rtype0 | rtype1 | rtype2 | rtype3) & RT_KEEP_ORIG) { for (c = 0; c < 4; c++) { - static const LVecBase4f zero(0.0, 0.0, 0.0, 0.0); - const LVecBase4f &s = (c < _order) ? _cvs[c+cv]._p : zero; + static const LVecBase4f zero_vec(0.0f, 0.0f, 0.0f, 0.0f); + const LVecBase4f &s = (c < _order) ? _cvs[c+cv]._p : zero_vec; G.set_col(c, s); } diff --git a/panda/src/parametrics/hermiteCurve.cxx b/panda/src/parametrics/hermiteCurve.cxx index f8ddd4277a..31cb63ac9c 100644 --- a/panda/src/parametrics/hermiteCurve.cxx +++ b/panda/src/parametrics/hermiteCurve.cxx @@ -31,7 +31,7 @@ TypeHandle HermiteCurve::_type_handle; -static const LVecBase3f zero = LVecBase3f(0.0, 0.0, 0.0); +static const LVecBase3f zerovec_3f = LVecBase3f(0.0, 0.0, 0.0); // This is returned occasionally from some of the functions, and is // used from time to time as an initializer. @@ -369,8 +369,8 @@ append_cv(int type, float x, float y, float z) { HermiteCurveCV cv; cv.set_type(type); cv.set_point(LVecBase3f(x, y, z)); - cv.set_in(zero); - cv.set_out(zero); + cv.set_in(zerovec_3f); + cv.set_out(zerovec_3f); _points.push_back(cv); if (_points.size()>1) { bool result = @@ -569,7 +569,7 @@ get_cv_type(int n) const { const LVecBase3f &HermiteCurve:: get_cv_point(int n) const { if (n < 0 || n >= (int)_points.size()) { - return zero; + return zerovec_3f; } return _points[n]._p; @@ -588,7 +588,7 @@ get_cv_point(int n, LVecBase3f &v) const { const LVecBase3f &HermiteCurve:: get_cv_in(int n) const { if (n < 0 || n >= (int)_points.size() || _points[n-1]._type==HC_CUT) { - return zero; + return zerovec_3f; } return _points[n]._in; @@ -607,7 +607,7 @@ get_cv_in(int n, LVecBase3f &v) const { const LVecBase3f &HermiteCurve:: get_cv_out(int n) const { if (n < 0 || n >= (int)_points.size() || _points[n]._type==HC_CUT) { - return zero; + return zerovec_3f; } return _points[n]._out; diff --git a/panda/src/parametrics/parametrics_composite1.cxx b/panda/src/parametrics/parametrics_composite1.cxx new file mode 100644 index 0000000000..572eed6433 --- /dev/null +++ b/panda/src/parametrics/parametrics_composite1.cxx @@ -0,0 +1,9 @@ + +#include "classicNurbsCurve.cxx" +#include "cubicCurveseg.cxx" +#include "curveFitter.cxx" +#include "hermiteCurve.cxx" +#include "nurbsCurveDrawer.cxx" +#include "nurbsCurveInterface.cxx" + + diff --git a/panda/src/parametrics/parametrics_composite2.cxx b/panda/src/parametrics/parametrics_composite2.cxx new file mode 100644 index 0000000000..a1e585b13f --- /dev/null +++ b/panda/src/parametrics/parametrics_composite2.cxx @@ -0,0 +1,8 @@ + +#include "config_parametrics.cxx" +#include "piecewiseCurve.cxx" +#include "parametricCurve.cxx" +#include "parametricCurveCollection.cxx" +#include "parametricCurveDrawer.cxx" + +