Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
a9d78600fb

+ 9 - 0
panda/src/egg/eggNameUniquifier.cxx

@@ -22,6 +22,15 @@ EggNameUniquifier() {
   _index = 0;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: EggNameUniquifier::Destructor
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+EggNameUniquifier::
+~EggNameUniquifier() {
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: EggNameUniquifier::clear
 //       Access: Public

+ 1 - 0
panda/src/egg/eggNameUniquifier.h

@@ -79,6 +79,7 @@ class EggNode;
 class EXPCL_PANDAEGG EggNameUniquifier : public EggObject {
 public:
   EggNameUniquifier();
+  ~EggNameUniquifier();
 
   void clear();
 

+ 1 - 3
panda/src/linmath/lmatrix3_src.I

@@ -763,7 +763,7 @@ scale_mat(FLOATTYPE sx, FLOATTYPE sy) {
 //               degrees counterclockwise about the indicated vector.
 ////////////////////////////////////////////////////////////////////
 INLINE_LINMATH FLOATNAME(LMatrix3) FLOATNAME(LMatrix3)::
-rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) &axis,
+rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis,
 	   CoordinateSystem cs) {
   if (cs == CS_default) {
     cs = default_coordinate_system;
@@ -1003,8 +1003,6 @@ operator * (FLOATTYPE scalar) const {
 ////////////////////////////////////////////////////////////////////
 INLINE_LINMATH FLOATNAME(LMatrix3) FLOATNAME(LMatrix3)::
 operator / (FLOATTYPE scalar) const {
-  FLOATNAME(LMatrix3) t;
-
   FLOATTYPE recip_scalar = 1.0/scalar;
   return (*this) * recip_scalar;
 }

+ 1 - 1
panda/src/linmath/lmatrix3_src.h

@@ -117,7 +117,7 @@ PUBLISHED:
   // The following named constructors return 3x3 matrices suitable for
   // scale/rotate transforms in 3-d coordinate space.
   static INLINE_LINMATH FLOATNAME(LMatrix3) rotate_mat(FLOATTYPE angle,
-				      FLOATNAME(LVecBase3) &axis,
+				      FLOATNAME(LVecBase3) axis,
 				      CoordinateSystem cs = CS_default);
   static INLINE_LINMATH FLOATNAME(LMatrix3) scale_mat(const FLOATNAME(LVecBase3) &scale);
   static INLINE_LINMATH FLOATNAME(LMatrix3) scale_mat(FLOATTYPE sx, FLOATTYPE sy, FLOATTYPE sz);

+ 23 - 18
panda/src/linmath/lvector3_src.I

@@ -355,24 +355,29 @@ rfu(FLOATTYPE right_v, FLOATTYPE fwd_v, FLOATTYPE up_v,
   }
   FLOATTYPE vy,vz;
   switch(cs) {
-	  case CS_yup_right:
-	  vz = -fwd_v;
-	  vy = up_v;
-	  break;
-
-	  case CS_yup_left:
-	  vz = fwd_v;
-	  vy = up_v;
-	  break;
-
-	  case CS_zup_right:
-	  vy = fwd_v;
-	  vz = up_v;
-	  break;
-
-	  case CS_zup_left:
-	  vy = -fwd_v;
-	  vz = up_v;
+  case CS_yup_right:
+    vz = -fwd_v;
+    vy = up_v;
+    break;
+    
+  case CS_yup_left:
+    vz = fwd_v;
+    vy = up_v;
+    break;
+    
+  case CS_zup_right:
+    vy = fwd_v;
+    vz = up_v;
+    break;
+    
+  case CS_zup_left:
+    vy = -fwd_v;
+    vz = up_v;
+
+  default:
+    linmath_cat.error()
+      << "Invalid coordinate system!\n";
+    return FLOATNAME(LVector3)(0.0, 0.0, 0.0);
   }
 
  return FLOATNAME(LVector3)(right_v,vy,vz);

+ 0 - 25
panda/src/putil/nameUniquifier.I

@@ -4,31 +4,6 @@
 ////////////////////////////////////////////////////////////////////
 
 
-////////////////////////////////////////////////////////////////////
-//     Function: NameUniquifier::Constructor
-//       Access: Public
-//  Description: Creates a new NameUniquifier.  
-//
-//               The separator string is used to separate the original
-//               name (or supplied prefix) and the generated number
-//               when a name must be generated.
-//
-//               If the original name is empty, the empty string is
-//               used, followed by the generated number.
-////////////////////////////////////////////////////////////////////
-INLINE NameUniquifier::
-NameUniquifier(const string &separator,
-	       const string &empty) :
-  _separator(separator),
-  _empty(empty)
-{
-  _counter = 0;
-
-  if (_empty.empty()) {
-    _empty = _separator;
-  }
-}
-
 ////////////////////////////////////////////////////////////////////
 //     Function: NameUniquifier::add_name
 //       Access: Public

+ 34 - 0
panda/src/putil/nameUniquifier.cxx

@@ -10,6 +10,40 @@
 #include <stdio.h>
 
 
+////////////////////////////////////////////////////////////////////
+//     Function: NameUniquifier::Constructor
+//       Access: Public
+//  Description: Creates a new NameUniquifier.  
+//
+//               The separator string is used to separate the original
+//               name (or supplied prefix) and the generated number
+//               when a name must be generated.
+//
+//               If the original name is empty, the empty string is
+//               used, followed by the generated number.
+////////////////////////////////////////////////////////////////////
+NameUniquifier::
+NameUniquifier(const string &separator,
+	       const string &empty) :
+  _separator(separator),
+  _empty(empty)
+{
+  _counter = 0;
+
+  if (_empty.empty()) {
+    _empty = _separator;
+  }
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: NameUniquifier::Destructor
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+NameUniquifier::
+~NameUniquifier() {
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: NameUniquifier::add_name_body
 //       Access: Private

+ 3 - 2
panda/src/putil/nameUniquifier.h

@@ -21,8 +21,9 @@
 ////////////////////////////////////////////////////////////////////
 class EXPCL_PANDA NameUniquifier {
 public:
-  INLINE NameUniquifier(const string &separator = string(),
-			const string &empty = string());
+  NameUniquifier(const string &separator = string(),
+		 const string &empty = string());
+  ~NameUniquifier();
 
   INLINE string add_name(const string &name);
   INLINE string add_name(const string &name, const string &prefix);