projectPoint method

Vector3 projectPoint(
  1. Vector3 point,
  2. Vector3 result
)

Projects the given point onto the plane. The result is written to the given vector.

Implementation

Vector3 projectPoint(Vector3 point, Vector3 result ) {
	v1.copy( normal ).multiplyScalar( distanceToPoint( point ) );
	result.subVectors( point, v1 );
	return result;
}