mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 01:15:36 +02:00
Add missing equality operator to CollisionRegion to fix false cache collisions leading to false negatives
This commit is contained in:
parent
de6d30e160
commit
6be5ac8dee
1 changed files with 8 additions and 0 deletions
|
@ -278,6 +278,14 @@ public:
|
|||
shapeInfo.getType() == SHAPE_TYPE_NONE);
|
||||
}
|
||||
|
||||
bool operator==(const CollisionRegion& other) const {
|
||||
return glm::all(glm::equal(transform.getTranslation(), other.transform.getTranslation())) &&
|
||||
glm::all(glm::equal(transform.getRotation(), other.transform.getRotation())) &&
|
||||
glm::all(glm::equal(transform.getScale(), other.transform.getScale())) &&
|
||||
shapeInfo.getType() == other.shapeInfo.getType() &&
|
||||
modelURL == other.modelURL;
|
||||
}
|
||||
|
||||
bool shouldComputeShapeInfo() const {
|
||||
if (!(shapeInfo.getType() == SHAPE_TYPE_HULL ||
|
||||
(shapeInfo.getType() >= SHAPE_TYPE_COMPOUND &&
|
||||
|
|
Loading…
Reference in a new issue