AMAPstudio

User Tools


The Capsis training online

Back to the table of contents

Solution: 13. Add a geometrical plot made of square cells

Try to work with the helping elements before looking at the solution…

Helping elements

  • Reminder: the project initialisation is done in two methods called in sequence: TraInitialParameters.buildInitScene(), then TraModel.initializeModel ()
  • have a closer look in buildInitScene ()
  • you will find a call to a loadInitStand () method
  • this method (in TraModel) uses a file loader feature (TraInventoryLoader) in two passes:
    • first pass in the constructor, relies on the superclass to turn the text file into a list of so called Records, not what we are looking for here
    • second pass in load () to interpret the records and create the trees to be returned in the initial scene…
  • …search in load(), something could be activated

A possible solution

An extract of TraInventoryLoader.load () With the expected lines uncommented A possible result in the 2D Viewer

Back to the table of contents

solution_of_13_add_a_geometrical_plot_made_of_square_cells.txt · Last modified: 2021/02/02 12:01 by coligny