summaryrefslogtreecommitdiff
path: root/scene/3d/area.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/area.h')
-rw-r--r--scene/3d/area.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/scene/3d/area.h b/scene/3d/area.h
index 7956846505..a50f101ec1 100644
--- a/scene/3d/area.h
+++ b/scene/3d/area.h
@@ -34,9 +34,9 @@
class Area : public CollisionObject {
- GDCLASS( Area, CollisionObject );
-public:
+ GDCLASS(Area, CollisionObject);
+public:
enum SpaceOverride {
SPACE_OVERRIDE_DISABLED,
SPACE_OVERRIDE_COMBINE,
@@ -44,9 +44,8 @@ public:
SPACE_OVERRIDE_REPLACE,
SPACE_OVERRIDE_REPLACE_COMBINE
};
-private:
-
+private:
SpaceOverride space_override;
Vector3 gravity_vec;
real_t gravity;
@@ -61,8 +60,7 @@ private:
bool monitorable;
bool locked;
-
- void _body_inout(int p_status,const RID& p_body, int p_instance, int p_body_shape,int p_area_shape);
+ void _body_inout(int p_status, const RID &p_body, int p_instance, int p_body_shape, int p_area_shape);
void _body_enter_tree(ObjectID p_id);
void _body_exit_tree(ObjectID p_id);
@@ -71,15 +69,18 @@ private:
int body_shape;
int area_shape;
- bool operator<(const ShapePair& p_sp) const {
- if (body_shape==p_sp.body_shape)
+ bool operator<(const ShapePair &p_sp) const {
+ if (body_shape == p_sp.body_shape)
return area_shape < p_sp.area_shape;
else
return body_shape < p_sp.body_shape;
}
ShapePair() {}
- ShapePair(int p_bs, int p_as) { body_shape=p_bs; area_shape=p_as; }
+ ShapePair(int p_bs, int p_as) {
+ body_shape = p_bs;
+ area_shape = p_as;
+ }
};
struct BodyState {
@@ -89,10 +90,9 @@ private:
VSet<ShapePair> shapes;
};
- Map<ObjectID,BodyState> body_map;
+ Map<ObjectID, BodyState> body_map;
-
- void _area_inout(int p_status,const RID& p_area, int p_instance, int p_area_shape,int p_self_shape);
+ void _area_inout(int p_status, const RID &p_area, int p_instance, int p_area_shape, int p_self_shape);
void _area_enter_tree(ObjectID p_id);
void _area_exit_tree(ObjectID p_id);
@@ -101,15 +101,18 @@ private:
int area_shape;
int self_shape;
- bool operator<(const AreaShapePair& p_sp) const {
- if (area_shape==p_sp.area_shape)
+ bool operator<(const AreaShapePair &p_sp) const {
+ if (area_shape == p_sp.area_shape)
return self_shape < p_sp.self_shape;
else
return area_shape < p_sp.area_shape;
}
AreaShapePair() {}
- AreaShapePair(int p_bs, int p_as) { area_shape=p_bs; self_shape=p_as; }
+ AreaShapePair(int p_bs, int p_as) {
+ area_shape = p_bs;
+ self_shape = p_as;
+ }
};
struct AreaState {
@@ -119,16 +122,14 @@ private:
VSet<AreaShapePair> shapes;
};
- Map<ObjectID,AreaState> area_map;
+ Map<ObjectID, AreaState> area_map;
void _clear_monitoring();
-
protected:
-
void _notification(int p_what);
static void _bind_methods();
-public:
+public:
void set_space_override_mode(SpaceOverride p_mode);
SpaceOverride get_space_override_mode() const;
@@ -138,7 +139,7 @@ public:
void set_gravity_distance_scale(real_t p_scale);
real_t get_gravity_distance_scale() const;
- void set_gravity_vector(const Vector3& p_vec);
+ void set_gravity_vector(const Vector3 &p_vec);
Vector3 get_gravity_vector() const;
void set_gravity(real_t p_gravity);
@@ -174,9 +175,8 @@ public:
Array get_overlapping_bodies() const;
Array get_overlapping_areas() const; //function for script
- bool overlaps_area(Node* p_area) const;
- bool overlaps_body(Node* p_body) const;
-
+ bool overlaps_area(Node *p_area) const;
+ bool overlaps_body(Node *p_body) const;
Area();
~Area();