Browse Source

Forgot bool operator for OdeGeom

rdb 16 years ago
parent
commit
435805081d
2 changed files with 6 additions and 0 deletions
  1. 5 0
      panda/src/ode/odeGeom.cxx
  2. 1 0
      panda/src/ode/odeGeom.h

+ 5 - 0
panda/src/ode/odeGeom.cxx

@@ -191,3 +191,8 @@ convert_to_quad_tree_space() const {
   return OdeQuadTreeSpace((dSpaceID)_id);
 }
 
+OdeGeom::
+operator bool () const {
+  return (_id != NULL);
+}
+

+ 1 - 0
panda/src/ode/odeGeom.h

@@ -120,6 +120,7 @@ PUBLISHED:
   OdeSpace get_space() const;
 
   virtual void write(ostream &out = cout, unsigned int indent=0) const;
+  operator bool () const;
   INLINE int compare_to(const OdeGeom &other) const;
 
   OdeBoxGeom convert_to_box() const;