diff options
Diffstat (limited to 'servers/physics/collision_object_sw.h')
-rw-r--r-- | servers/physics/collision_object_sw.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h index bc71c2709b..c46a7f4a5f 100644 --- a/servers/physics/collision_object_sw.h +++ b/servers/physics/collision_object_sw.h @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -60,7 +60,8 @@ private: Transform xform; Transform xform_inv; BroadPhaseSW::ID bpid; - AABB aabb_cache; //for rayqueries + Rect3 aabb_cache; //for rayqueries + real_t area_cache; ShapeSW *shape; bool trigger; @@ -122,7 +123,8 @@ public: _FORCE_INLINE_ ShapeSW *get_shape(int p_index) const { return shapes[p_index].shape; } _FORCE_INLINE_ const Transform& get_shape_transform(int p_index) const { return shapes[p_index].xform; } _FORCE_INLINE_ const Transform& get_shape_inv_transform(int p_index) const { return shapes[p_index].xform_inv; } - _FORCE_INLINE_ const AABB& get_shape_aabb(int p_index) const { return shapes[p_index].aabb_cache; } + _FORCE_INLINE_ const Rect3& get_shape_aabb(int p_index) const { return shapes[p_index].aabb_cache; } + _FORCE_INLINE_ const real_t get_shape_area(int p_index) const { return shapes[p_index].area_cache; } _FORCE_INLINE_ Transform get_transform() const { return transform; } _FORCE_INLINE_ Transform get_inv_transform() const { return inv_transform; } |