code: public boolean contains(Vector3 p) {
  		boolean ans = false;
  		if(this.halfplane || p== null) return false;
  
  		if (isCorner(p)) {
  			return true;
  		}
  
  		PointLinePosition a12 = PointLineTest.pointLineTest(a,b,p);
  		PointLinePosition a23 = PointLineTest.pointLineTest(b,c,p);
  		PointLinePosition a31 = PointLineTest.pointLineTest(c,a,p);
  
  		if ((a12 == PointLinePosition.LEFT && a23 == PointLinePosition.LEFT && a31 == PointLinePosition.LEFT ) ||
  				(a12 == PointLinePosition.RIGHT && a23 == PointLinePosition.RIGHT && a31 == PointLinePosition.RIGHT ) ||
  				(a12 == PointLinePosition.ON_SEGMENT ||a23 == PointLinePosition.ON_SEGMENT ||  a31 == PointLinePosition.ON_SEGMENT)) {
  			ans = true;
  		}
  
  		return ans;
  	}
docs: determinates if this triangle contains the point p.
  @param p the query point
  @return true iff p is not null and is inside this triangle (Note: on boundary is considered inside!!).