Browse Source

Build errors

Ashwini 5 years ago
parent
commit
4e9b85e5bb

+ 14 - 1
panda/src/navigation/config_navigation.cxx

@@ -1,4 +1,15 @@
-
+/**
+ * PANDA 3D SOFTWARE
+ * Copyright (c) Carnegie Mellon University.  All rights reserved.
+ *
+ * All use of this software is subject to the terms of the revised BSD
+ * license.  You should have received a copy of this license along
+ * with this source code in a file named "LICENSE."
+ *
+ * @file config_navigation.cxx
+ * @author ashwini
+ * @date 2020-060-21
+ */
 
 
 #include "config_navigation.h"
 #include "config_navigation.h"
 
 
@@ -31,6 +42,8 @@ ConfigVariableInt navigation_sample_config_variable
  */
  */
 void
 void
 init_libnavigation() {
 init_libnavigation() {
+  NavMesh::init_type();
+  NavMeshNode::init_type();
   static bool initialized = false;
   static bool initialized = false;
   if (initialized) {
   if (initialized) {
     return;
     return;

+ 12 - 0
panda/src/navigation/config_navigation.h

@@ -1,3 +1,15 @@
+/**
+ * PANDA 3D SOFTWARE
+ * Copyright (c) Carnegie Mellon University.  All rights reserved.
+ *
+ * All use of this software is subject to the terms of the revised BSD
+ * license.  You should have received a copy of this license along
+ * with this source code in a file named "LICENSE."
+ *
+ * @file config_navigation.h
+ * @author ashwini
+ * @date 2020-060-21
+ */
 
 
 #ifndef CONFIG_NAVIGATION_H
 #ifndef CONFIG_NAVIGATION_H
 #define CONFIG_NAVIGATION_H
 #define CONFIG_NAVIGATION_H

+ 3 - 1
panda/src/navigation/navMesh.cxx

@@ -6,7 +6,7 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file movieAudio.h
+ * @file navMesh.cxx
  * @author ashwini
  * @author ashwini
  * @date 2020-060-21
  * @date 2020-060-21
  */
  */
@@ -16,6 +16,8 @@
 #include "geom.h"
 #include "geom.h"
 #include "geomTrifans.h"
 #include "geomTrifans.h"
 
 
+TypedWritableReferenceCount NavMesh::_type_handle;
+
 NavMesh::NavMesh() {
 NavMesh::NavMesh() {
 
 
 }
 }

+ 19 - 2
panda/src/navigation/navMesh.h

@@ -6,7 +6,7 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file movieAudio.h
+ * @file navMesh.h
  * @author ashwini
  * @author ashwini
  * @date 2020-060-21
  * @date 2020-060-21
  */
  */
@@ -17,7 +17,7 @@
 
 
 #include "Recast.h"
 #include "Recast.h"
 #include "DetourNavMesh.h"
 #include "DetourNavMesh.h"
-#include "pandaFramework.h"
+#include "typedWritableReferenceCount.h"
 
 
 class NavMesh: public TypedWritableReferenceCount
 class NavMesh: public TypedWritableReferenceCount
 {
 {
@@ -33,6 +33,23 @@ public:
   
   
   ~NavMesh();
   ~NavMesh();
   
   
+
+public:
+  static TypeHandle get_class_type() {
+    return _type_handle;
+  }
+  static void init_type() {
+    TypedWritableReferenceCount::init_type();
+    register_type(_type_handle, "NavMesh",
+      TypedWritableReferenceCount::get_class_type());
+  }
+  virtual TypeHandle get_type() const {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() { init_type(); return get_class_type(); }
+
+private:
+  static TypeHandle _type_handle;
 };
 };
 
 
 #endif // NAVMESH_H
 #endif // NAVMESH_H

+ 3 - 4
panda/src/navigation/navMeshBuilder.cxx

@@ -6,7 +6,7 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file movieAudio.h
+ * @file navMeshBuilder.cxx
  * @author ashwini
  * @author ashwini
  * @date 2020-060-21
  * @date 2020-060-21
  */
  */
@@ -16,7 +16,6 @@
 #include "DetourNavMesh.h"
 #include "DetourNavMesh.h"
 #include "DetourNavMeshQuery.h"
 #include "DetourNavMeshQuery.h"
 #include "DetourNavMeshBuilder.h"
 #include "DetourNavMeshBuilder.h"
-#include "DetourCrowd.h"
 
 
 #define _USE_MATH_DEFINES
 #define _USE_MATH_DEFINES
 #include <math.h>
 #include <math.h>
@@ -59,7 +58,7 @@ NavMeshBuilder::NavMeshBuilder() :
   _ctx = new rcContext;
   _ctx = new rcContext;
   reset_common_settings();
   reset_common_settings();
   _nav_query = dtAllocNavMeshQuery();
   _nav_query = dtAllocNavMeshQuery();
-  _crowd = dtAllocCrowd();
+  //_crowd = dtAllocCrowd();
 }
 }
 
 
 NavMeshBuilder::~NavMeshBuilder() {
 NavMeshBuilder::~NavMeshBuilder() {
@@ -68,7 +67,7 @@ NavMeshBuilder::~NavMeshBuilder() {
   delete[] _tris;
   delete[] _tris;
 
 
   dtFreeNavMeshQuery(_nav_query);
   dtFreeNavMeshQuery(_nav_query);
-  dtFreeCrowd(_crowd);
+  //dtFreeCrowd(_crowd);
 
 
   cleanup();
   cleanup();
 
 

+ 1 - 1
panda/src/navigation/navMeshBuilder.h

@@ -6,7 +6,7 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file movieAudio.h
+ * @file navMeshBuilder.h
  * @author ashwini
  * @author ashwini
  * @date 2020-060-21
  * @date 2020-060-21
  */
  */

+ 2 - 1
panda/src/navigation/navMeshNode.cxx

@@ -6,7 +6,7 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file movieAudio.h
+ * @file navMeshNode.cxx
  * @author ashwini
  * @author ashwini
  * @date 2020-060-21
  * @date 2020-060-21
  */
  */
@@ -14,6 +14,7 @@
 
 
 #include "navMeshNode.h"
 #include "navMeshNode.h"
 
 
+TypeHandle NavMeshNode::_type_handle;
 
 
 NavMeshNode::NavMeshNode(const std::string &name, PT(NavMesh) nav_mesh):
 NavMeshNode::NavMeshNode(const std::string &name, PT(NavMesh) nav_mesh):
   PandaNode(name)
   PandaNode(name)

+ 20 - 1
panda/src/navigation/navMeshNode.h

@@ -6,7 +6,7 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file movieAudio.h
+ * @file navMeshNode.h
  * @author ashwini
  * @author ashwini
  * @date 2020-060-21
  * @date 2020-060-21
  */
  */
@@ -31,6 +31,25 @@ private:
 public:
 public:
   
   
   ~NavMeshNode();
   ~NavMeshNode();
+
+public:
+  static TypeHandle get_class_type() {
+    return _type_handle;
+  }
+  static void init_type() {
+    PandaNode::init_type();
+    register_type(_type_handle, "NavMeshNode",
+      PandaNode::get_class_type());
+  }
+  virtual TypeHandle get_type() const {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() { init_type(); return get_class_type(); }
+
+private:
+  static TypeHandle _type_handle;
+
+
 };
 };
 
 
 #endif // NAVMESHNODE_H
 #endif // NAVMESHNODE_H

+ 1 - 1
panda/src/navigation/navMeshQuery.cxx

@@ -6,7 +6,7 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file movieAudio.h
+ * @file navMeshQuery.cxx
  * @author ashwini
  * @author ashwini
  * @date 2020-060-21
  * @date 2020-060-21
  */
  */

+ 1 - 1
panda/src/navigation/navMeshQuery.h

@@ -6,7 +6,7 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file movieAudio.h
+ * @file navMeshQuery.h
  * @author ashwini
  * @author ashwini
  * @date 2020-060-21
  * @date 2020-060-21
  */
  */