I'm working on a simple in-browser 3D model constructor using THREE.js. The user picks a plane body, and adds wings, cockpit, tail etc of their choice, choosing from multiple options. I need to be able to define relationships between many bodies and many add-ons, and of course I don't want to manually have to define the position/rotation of each combination of parts. Therefore, I want to be able to define a set of 'snap points' on the body, places where certain components may be inserted, and to define a matching set of points on the add-on parts, basically matching the two in software to position the add-ons correctly.
I though of defining a triangle of 3 points, as that would lock in all 3 degrees of freedom. If I make the order important, it will even prevent the object from "flipping" across the plane defined by the three points. Here's an illustration:
I'm thinking of making a "dummy" for the 3D designers to use to get the coordinates of the points, but once case I can see this failing is when the two triangles don't exactly correspond to each other. Should I simply set in stone that the points must form an equilateral triangle of side length 10 units for example, or is there another way I could do the maths from triangles which do not completely match?
Perhaps there's another, more standard way to do what I want?