32 #include "scene/3d/collision_object.h" 41 SPACE_OVERRIDE_DISABLED,
42 SPACE_OVERRIDE_COMBINE,
43 SPACE_OVERRIDE_COMBINE_REPLACE,
44 SPACE_OVERRIDE_REPLACE,
45 SPACE_OVERRIDE_REPLACE_COMBINE
50 SpaceOverride space_override;
53 bool gravity_is_point;
54 real_t gravity_distance_scale;
63 void _body_inout(
int p_status,
const RID& p_body,
int p_instance,
int p_body_shape,
int p_area_shape);
65 void _body_enter_tree(ObjectID p_id);
66 void _body_exit_tree(ObjectID p_id);
72 bool operator<(
const ShapePair& p_sp)
const {
73 if (body_shape==p_sp.body_shape)
74 return area_shape < p_sp.area_shape;
76 return body_shape < p_sp.body_shape;
80 ShapePair(
int p_bs,
int p_as) { body_shape=p_bs; area_shape=p_as; }
93 void _area_inout(
int p_status,
const RID& p_area,
int p_instance,
int p_area_shape,
int p_self_shape);
95 void _area_enter_tree(ObjectID p_id);
96 void _area_exit_tree(ObjectID p_id);
98 struct AreaShapePair {
102 bool operator<(
const AreaShapePair& p_sp)
const {
103 if (area_shape==p_sp.area_shape)
104 return self_shape < p_sp.self_shape;
106 return area_shape < p_sp.area_shape;
110 AreaShapePair(
int p_bs,
int p_as) { area_shape=p_bs; self_shape=p_as; }
121 void _clear_monitoring();
126 void _notification(
int p_what);
127 static void _bind_methods();
130 void set_space_override_mode(SpaceOverride p_mode);
131 SpaceOverride get_space_override_mode()
const;
133 void set_gravity_is_point(
bool p_enabled);
134 bool is_gravity_a_point()
const;
136 void set_gravity_distance_scale(real_t p_scale);
137 real_t get_gravity_distance_scale()
const;
139 void set_gravity_vector(
const Vector3& p_vec);
140 Vector3 get_gravity_vector()
const;
142 void set_gravity(real_t p_gravity);
143 real_t get_gravity()
const;
145 void set_angular_damp(real_t p_angular_damp);
146 real_t get_angular_damp()
const;
148 void set_linear_damp(real_t p_linear_damp);
149 real_t get_linear_damp()
const;
151 void set_priority(real_t p_priority);
152 real_t get_priority()
const;
154 void set_enable_monitoring(
bool p_enable);
155 bool is_monitoring_enabled()
const;
157 void set_monitorable(
bool p_enable);
158 bool is_monitorable()
const;
160 Array get_overlapping_bodies()
const;
161 Array get_overlapping_areas()
const;
163 bool overlaps_area(
Node* p_area)
const;
164 bool overlaps_body(
Node* p_body)
const;
171 VARIANT_ENUM_CAST(Area::SpaceOverride);
Definition: collision_object.h:35