Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks

This commit is contained in:
Rémi Verschelde
2021-05-04 14:41:06 +02:00
parent 64a63e0861
commit b5e1e05ef2
1439 changed files with 1 additions and 34187 deletions

View File

@@ -32,13 +32,11 @@
#include "servers/physics_server.h"
Vector<Vector3> SphereShape::get_debug_mesh_lines() {
float r = get_radius();
Vector<Vector3> points;
for (int i = 0; i <= 360; i++) {
float ra = Math::deg2rad((float)i);
float rb = Math::deg2rad((float)i + 1);
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * r;
@@ -56,13 +54,11 @@ Vector<Vector3> SphereShape::get_debug_mesh_lines() {
}
void SphereShape::_update_shape() {
PhysicsServer::get_singleton()->shape_set_data(get_shape(), radius);
Shape::_update_shape();
}
void SphereShape::set_radius(float p_radius) {
radius = p_radius;
_update_shape();
notify_change_to_owners();
@@ -70,12 +66,10 @@ void SphereShape::set_radius(float p_radius) {
}
float SphereShape::get_radius() const {
return radius;
}
void SphereShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_radius", "radius"), &SphereShape::set_radius);
ClassDB::bind_method(D_METHOD("get_radius"), &SphereShape::get_radius);
@@ -84,6 +78,5 @@ void SphereShape::_bind_methods() {
SphereShape::SphereShape() :
Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_SPHERE)) {
set_radius(1.0);
}