| 259 | } |
| 260 | |
| 261 | static void flattenChunk(SampleArray<PxVec3>& terrainVertices, const PxBounds3& bound, PxReal dataY) |
| 262 | { |
| 263 | PxBounds3 bound1 = bound; |
| 264 | PxReal deltaX = bound1.maximum.x - bound1.minimum.x; |
| 265 | PxReal deltaZ = bound1.maximum.z- bound1.minimum.z; |
| 266 | PxReal delta = deltaX < deltaZ ? deltaX : deltaZ; |
| 267 | bound1.fattenFast(delta/32); |
| 268 | |
| 269 | const PxU32 size = terrainVertices.size(); |
| 270 | |
| 271 | for(PxU32 i = 0; i < size; ++i) |
| 272 | { |
| 273 | if((terrainVertices[i].x <= bound1.maximum.x && terrainVertices[i].x >= bound1.minimum.x) |
| 274 | && (terrainVertices[i].z <= bound1.maximum.z && terrainVertices[i].z >= bound1.minimum.z)) |
| 275 | { |
| 276 | terrainVertices[i].y = dataY; |
| 277 | } |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | void SampleLargeWorld::addCity(SampleArray<PxVec3>& terrainVertices, const PxBounds3& bound, PxCollection& outCollection) |
| 282 | { |
no test coverage detected