wall.cpp 916 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /******************************************************************************
  2. *
  3. * Copyright (C) 2020 by
  4. * The Salk Institute for Biological Studies
  5. *
  6. * Use of this source code is governed by an MIT-style
  7. * license that can be found in the LICENSE file or at
  8. * https://opensource.org/licenses/MIT.
  9. *
  10. ******************************************************************************/
  11. #include "api/wall.h"
  12. #include "api/geometry_object.h"
  13. #include "world.h"
  14. #include "partition.h"
  15. #include "geometry.h"
  16. using namespace std;
  17. namespace MCell {
  18. namespace API {
  19. void Wall::set_is_movable(const bool new_is_movable_) {
  20. check_initialization();
  21. is_movable = new_is_movable_;
  22. MCell::Partition& p = world->get_partition(PARTITION_ID_INITIAL);
  23. MCell::Wall& w = p.get_wall(geometry_object->get_partition_wall_index(wall_index));
  24. w.is_movable = new_is_movable_;
  25. }
  26. } // namespace API
  27. } // namespace MCell