I am trying to configure the position of a THREE.plane for localClipping, and Im finding it a little unintuitive. I had a thought, is it possible to create some planeGeometry, manipulate it, and convert its position and orientation to the create a THREE.plane in its place?
This would be useful for configuring the position of a clipping planes.
You want to set a
THREE.Plane
from aMesh
having aPlaneGeometry
, and you want to take into consideration the mesh'sposition
andquaternion
(orrotation
). In other words, you want theTHREE.Plane
to align with the planarMesh
.The easiest way to do that is to use
plane.setFromNormalAndCoplanarPoint()
.The normal is the normal to the plane mesh after rotation. The coplanar point is any point in the plane mesh; the
position
will do.three.js r.96