Added Box::GetSquaredBoundingSphere
Former-commit-id: 12ecb5d84f44e39ddacb96b83a897f618337c2e1
This commit is contained in:
parent
84ebd6043c
commit
efd6185f56
|
|
@ -47,6 +47,7 @@ class NzBox
|
|||
NzVector3<T> GetPosition() const;
|
||||
NzVector3<T> GetPositiveVertex(const NzVector3<T>& normal) const;
|
||||
T GetRadius() const;
|
||||
NzSphere<T> GetSquaredBoundingSphere() const;
|
||||
T GetSquaredRadius() const;
|
||||
|
||||
bool Intersect(const NzBox& box, NzBox* intersection = nullptr) const;
|
||||
|
|
|
|||
|
|
@ -227,6 +227,12 @@ T NzBox<T>::GetRadius() const
|
|||
return std::sqrt(GetSquaredRadius());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzSphere<T> NzBox<T>::GetSquaredBoundingSphere() const
|
||||
{
|
||||
return NzSphere<T>(GetCenter(), GetSquaredRadius());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T NzBox<T>::GetSquaredRadius() const
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue