浏览代码

*** empty log message ***

David Rose 25 年之前
父节点
当前提交
5523c367d1

+ 15 - 0
panda/src/builder/builderAttribTempl.I

@@ -202,6 +202,21 @@ operator == (const BuilderAttribTempl<VT, NT, TT, CT> &other) const {
   return true;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: BuilderAttribTempl::operator !=
+//       Access: Public
+//  Description: Assigns an ordering to the vertices.  This is used by
+//               the Mesher to group identical vertices.  This assumes
+//               that all vertices in the locus of consideration will
+//               share the same state: with or without normals,
+//               texcoords, etc.
+////////////////////////////////////////////////////////////////////
+template <class VT, class NT, class TT, class CT>
+INLINE bool BuilderAttribTempl<VT, NT, TT, CT>::
+operator != (const BuilderAttribTempl<VT, NT, TT, CT> &other) const {
+  return !operator == (other);
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: BuilderAttribTempl::operator <
 //       Access: Public

+ 1 - 0
panda/src/builder/builderAttribTempl.h

@@ -47,6 +47,7 @@ public:
   INLINE BuilderAttribTempl &set_pixel_size(float s);
 
   INLINE bool operator == (const BuilderAttribTempl &other) const;
+  INLINE bool operator != (const BuilderAttribTempl &other) const;
   INLINE bool operator < (const BuilderAttribTempl &other) const;
 
   INLINE ostream &output(ostream &out) const;

+ 10 - 0
panda/src/builder/builderBucketNode.I

@@ -90,3 +90,13 @@ operator == (const BuilderBucketNode &other) const {
   return !((*_bucket) < (*other._bucket) || 
 	   (*other._bucket) < (*_bucket));
 }	
+  
+////////////////////////////////////////////////////////////////////
+//     Function: BuilderBucketNode::Nonequivalence operator
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+INLINE bool BuilderBucketNode::
+operator != (const BuilderBucketNode &other) const {
+  return !operator == (other);
+}	

+ 1 - 0
panda/src/builder/builderBucketNode.h

@@ -41,6 +41,7 @@ public:
  
   INLINE bool operator < (const BuilderBucketNode &other) const;
   INLINE bool operator == (const BuilderBucketNode &other) const;
+  INLINE bool operator != (const BuilderBucketNode &other) const;
 
   int build(GeomNode *geom_node) const;
  

+ 12 - 3
panda/src/builder/builderTypes.h

@@ -53,6 +53,9 @@ public:
   bool operator == (const BuilderTC &other) const {
     return _v.almost_equal(other._v, nearly_zero);
   }
+  bool operator != (const BuilderTC &other) const {
+    return !operator == (other);
+  }
 
   // The < operator is simply for ordering vectors in a sorted
   // container; it has no useful mathematical meaning.
@@ -88,6 +91,9 @@ public:
   bool operator == (const BuilderV &other) const {
     return _v.almost_equal(other._v, nearly_zero);
   }
+  bool operator != (const BuilderV &other) const {
+    return !operator == (other);
+  }
   bool operator < (const BuilderV &other) const {
     return (_v.compare_to(other._v) < 0);
   }
@@ -120,6 +126,9 @@ public:
   bool operator == (const BuilderN &other) const {
     return _v.almost_equal(other._v, nearly_zero);
   }
+  bool operator != (const BuilderN &other) const {
+    return !operator == (other);
+  }
   bool operator < (const BuilderN &other) const {
     return (_v.compare_to(other._v) < 0);
   }
@@ -149,12 +158,12 @@ public:
     _v = copy._v;
     return *this;
   }
-  bool operator != (const BuilderC &other) const {
-    return !(*this == other);
-  }
   bool operator == (const BuilderC &other) const {
     return _v.almost_equal(other._v, nearly_zero);
   }
+  bool operator != (const BuilderC &other) const {
+    return !(*this == other);
+  }
   bool operator < (const BuilderC &other) const {
     return (_v.compare_to(other._v) < 0);
   }

+ 15 - 0
panda/src/builder/builderVertexTempl.I

@@ -235,6 +235,21 @@ operator == (const BuilderVertexTempl<VT, NT, TT, CT> &other) const {
   return BuilderAttribTempl<VT, NT, TT, CT>::operator == (other);
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: BuilderVertexTempl::operator !=
+//       Access: Public
+//  Description: Assigns an ordering to the vertices.  This is used by
+//               the Mesher to group identical vertices.  This assumes
+//               that all vertices in the locus of consideration will
+//               share the same state: with or without normals,
+//               texcoords, etc.
+////////////////////////////////////////////////////////////////////
+template <class VT, class NT, class TT, class CT>
+INLINE bool BuilderVertexTempl<VT, NT, TT, CT>::
+operator != (const BuilderVertexTempl<VT, NT, TT, CT> &other) const {
+  return !operator == (other);
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: BuilderVertexTempl::operator <
 //       Access: Public

+ 1 - 0
panda/src/builder/builderVertexTempl.h

@@ -52,6 +52,7 @@ public:
   INLINE BuilderVertexTempl &set_pixel_size(float s);
 
   bool operator == (const BuilderVertexTempl &other) const;
+  INLINE bool operator != (const BuilderVertexTempl &other) const;
   bool operator < (const BuilderVertexTempl &other) const;
 
   ostream &output(ostream &out) const;

+ 6 - 0
panda/src/builder/mesherEdge.I

@@ -47,6 +47,12 @@ operator == (const MesherEdge &other) const {
   return _a == other._a && _b == other._b;
 }
   
+template <class PrimType>
+INLINE bool MesherEdge<PrimType>::
+operator != (const MesherEdge &other) const {
+  return !operator == (other);
+}
+  
 template <class PrimType>
 INLINE bool MesherEdge<PrimType>::
 operator < (const MesherEdge &other) const {

+ 1 - 0
panda/src/builder/mesherEdge.h

@@ -37,6 +37,7 @@ public:
   INLINE MesherEdge *common_ptr();
 
   INLINE bool operator == (const MesherEdge &other) const;
+  INLINE bool operator != (const MesherEdge &other) const;
   INLINE bool operator < (const MesherEdge &other) const;
 
   INLINE float compute_length(const BuilderBucket &bucket) const;

+ 5 - 0
panda/src/builder/mesherFanMaker.I

@@ -16,6 +16,11 @@ operator < (const MesherFanMaker &other) const {
   return _edges.front() < other._edges.front();
 }
 
+template <class PrimType>
+INLINE bool MesherFanMaker<PrimType>::
+operator != (const MesherFanMaker &other) const {
+  return !operator == (other);
+}
 
 template <class PrimType>
 INLINE bool MesherFanMaker<PrimType>::

+ 1 - 0
panda/src/builder/mesherFanMaker.h

@@ -39,6 +39,7 @@ public:
   MesherFanMaker(const Vertex *vertex, Strip *tri, Mesher *mesher);
 
   INLINE bool operator < (const MesherFanMaker &other) const;
+  INLINE bool operator != (const MesherFanMaker &other) const;
   INLINE bool operator == (const MesherFanMaker &other) const;
 
   INLINE bool is_empty() const;

+ 11 - 0
panda/src/builder/mesherStrip.I

@@ -149,6 +149,17 @@ operator == (const MesherStrip &other) const {
   return this == &other;
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: MesherStrip::operator !=
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+template <class PrimType>
+INLINE bool MesherStrip<PrimType>::
+operator != (const MesherStrip &other) const {
+  return !operator == (other);
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: MesherStrip::Constructor
 //       Access: Public

+ 1 - 0
panda/src/builder/mesherStrip.h

@@ -93,6 +93,7 @@ public:
 
   // ptr equality
   INLINE bool operator == (const MesherStrip &other) const;
+  INLINE bool operator != (const MesherStrip &other) const;
 
   bool pick_mate(const MesherStrip &a_strip, const MesherStrip &b_strip,
 		 const Edge &a_edge, const Edge &b_edge,

+ 11 - 0
panda/src/egg/eggMorph.I

@@ -64,6 +64,17 @@ operator == (const EggMorph<Parameter> &other) const {
   return get_name() == other.get_name();
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: EggMorph::Inequality operator
+//       Access: Public
+//  Description: 
+////////////////////////////////////////////////////////////////////
+template<class Parameter>
+INLINE bool EggMorph<Parameter>::
+operator != (const EggMorph<Parameter> &other) const {
+  return !operator == (other);
+}
+
 
 ////////////////////////////////////////////////////////////////////
 //     Function: EggMorphVertex output operator

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

@@ -29,6 +29,7 @@ public:
 
   INLINE bool operator < (const EggMorph<Parameter> &other) const;
   INLINE bool operator == (const EggMorph<Parameter> &other) const;
+  INLINE bool operator != (const EggMorph<Parameter> &other) const;
 
 private:
   Parameter _offset;