Hollowing: allow to place drain holes on the inner surface of a hollowed cavity

Drain holes are not allowed to be placed on its own inner surface. This was recently (0e3ebb3)
done by forcing invalidation of the slaposDrillHoles, which also invalidates and therefore
hides the drilled mesh. However, that also hides the hollowed mesh and it is not possible
to place holes inside the cavity.

This change does not dump the drilled mesh, but checks that no raycast hit ends up in a hole.
This commit is contained in:
Lukas Matena 2020-02-06 17:53:03 +01:00
parent ef32cd6059
commit 665bc9e960
6 changed files with 38 additions and 18 deletions

View file

@ -34,6 +34,9 @@ struct DrainHole
DrainHole(Vec3f p, Vec3f n, float r, float h)
: pos(p), normal(n), radius(r), height(h)
{}
DrainHole(const DrainHole& rhs) :
DrainHole(rhs.pos, rhs.normal, rhs.radius, rhs.height) {}
bool operator==(const DrainHole &sp) const;
@ -50,6 +53,8 @@ struct DrainHole
{
ar(pos, normal, radius, height);
}
static constexpr size_t steps = 32;
};
using DrainHoles = std::vector<DrainHole>;