36 const void*
ptr(
void)
const{
return &
x;}
41 bool isEqual(
const DtVector3& rhs, T tolerance=std::numeric_limits<T>::min())
const;
111 ,std::numeric_limits<T>::max()
112 ,std::numeric_limits<T>::max());
120 T fInvLength = 1.0f/fLength;
143 return (*
this-rhs).length();
154 return DtVector3<T>(x-rhs.x, y-rhs.y, z-rhs.z);
177 T OneByfScalar = T(1.0)/fScalar;
178 return DtVector3<T>(x*OneByfScalar, y*OneByfScalar, z*OneByfScalar);
184 return x>rhs.
x && y>rhs.
y && z>rhs.
z;
190 return x<rhs.
x && y<rhs.
y && z<rhs.
z;
218 return x*rhs.
x + y*rhs.
y + z*rhs.
z;
231 , (y+rhs.
y)*static_cast<T>(0.5)
232 , (z+rhs.
z)*static_cast<T>(0.5)
241 const T* ptrT =
static_cast<const T*
>(ptr());
256 if( rhs.
x > x ) x = rhs.
x;
257 if( rhs.
y > y ) y = rhs.
y;
258 if( rhs.
z > z ) z = rhs.
z;
263 if( rhs.
x < x ) x = rhs.
x;
264 if( rhs.
y < y ) y = rhs.
y;
265 if( rhs.
z < z ) z = rhs.
z;
298 return this->operator*=(T(1.0)/fScalar);
302 inline std::ostream&
operator <<
305 o <<
"Vector3(" << v.x <<
", " << v.y <<
", " << v.z <<
")";