diff options
Diffstat (limited to 'modules/gridmap/grid_map.h')
-rw-r--r-- | modules/gridmap/grid_map.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h index 241ac7a434..b17fe43ae8 100644 --- a/modules/gridmap/grid_map.h +++ b/modules/gridmap/grid_map.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -27,6 +27,7 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ + #ifndef GRID_MAP_H #define GRID_MAP_H @@ -136,6 +137,9 @@ class GridMap : public Spatial { OctantKey() { key = 0; } }; + uint32_t collision_layer; + uint32_t collision_mask; + Transform last_transform; bool _in_tree; @@ -173,6 +177,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 +215,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; |