summaryrefslogtreecommitdiffstats
path: root/scene/2d/ray_cast_2d.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-04-05 18:50:09 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-04-05 18:50:09 -0300
commitb4969373b3475799d6b24cdffeda4659c37f0b8a (patch)
tree5cafdea68a5fe1f79c343c7cdf8def821e7f0b05 /scene/2d/ray_cast_2d.h
parent9f33134c93ecbadda70e8eefc50563e29b2eb7f2 (diff)
downloadredot-engine-b4969373b3475799d6b24cdffeda4659c37f0b8a.tar.gz
-HttpClient: ’Content-Length’ is added to httprequest if not provided in the headers and a body exists
-expressions in GDScript can take multiple lines if inside parenthesis (python-like) -Added \ to force linebreaks to GDscript (python-like) -added exclude objects from raycast -fixed crashes
Diffstat (limited to 'scene/2d/ray_cast_2d.h')
-rw-r--r--scene/2d/ray_cast_2d.h88
1 files changed, 48 insertions, 40 deletions
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h
index 62bcb946a6..32b95fbefe 100644
--- a/scene/2d/ray_cast_2d.h
+++ b/scene/2d/ray_cast_2d.h
@@ -26,43 +26,51 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef RAY_CAST_2D_H
-#define RAY_CAST_2D_H
-
-#include "scene/2d/node_2d.h"
-
-class RayCast2D : public Node2D {
-
- OBJ_TYPE(RayCast2D,Node2D);
-
-
- bool enabled;
- bool collided;
- ObjectID against;
- int against_shape;
- Vector2 collision_point;
- Vector2 collision_normal;
-
- Vector2 cast_to;
-protected:
-
- void _notification(int p_what);
- static void _bind_methods();
-public:
-
- void set_enabled(bool p_enabled);
- bool is_enabled() const;
-
- void set_cast_to(const Vector2& p_point);
- Vector2 get_cast_to() const;
-
- bool is_colliding() const;
- Object *get_collider() const;
- int get_collider_shape() const;
- Vector2 get_collision_point() const;
- Vector2 get_collision_normal() const;
-
- RayCast2D();
-};
-
-#endif // RAY_CAST_2D_H
+#ifndef RAY_CAST_2D_H
+#define RAY_CAST_2D_H
+
+#include "scene/2d/node_2d.h"
+
+class RayCast2D : public Node2D {
+
+ OBJ_TYPE(RayCast2D,Node2D);
+
+
+ bool enabled;
+ bool collided;
+ ObjectID against;
+ int against_shape;
+ Vector2 collision_point;
+ Vector2 collision_normal;
+ Set<RID> exclude;
+
+
+ Vector2 cast_to;
+protected:
+
+ void _notification(int p_what);
+ static void _bind_methods();
+public:
+
+ void set_enabled(bool p_enabled);
+ bool is_enabled() const;
+
+ void set_cast_to(const Vector2& p_point);
+ Vector2 get_cast_to() const;
+
+ bool is_colliding() const;
+ Object *get_collider() const;
+ int get_collider_shape() const;
+ Vector2 get_collision_point() const;
+ Vector2 get_collision_normal() const;
+
+ void add_exception_rid(const RID& p_rid);
+ void add_exception(const Object* p_object);
+ void remove_exception_rid(const RID& p_rid);
+ void remove_exception(const Object* p_object);
+ void clear_exceptions();
+
+ RayCast2D();
+};
+
+#endif // RAY_CAST_2D_H