48 using namespace vrender;
52 setXYZ(u[0],u[1],u[2],normalization);
87 return u[0]*v[0] + u[1]*v[1] + u[2]*v[2];
92 return u[0]*v[0] + u[1]*v[1] + u[2]*v[2];
156 if ( normalization ) normalize();
173 std::ostream& operator<<(std::ostream& out,
const NVector3& u)
175 out << u[0] <<
" " << u[1] <<
" " << u[2];
183 void NVector3::normalize()
185 double n = _n[0]*_n[0]+_n[1]*_n[1]+_n[2]*_n[2] ;
194 throw std::runtime_error(
"Attempt to normalize a null 3D vector.") ;