Browse Source

renamed RC_MESH_NULL_IDX

Ashwini Jha 5 years ago
parent
commit
fc2cadf4a4

+ 7 - 7
panda/src/navigation/navMesh.cxx

@@ -76,7 +76,7 @@ NavMesh::NavMesh(NavMeshParams mesh_params):
   _params.ch = mesh_params.ch;
   _params.buildBvTree = mesh_params.build_bv_tree;
   
-  RC_MESH_NULL_IDX = mesh_params.RC_MESH_NULL_IDX;
+  border_index = mesh_params.border_index;
   
   init_nav_mesh();
 }
@@ -159,10 +159,10 @@ PT(GeomNode) NavMesh::draw_nav_mesh_geom() {
     // Iterate the vertices.
     //unsigned short vi[3];  // The vertex indices.
     for (int j = 0; j < nvp; ++j) {
-      if (p[j] == RC_MESH_NULL_IDX) {
+      if (p[j] == border_index) {
         break;// End of vertices.
       }
-      if (p[j + nvp] == RC_MESH_NULL_IDX) {
+      if (p[j + nvp] == border_index) {
         prim->add_vertex(p[j]);
         // The edge beginning with this vertex is a solid border.
       }
@@ -259,8 +259,8 @@ write_datagram(BamWriter *manager, Datagram &dg) {
     dg.add_uint8(_params.detailTris[i]);
   }
 
-  //RC_MESH_NULL_IDX
-  dg.add_int32(RC_MESH_NULL_IDX);
+  //border_index
+  dg.add_int32(border_index);
 
 }
 
@@ -348,8 +348,8 @@ fillin(DatagramIterator &scan, BamReader *manager) {
     detail_tris[i] = scan.get_uint8();
   }
 
-  //RC_MESH_NULL_IDX
-  RC_MESH_NULL_IDX = scan.get_int32();
+  //border_index
+  border_index = scan.get_int32();
 
   memset(&(_params), 0, sizeof(_params));
 

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

@@ -44,7 +44,7 @@ PUBLISHED:
   unsigned int *detail_meshes;  // size: poly_count * 4
   float *detail_verts;          // size: detail_vert_count * 3
   unsigned char *detail_tris;   // size: detail_tri_count * 4
-  int RC_MESH_NULL_IDX = 65535;
+  int border_index = 65535;
   int input_model_coordinate_system = 0;
 
 };
@@ -70,7 +70,7 @@ private:
   LMatrix4 mat_from_z = LMatrix4::convert_mat(CS_zup_right, CS_default);
   LMatrix4 mat_to_y = LMatrix4::convert_mat(CS_default, CS_yup_right);
   LMatrix4 mat_to_z = LMatrix4::convert_mat(CS_default, CS_zup_right);
-  int RC_MESH_NULL_IDX;
+  int border_index;
   
 public:
   bool init_nav_mesh();

+ 1 - 1
panda/src/navmeshgen/navMeshBuilder.cxx

@@ -699,7 +699,7 @@ PT(NavMesh) NavMeshBuilder::build() {
     mesh_params.ch = _cfg.ch;
     mesh_params.build_bv_tree = true;
 
-    mesh_params.RC_MESH_NULL_IDX = RC_MESH_NULL_IDX;
+    mesh_params.border_index = RC_MESH_NULL_IDX;
     
     _nav_mesh_obj = new NavMesh(mesh_params);