Forráskód Böngészése

use combined srcs

cxgeorge 24 éve
szülő
commit
d078d632f8

+ 17 - 13
panda/src/parametrics/Sources.pp

@@ -7,21 +7,25 @@
   #define TARGET parametrics
   #define TARGET parametrics
   #define LOCAL_LIBS \
   #define LOCAL_LIBS \
     grutil sgattrib linmath express putil pandabase
     grutil sgattrib linmath express putil pandabase
+    
+  #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx    
 
 
   #define SOURCES \
   #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 \
   #define IF_NURBSPP_SOURCES \
     nurbsPPCurve.cxx nurbsPPCurve.I nurbsPPCurve.h
     nurbsPPCurve.cxx nurbsPPCurve.I nurbsPPCurve.h

+ 3 - 3
panda/src/parametrics/classicNurbsCurve.cxx

@@ -32,7 +32,7 @@
 TypeHandle ClassicNurbsCurve::_type_handle;
 TypeHandle ClassicNurbsCurve::_type_handle;
 TypeHandle ClassicNurbsCurve::_orig_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
 // This is returned occasionally from some of the functions, and is
 // used from time to time as an initializer.
 // 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.
   // properties depends on the original value.
   if ((rtype0 | rtype1 | rtype2 | rtype3) & RT_KEEP_ORIG) {
   if ((rtype0 | rtype1 | rtype2 | rtype3) & RT_KEEP_ORIG) {
     for (c = 0; c < 4; c++) {
     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);
       G.set_col(c, s);
     }
     }

+ 6 - 6
panda/src/parametrics/hermiteCurve.cxx

@@ -31,7 +31,7 @@
 
 
 TypeHandle HermiteCurve::_type_handle;
 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
 // This is returned occasionally from some of the functions, and is
 // used from time to time as an initializer.
 // used from time to time as an initializer.
 
 
@@ -369,8 +369,8 @@ append_cv(int type, float x, float y, float z) {
   HermiteCurveCV cv;
   HermiteCurveCV cv;
   cv.set_type(type);
   cv.set_type(type);
   cv.set_point(LVecBase3f(x, y, z));
   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);
   _points.push_back(cv);
   if (_points.size()>1) {
   if (_points.size()>1) {
     bool result =
     bool result =
@@ -569,7 +569,7 @@ get_cv_type(int n) const {
 const LVecBase3f &HermiteCurve::
 const LVecBase3f &HermiteCurve::
 get_cv_point(int n) const {
 get_cv_point(int n) const {
   if (n < 0 || n >= (int)_points.size()) {
   if (n < 0 || n >= (int)_points.size()) {
-    return zero;
+    return zerovec_3f;
   }
   }
 
 
   return _points[n]._p;
   return _points[n]._p;
@@ -588,7 +588,7 @@ get_cv_point(int n, LVecBase3f &v) const {
 const LVecBase3f &HermiteCurve::
 const LVecBase3f &HermiteCurve::
 get_cv_in(int n) const {
 get_cv_in(int n) const {
   if (n < 0 || n >= (int)_points.size() || _points[n-1]._type==HC_CUT) {
   if (n < 0 || n >= (int)_points.size() || _points[n-1]._type==HC_CUT) {
-    return zero;
+    return zerovec_3f;
   }
   }
 
 
   return _points[n]._in;
   return _points[n]._in;
@@ -607,7 +607,7 @@ get_cv_in(int n, LVecBase3f &v) const {
 const LVecBase3f &HermiteCurve::
 const LVecBase3f &HermiteCurve::
 get_cv_out(int n) const {
 get_cv_out(int n) const {
   if (n < 0 || n >= (int)_points.size() || _points[n]._type==HC_CUT) {
   if (n < 0 || n >= (int)_points.size() || _points[n]._type==HC_CUT) {
-    return zero;
+    return zerovec_3f;
   }
   }
 
 
   return _points[n]._out;
   return _points[n]._out;

+ 9 - 0
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"
+
+

+ 8 - 0
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"
+
+