<p dir="auto">It would be useful to have a definitive example of cleaning up objects/scenes/mesh/geometry and any etc's. This would be useful for those that want to carry out changes  dynamically by recreating a mesh.</p>
<p dir="auto">Please also show when and how any reuse of a structure might be more appropiate. As newbie I'm not sure what is meant by phrases like "reusing" a geometry.</p>
<p dir="auto">I think ThreeJS is missing a Plane class.  Right now we are using a Vector4 as the plane class, but generally it is considered to be a separate class as the operations on a Vector4 are generally quite different than the operations on a Plane.</p>
<p dir="auto">For example, there is a lot of special case code in Frustum.js where it needs to calculate distance to a point from a plane, but it doesn't use a member method but rather it includes the whole plane/point distance equation.</p>
<p dir="auto">Having a Plane class will simplify the code for Frustum.js and make it more reusable.  The methods I propose having on the Plane class are as follows:</p>
<ul dir="auto">
<li>Scalar distanceToPoint( point as Vector3 )</li>
<li>Scalar distanceToSphere( sphere as Sphere ) // see proposal for sphere class in issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="8828431" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/2708" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/2708/hovercard" href="https://github.com/mrdoob/three.js/issues/2708">#2708</a></li>
<li>Vector3 intersectLine( start as Vector3, end as Vector3 ) // return intersection point, returns null if no intersection</li>
<li>void transform( transform as Matrix4 ) // transform in place</li>
<li>Vector3 reflectPoint( point as Vector3 )</li>
<li>Vector3 reflectVector( vector as Vector3 )</li>
<li>void flip() // flip in place</li>
</ul>
<p dir="auto">It will also have constructors that take either:</p>
<ul dir="auto">
<li>normal, distance</li>
<li>point, normal</li>
<li>point1, point2, point3 // coplanar points.  Degenerate coincident or colinear points would throw error.</li>
</ul>
<p dir="auto">Members properties would be:</p>
<ul dir="auto">
<li>normal (Vector3)</li>
<li>distance (Scalar), which could also be called constant</li>
</ul>
<p dir="auto">Let me know if I can contribute this.</p>
<p dir="auto">I can also modify the Frustum class to use this instead of its Vector4-based representation.</p>