I am trying to decide how to store a 3 dimensional set of data. Each point in the set contains structure of information about that point.
Facts about the 3d set: The majority of the outside points will be empty. The significant points will be an irregular shape. There is a path between any 2 significant points.
I will want the size of the space to be determined by the max/min points of each dimension (there must be at least one significant point on the outermost layer for it to be kept)
What I need to do with these points (a connection is 2 significant points that are cardinally adjacent):
Structures I have considered:
Are there other structures that would work better for me? Are there other reasons to choose one of the aforementioned structures over something else?
If you happen to know anything about minecraft forge development for 1.8.9. I am trying to make a dynamic item model based on an items nbt. Feel free to look at the code I currently have here .
I decided on a hashmap using a string representation of the coordinate as the key ("x,y,z") and I used an interface as the object. This setup made it fairly easy to store the structure out to json gives me easy access to all points because I can generate the key for any point during run time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.