Implement AABB::Intersects(Triangle)

This commit is contained in:
2024-03-19 18:42:41 -04:00
parent d60c71373b
commit 212c1d3bc4
4 changed files with 150 additions and 2 deletions

View File

@@ -143,5 +143,7 @@ namespace J3ML::Geometry
void Enclose(const LineSegment &lineSegment);
void Enclose(const OBB &obb);
bool TestAxis(Vector3 axis, Vector3 v0, Vector3 v1, Vector3 v2) const;
};
}

View File

@@ -8,5 +8,10 @@ namespace J3ML::Geometry
Vector3 V0;
Vector3 V1;
Vector3 V2;
bool Intersects(const AABB& aabb) const
{
return aabb.Intersects(*this);
}
};
}