Added a NormalizedDirection method

This commit is contained in:
Paolo Cignoni 2012-05-05 14:54:45 +00:00
parent 5dbe87d368
commit 7537b20933
1 changed files with 6 additions and 4 deletions

View File

@ -115,6 +115,8 @@ public:
{ return ( _p0 + _p1) / ScalarType(2.0) ; }
inline PointType Direction( ) const
{ return ( _p1 - _p0) ; }
inline PointType NormalizedDirection( ) const
{ return ( _p1 - _p0).Normalize() ; }
/// return the bounding box
inline Box3<ScalarType> BBox( ) const
{ Box3<ScalarType> t;