diff options
author | AndreaCatania <info@andreacatania.com> | 2017-12-28 16:13:45 +0100 |
---|---|---|
committer | AndreaCatania <info@andreacatania.com> | 2017-12-28 16:13:45 +0100 |
commit | 5a15e6e75cad4f9051149b8330f3493870899ba5 (patch) | |
tree | 2680627dd70e64373bd9cc1dc26460feb2741fd5 /modules/gridmap/grid_map.h | |
parent | bcf684f9d7a9e983bf4bc93ef037f05905d74b23 (diff) |
Added layer and mask in the gridmap node
Diffstat (limited to 'modules/gridmap/grid_map.h')
-rw-r--r-- | modules/gridmap/grid_map.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h index 241ac7a434..3de57b482e 100644 --- a/modules/gridmap/grid_map.h +++ b/modules/gridmap/grid_map.h @@ -136,6 +136,9 @@ class GridMap : public Spatial { OctantKey() { key = 0; } }; + uint32_t collision_layer; + uint32_t collision_mask; + Transform last_transform; bool _in_tree; @@ -173,6 +176,7 @@ class GridMap : public Spatial { return Vector3(p_key.x, p_key.y, p_key.z) * cell_size * octant_size; } + void _reset_physic_bodies_collision_filters(); void _octant_enter_world(const OctantKey &p_key); void _octant_exit_world(const OctantKey &p_key); bool _octant_update(const OctantKey &p_key); @@ -210,6 +214,18 @@ public: INVALID_CELL_ITEM = -1 }; + void set_collision_layer(uint32_t p_layer); + uint32_t get_collision_layer() const; + + void set_collision_mask(uint32_t p_mask); + uint32_t get_collision_mask() const; + + void set_collision_layer_bit(int p_bit, bool p_value); + bool get_collision_layer_bit(int p_bit) const; + + void set_collision_mask_bit(int p_bit, bool p_value); + bool get_collision_mask_bit(int p_bit) const; + void set_theme(const Ref<MeshLibrary> &p_theme); Ref<MeshLibrary> get_theme() const; |