Changed parameter name (nothing relevant)
Former-commit-id: 3b0355d998300b57ab83562f9b107925e4be6c29
This commit is contained in:
parent
5cc0ce4758
commit
d695bb02e8
|
|
@ -17,7 +17,7 @@ class NzSphere
|
|||
NzSphere() = default;
|
||||
NzSphere(T X, T Y, T Z, T Radius);
|
||||
//NzSphere(const NzCircle<T>& circle);
|
||||
NzSphere(const NzVector3<T>& pos, T Radius);
|
||||
NzSphere(const NzVector3<T>& center, T Radius);
|
||||
NzSphere(const T sphere[4]);
|
||||
template<typename U> explicit NzSphere(const NzSphere<U>& sphere);
|
||||
NzSphere(const NzSphere& sphere) = default;
|
||||
|
|
@ -47,7 +47,7 @@ class NzSphere
|
|||
NzSphere& Set(T X, T Y, T Z, T Radius);
|
||||
//NzSphere& Set(const NzCircle<T>& rect);
|
||||
NzSphere& Set(const NzSphere& sphere);
|
||||
NzSphere& Set(const NzVector3<T>& pos, T Radius);
|
||||
NzSphere& Set(const NzVector3<T>& center, T Radius);
|
||||
NzSphere& Set(const T sphere[4]);
|
||||
template<typename U> NzSphere& Set(const NzSphere<U>& sphere);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ NzSphere<T>::NzSphere(const NzCircle<T>& circle)
|
|||
}
|
||||
*/
|
||||
template<typename T>
|
||||
NzSphere<T>::NzSphere(const NzVector3<T>& pos, T Radius)
|
||||
NzSphere<T>::NzSphere(const NzVector3<T>& center, T Radius)
|
||||
{
|
||||
Set(pos, Radius);
|
||||
Set(center, Radius);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
@ -48,7 +48,7 @@ bool NzSphere<T>::Contains(T X, T Y, T Z) const
|
|||
}
|
||||
/*
|
||||
template<typename T>
|
||||
bool NzSphere<T>::Contains(const NzCube<T>& point) const
|
||||
bool NzSphere<T>::Contains(const NzCube<T>& cube) const
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
|
@ -154,11 +154,11 @@ NzSphere<T>& NzSphere<T>::Set(T X, T Y, T Z, T Radius)
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
NzSphere<T>& NzSphere<T>::Set(const NzVector3<T>& pos, T Radius)
|
||||
NzSphere<T>& NzSphere<T>::Set(const NzVector3<T>& center, T Radius)
|
||||
{
|
||||
x = pos.x;
|
||||
y = pos.y;
|
||||
z = pos.z;
|
||||
x = center.x;
|
||||
y = center.y;
|
||||
z = center.z;
|
||||
radius = Radius;
|
||||
|
||||
return *this;
|
||||
|
|
@ -210,7 +210,7 @@ template<typename T>
|
|||
T NzSphere<T>::SquaredDistance(T X, T Y, T Z) const
|
||||
{
|
||||
NzVector3<T> distance(X-x, Y-y, Z-z);
|
||||
return radius*radius - distance.SquaredLength();
|
||||
return distance.SquaredLength() - radius*radius;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
|
|||
Loading…
Reference in New Issue