I’m about to embark on a project which is a very very simple CAD type system. Think Sketchup but very very limited.
Never used babylon.js before, and I’m unsure about where to put the ‘source of truth’ for object coordinates.
-
Put all coordinates in a single completely babylon.js agnostic data structure. (possibly ref object x,y,z positions directly into this data structure). This is basically the naked position database.
-
But all babylon.js meshes in a data structure so I know where everything can be accessed (is this available already in babylon.js?). This is a mesh database. To search coordinates I’d have to loop over objects and look at their coordinates.
-
suggestions welcome
I’m not sure but I think the most common actions I’ll be taking is searching for object positions within a region.
I have a feeling that both ways are doable but one will be hugely more inefficient than the others.