mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 20:58:28 +02:00
Check mesh extend before going through triangles
This commit is contained in:
parent
99fd590a90
commit
bda72025af
2 changed files with 5 additions and 1 deletions
|
@ -127,6 +127,10 @@ Extents FBXGeometry::getUnscaledMeshExtents() const {
|
|||
|
||||
// TODO: Move to model::Mesh when Sam's ready
|
||||
bool FBXGeometry::convexHullContains(const glm::vec3& point) const {
|
||||
if (!getUnscaledMeshExtents().containsPoint(point)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto checkEachPrimitive = [=](FBXMesh& mesh, QVector<int> indices, int primitiveSize) -> bool {
|
||||
// Check whether the point is "behind" all the primitives.
|
||||
for (unsigned int j = 0; j < indices.size(); j += primitiveSize) {
|
||||
|
|
Loading…
Reference in a new issue