@ObjVer.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class ObjVer
  4. {
  5. enum FLAG // !! these enums are saved !!
  6. {
  7. REMOVED =1<<0,
  8. OVR_ACCESS =1<<1,
  9. OVR_PATH =1<<2,
  10. TERRAIN =1<<3,
  11. PATH_SHIFT = 4,
  12. PATH_MASK = 1|2, // use 2 bits for mask to store up to 4 path modes
  13. OVR_MESH_VARIATION=1<<6,
  14. };
  15. VecI2 area_xy ; // in which area the object is located (helper used to quickly locate the area and load object data)
  16. SmallMatrix matrix; // object matrix (helper used to check if object needs to be stored as Terrain Mesh split into multiple areas)
  17. UID elm_obj_id ; // elm.id of the ELM_OBJ project element that this object is based on (helper used to check if object needs to be stored as Terrain Mesh split into multiple areas)
  18. uint mesh_variation_id ; // mesh variation id
  19. byte flag ; // FLAG
  20. // get / set
  21. bool removed ( )C; // if object is removed
  22. bool ovrPath ( )C;
  23. bool meshVarOvr( )C;
  24. bool terrain (Project &proj)C;
  25. OBJ_PATH path (Project &proj)C;
  26. OBJ_PATH pathSelf ( )C; // get path settings of self (don't check bases)
  27. bool set(C ObjData &obj, C VecI2 &area_xy); // return true if any member was changed
  28. // io
  29. bool save(File &f)C;
  30. bool load(File &f);
  31. public:
  32. ObjVer();
  33. };
  34. /******************************************************************************/
  35. /******************************************************************************/
  36. /******************************************************************************/