Documentation for module: Graphics
Former-commit-id: 1757c33318443aade1dc38e16d053240d7dc885c
This commit is contained in:
@@ -491,8 +491,8 @@ namespace Nz
|
||||
*
|
||||
* \remark If volume is infinite, IntersectionSide_Intersecting is returned
|
||||
* \remark If volume is null, IntersectionSide_Outside is returned
|
||||
* \remark If enumeration of the volume is not defined in Extend, a NazaraError is thrown and false is returned
|
||||
* \remark If enumeration of the intersection is not defined in IntersectionSide, a NazaraError is thrown and false is returned. This should not never happen for a user of the library
|
||||
* \remark If enumeration of the volume is not defined in Extend, a NazaraError is thrown and IntersectionSide_Outside is returned
|
||||
* \remark If enumeration of the intersection is not defined in IntersectionSide, a NazaraError is thrown and IntersectionSide_Outside is returned. This should not never happen for a user of the library
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -485,7 +485,7 @@ namespace Nz
|
||||
template<typename T>
|
||||
T Sphere<T>::SquaredDistance(const Vector3<T>& point) const
|
||||
{
|
||||
return Vector3f::Distance(point, GetPosition()) - radius * radius;
|
||||
return Vector3f::SquaredDistance(point, GetPosition() + (point - GetPosition()).Normalize() * radius);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user