Point & Click multi-level map

Looking at the manual and API reference, I see that Plane (or LPlanef, depending on whether you’re using 1.7.2 or 1.8.0, respectively), actually has five constructors, including one default constructor, and one copy constructor.

If you’re providing it with just a single Vec4, then you would seem to be using the copy constructor. Why this uses a Vec4 and not another (L)Plane(f) I’m not sure, but given what I see in the reference I’m guessing that it uses the four elements of the plane equation, A, B, C and D, simply packing those into a Vec4 rather than taking them separately.

Depending on your situation, you may find it more useful to use one of the other constructors, which seem to take one of:

  • Three points
  • The parameters of the plane equation, A, B, C and D, or
  • A normal and a point (in that order)

The API entries for (L)Plane(f): 1.7.2 and 1.8.0

By the way, I subsequently (re-)discovered this thread which gives an alternative to picking by collision. It still uses a plane, but is said in that thread to be likely to perform better than the collision-based version. It includes sample code, I believe.