Dynamic particle property using pointers

  • Mdkar
    7th Jun 2020 Member 0 Permalink

    Ok so I haven't worked on this in a while, but I was really having trouble with implementing it in snapshots. Any ideas on how to do this? I think it would be wise to store the contents of the vectors somewhere else in memory and construct new vectors as needed, but I don't know how to do this. 

     

    Maybe I can deep copy all the vectors to some kind of map every snapshot and re-construct them every time the snapshot was to be rolled back (undo/redo)? How would I go about this?

     

    Btw here is a video (https://drive.google.com/file/d/1yBech8kwdxcdW9JC-3-XyrBZxi8K-e23/view?usp=sharing) of a simple double replacement, precipitation reaction working

    First the salts dissolve in distilled water,
    BaOH2(aq) + MgCl2(aq) --> BaCl2(aq) + MgOH2(s)

    Edited once by Mdkar. Last: 7th Jun 2020