Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate cache files for each heightmap LOD #3200

Merged
merged 3 commits into from
Mar 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions gazebo/rendering/Heightmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,9 @@ void Heightmap::Load()
{
this->dataPtr->splitTerrain = true;
nTerrains = this->dataPtr->numTerrainSubdivisions;
prefix = terrainDirPath / "gazebo_terrain_cache";
std::string terrainName = "gazebo_terrain_cache" +
std::to_string(this->LOD());
WilliamLewww marked this conversation as resolved.
Show resolved Hide resolved
prefix = terrainDirPath / terrainName.c_str();
}
else
{
Expand All @@ -542,7 +544,8 @@ void Heightmap::Load()
gzmsg << "Large heightmap used with LOD. It will be subdivided into " <<
this->dataPtr->numTerrainSubdivisions << " terrains." << std::endl;
}
prefix = terrainDirPath / "gazebo_terrain";
std::string terrainName = "gazebo_terrain_" + std::to_string(this->LOD());
prefix = terrainDirPath / terrainName.c_str();
}

double sqrtN = sqrt(nTerrains);
Expand Down