Use different colors for walkable and non-walkable triangles

pull/3169/head
elsid 3 years ago
parent b61140b8ba
commit daff7aba01
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -64,8 +64,8 @@ namespace SceneUtil
const auto normals = calculateNormals(vertices, indices);
const auto texScale = 1.0f / (settings.mCellSize * 10.0f);
duDebugDrawTriMesh(&debugDraw, vertices.data(), static_cast<int>(vertices.size() / 3),
indices.data(), normals.data(), static_cast<int>(indices.size() / 3), nullptr, texScale);
duDebugDrawTriMeshSlope(&debugDraw, vertices.data(), static_cast<int>(vertices.size() / 3),
indices.data(), normals.data(), static_cast<int>(indices.size() / 3), settings.mMaxSlope, texScale);
osg::ref_ptr<osg::Material> material = new osg::Material;
material->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);

Loading…
Cancel
Save