diff options
Diffstat (limited to 'servers/physics_3d/body_3d_sw.h')
-rw-r--r-- | servers/physics_3d/body_3d_sw.h | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/servers/physics_3d/body_3d_sw.h b/servers/physics_3d/body_3d_sw.h index 2878c97c9d..b642729404 100644 --- a/servers/physics_3d/body_3d_sw.h +++ b/servers/physics_3d/body_3d_sw.h @@ -382,82 +382,82 @@ public: Body3DSW *body; real_t step; - virtual Vector3 get_total_gravity() const { return body->gravity; } // get gravity vector working on this body space/area - virtual real_t get_total_angular_damp() const { return body->area_angular_damp; } // get density of this body space/area - virtual real_t get_total_linear_damp() const { return body->area_linear_damp; } // get density of this body space/area + virtual Vector3 get_total_gravity() const override { return body->gravity; } // get gravity vector working on this body space/area + virtual real_t get_total_angular_damp() const override { return body->area_angular_damp; } // get density of this body space/area + virtual real_t get_total_linear_damp() const override { return body->area_linear_damp; } // get density of this body space/area - virtual Vector3 get_center_of_mass() const { return body->get_center_of_mass(); } - virtual Basis get_principal_inertia_axes() const { return body->get_principal_inertia_axes(); } + virtual Vector3 get_center_of_mass() const override { return body->get_center_of_mass(); } + virtual Basis get_principal_inertia_axes() const override { return body->get_principal_inertia_axes(); } - virtual real_t get_inverse_mass() const { return body->get_inv_mass(); } // get the mass - virtual Vector3 get_inverse_inertia() const { return body->get_inv_inertia(); } // get density of this body space - virtual Basis get_inverse_inertia_tensor() const { return body->get_inv_inertia_tensor(); } // get density of this body space + virtual real_t get_inverse_mass() const override { return body->get_inv_mass(); } // get the mass + virtual Vector3 get_inverse_inertia() const override { return body->get_inv_inertia(); } // get density of this body space + virtual Basis get_inverse_inertia_tensor() const override { return body->get_inv_inertia_tensor(); } // get density of this body space - virtual void set_linear_velocity(const Vector3 &p_velocity) { body->set_linear_velocity(p_velocity); } - virtual Vector3 get_linear_velocity() const { return body->get_linear_velocity(); } + virtual void set_linear_velocity(const Vector3 &p_velocity) override { body->set_linear_velocity(p_velocity); } + virtual Vector3 get_linear_velocity() const override { return body->get_linear_velocity(); } - virtual void set_angular_velocity(const Vector3 &p_velocity) { body->set_angular_velocity(p_velocity); } - virtual Vector3 get_angular_velocity() const { return body->get_angular_velocity(); } + virtual void set_angular_velocity(const Vector3 &p_velocity) override { body->set_angular_velocity(p_velocity); } + virtual Vector3 get_angular_velocity() const override { return body->get_angular_velocity(); } - virtual void set_transform(const Transform &p_transform) { body->set_state(PhysicsServer3D::BODY_STATE_TRANSFORM, p_transform); } - virtual Transform get_transform() const { return body->get_transform(); } + virtual void set_transform(const Transform &p_transform) override { body->set_state(PhysicsServer3D::BODY_STATE_TRANSFORM, p_transform); } + virtual Transform get_transform() const override { return body->get_transform(); } - virtual void add_central_force(const Vector3 &p_force) { body->add_central_force(p_force); } - virtual void add_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()) { + virtual void add_central_force(const Vector3 &p_force) override { body->add_central_force(p_force); } + virtual void add_force(const Vector3 &p_force, const Vector3 &p_position = Vector3()) override { body->add_force(p_force, p_position); } - virtual void add_torque(const Vector3 &p_torque) { body->add_torque(p_torque); } - virtual void apply_central_impulse(const Vector3 &p_impulse) { body->apply_central_impulse(p_impulse); } - virtual void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3()) { + virtual void add_torque(const Vector3 &p_torque) override { body->add_torque(p_torque); } + virtual void apply_central_impulse(const Vector3 &p_impulse) override { body->apply_central_impulse(p_impulse); } + virtual void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3()) override { body->apply_impulse(p_impulse, p_position); } - virtual void apply_torque_impulse(const Vector3 &p_impulse) { body->apply_torque_impulse(p_impulse); } + virtual void apply_torque_impulse(const Vector3 &p_impulse) override { body->apply_torque_impulse(p_impulse); } - virtual void set_sleep_state(bool p_sleep) { body->set_active(!p_sleep); } - virtual bool is_sleeping() const { return !body->is_active(); } + virtual void set_sleep_state(bool p_sleep) override { body->set_active(!p_sleep); } + virtual bool is_sleeping() const override { return !body->is_active(); } - virtual int get_contact_count() const { return body->contact_count; } + virtual int get_contact_count() const override { return body->contact_count; } - virtual Vector3 get_contact_local_position(int p_contact_idx) const { + virtual Vector3 get_contact_local_position(int p_contact_idx) const override { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3()); return body->contacts[p_contact_idx].local_pos; } - virtual Vector3 get_contact_local_normal(int p_contact_idx) const { + virtual Vector3 get_contact_local_normal(int p_contact_idx) const override { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3()); return body->contacts[p_contact_idx].local_normal; } - virtual float get_contact_impulse(int p_contact_idx) const { + virtual float get_contact_impulse(int p_contact_idx) const override { return 0.0f; // Only implemented for bullet } - virtual int get_contact_local_shape(int p_contact_idx) const { + virtual int get_contact_local_shape(int p_contact_idx) const override { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, -1); return body->contacts[p_contact_idx].local_shape; } - virtual RID get_contact_collider(int p_contact_idx) const { + virtual RID get_contact_collider(int p_contact_idx) const override { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, RID()); return body->contacts[p_contact_idx].collider; } - virtual Vector3 get_contact_collider_position(int p_contact_idx) const { + virtual Vector3 get_contact_collider_position(int p_contact_idx) const override { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3()); return body->contacts[p_contact_idx].collider_pos; } - virtual ObjectID get_contact_collider_id(int p_contact_idx) const { + virtual ObjectID get_contact_collider_id(int p_contact_idx) const override { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, ObjectID()); return body->contacts[p_contact_idx].collider_instance_id; } - virtual int get_contact_collider_shape(int p_contact_idx) const { + virtual int get_contact_collider_shape(int p_contact_idx) const override { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, 0); return body->contacts[p_contact_idx].collider_shape; } - virtual Vector3 get_contact_collider_velocity_at_position(int p_contact_idx) const { + virtual Vector3 get_contact_collider_velocity_at_position(int p_contact_idx) const override { ERR_FAIL_INDEX_V(p_contact_idx, body->contact_count, Vector3()); return body->contacts[p_contact_idx].collider_velocity_at_pos; } - virtual PhysicsDirectSpaceState3D *get_space_state(); + virtual PhysicsDirectSpaceState3D *get_space_state() override; - virtual real_t get_step() const { return step; } + virtual real_t get_step() const override { return step; } PhysicsDirectBodyState3DSW() { singleton = this; body = nullptr; |