mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 15:33:10 +02:00
add matches()
This commit is contained in:
parent
07f64ac639
commit
17e26b2d42
2 changed files with 17 additions and 0 deletions
|
@ -224,4 +224,17 @@ int ViewFrustum::boxInFrustum(const AABox& box) const {
|
|||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
bool ViewFrustum::matches(const ViewFrustum& compareTo) const {
|
||||
return compareTo._position == _position &&
|
||||
compareTo._direction == _direction &&
|
||||
compareTo._up == _up &&
|
||||
compareTo._right == _right &&
|
||||
compareTo._fieldOfView == _fieldOfView &&
|
||||
compareTo._aspectRatio == _aspectRatio &&
|
||||
compareTo._nearClip == _nearClip &&
|
||||
compareTo._farClip == _farClip;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -98,6 +98,10 @@ public:
|
|||
int sphereInFrustum(const glm::vec3& center, float radius) const;
|
||||
int boxInFrustum(const AABox& box) const;
|
||||
|
||||
// some frustum comparisons
|
||||
bool matches(const ViewFrustum& compareTo) const;
|
||||
bool matches(const ViewFrustum* compareTo) const { return matches(*compareTo); };
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue