public Plane fromPoints ( IVector3 p1 , IVector3 p2 , IVector3 p3 ) { // compute the normal by taking the cross product of the two vectors formed p2 . subtract ( p1 , _v1 ) ; p3 . subtract ( p1 , _v2 ) ; _v1 . cross ( _v2 , _normal ) . normalizeLocal ( ) ; // use the first point to determine the constant constant = - _normal . dot ( p1 ) ; return this ; }
Sets this plane based on the three points provided .