SHARE
TWEET

Untitled

fihten1991 Jul 16th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: edterrain4/edterrain/src/roads/ICrossroadImpl4.cpp
  2. ===================================================================
  3. --- edterrain4/edterrain/src/roads/ICrossroadImpl4.cpp  (revision 19403)
  4. +++ edterrain4/edterrain/src/roads/ICrossroadImpl4.cpp  (working copy)
  5. @@ -209,5 +209,25 @@
  6.  
  7.  const edterrain::IRoute* ICrossroadImpl4::getInternalRoute(int32_t firstAnchor, int32_t secondAnchor) const
  8.  {
  9. -   return nullptr;
  10. +   auto& roadNetwork = this->roadNetwork->roadNetwork;
  11. +   auto& crossroad = roadNetwork->crossroads[this->crossroad];
  12. +
  13. +   int32_t firstRoad = crossroad.roads[firstAnchor];
  14. +   int32_t secondRoad = crossroad.roads[secondAnchor];
  15. +   bool reverse = false;
  16. +   int32_t index = crossroad.getRoadConnection(firstRoad, secondRoad, reverse);
  17. +
  18. +   if (index < 0)
  19. +       return nullptr;
  20. +
  21. +   auto& roadConnection = crossroad.roadConnections[index];
  22. +   ed::vector<osg::Vec3d> vertices = roadConnection.vertices;
  23. +
  24. +   for (auto& v : vertices)
  25. +       v = v * osg::Matrixd::inverse(crossroad.pos);
  26. +  
  27. +   landscape4::lRoad* road = new landscape4::lRoad();
  28. +   road->setVerts(vertices);
  29. +
  30. +   return new IRouteImpl4(this->roadNetwork, road, true);
  31.  }
  32. \ No newline at end of file
  33. Index: edterrain4/edterrainUtils/roads/buildAirfield.cpp
  34. ===================================================================
  35. --- edterrain4/edterrainUtils/roads/buildAirfield.cpp   (revision 19403)
  36. +++ edterrain4/edterrainUtils/roads/buildAirfield.cpp   (working copy)
  37. @@ -767,6 +767,11 @@
  38.     linkedData.checkSplineBinding(notifications);
  39.     std::cout << std::endl << std::ok;
  40.  
  41. +   // fit splines to anchors
  42. +   std::cout << "fit splines to anchors ...";
  43. +   linkedData.fitSplinesToAnchors(notifications);
  44. +   std::cout << std::endl << std::ok;
  45. +
  46.     // fitEnds
  47.     std::cout << "fit Ends ...";
  48.     linkedData.fitEnds(notifications);
  49. Index: edterrain5/edterrainUtils/rn5/export-rn5.cpp
  50. ===================================================================
  51. --- edterrain5/edterrainUtils/rn5/export-rn5.cpp    (revision 19403)
  52. +++ edterrain5/edterrainUtils/rn5/export-rn5.cpp    (working copy)
  53. @@ -114,7 +114,6 @@
  54.         edtu::AutoNotifications notifications;
  55.         assets::lLinked linkedData;
  56.         buildLinkedData(scene, linkedData, 1, notifications);
  57. -       linkedData.moveSplineEndsToAnchors();
  58.         saveLinkedDebugDump(linkedData, notifications, "linked-data", true, false);
  59.  
  60.         checkCenterlines(linkedData);
  61. @@ -286,6 +285,11 @@
  62.     linkedData.checkSplineBinding(notifications);
  63.     std::cout << std::endl << std::ok;
  64.    
  65. +   // fit splines to anchors
  66. +   std::cout << "fit splines to anchors ...";
  67. +   linkedData.fitSplinesToAnchors(notifications);
  68. +   std::cout << std::endl << std::ok;
  69. +
  70.     // fitEnds
  71.     std::cout << "fit Ends ...";
  72.     linkedData.fitEnds(notifications);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top