diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-14 12:26:56 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-01-14 14:52:23 +0100 |
commit | 93ab45b6b5c4f8e0619e963156c983009d399a9d (patch) | |
tree | 80e55993f29ad7bf502ef7388eef78114b2dc4ab /scene/3d | |
parent | 78e90ac60b81f17fdf8c319357f16962e92e6106 (diff) |
Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/baked_light_instance.cpp | 6 | ||||
-rw-r--r-- | scene/3d/body_shape.cpp | 4 | ||||
-rw-r--r-- | scene/3d/camera.cpp | 10 | ||||
-rw-r--r-- | scene/3d/collision_object.cpp | 2 | ||||
-rw-r--r-- | scene/3d/gi_probe.cpp | 2 | ||||
-rw-r--r-- | scene/3d/navigation.cpp | 2 | ||||
-rw-r--r-- | scene/3d/particles.cpp | 4 | ||||
-rw-r--r-- | scene/3d/physics_body.cpp | 20 | ||||
-rw-r--r-- | scene/3d/skeleton.cpp | 2 | ||||
-rw-r--r-- | scene/3d/spatial.cpp | 8 | ||||
-rw-r--r-- | scene/3d/spatial_stream_player.cpp | 16 | ||||
-rw-r--r-- | scene/3d/sprite_3d.cpp | 8 | ||||
-rw-r--r-- | scene/3d/sprite_3d.h | 4 | ||||
-rw-r--r-- | scene/3d/vehicle_body.cpp | 21 | ||||
-rw-r--r-- | scene/3d/vehicle_body.h | 2 | ||||
-rw-r--r-- | scene/3d/visual_instance.cpp | 6 |
16 files changed, 66 insertions, 51 deletions
diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp index 59d8d7ecac..e42439bf3b 100644 --- a/scene/3d/baked_light_instance.cpp +++ b/scene/3d/baked_light_instance.cpp @@ -1524,7 +1524,7 @@ void BakedLight::set_cell_subdiv(int p_subdiv) { cell_subdiv=p_subdiv; -// VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv); + //VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv); } int BakedLight::get_cell_subdiv() const { @@ -1745,7 +1745,7 @@ void BakedLight::_bind_methods() { BakedLight::BakedLight() { -// baked_light=VisualServer::get_singleton()->baked_light_create(); + //baked_light=VisualServer::get_singleton()->baked_light_create(); VS::get_singleton()->instance_set_base(get_instance(),baked_light); cell_subdiv=8; @@ -1815,7 +1815,7 @@ void BakedLightSampler::_bind_methods() { ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/strength",PROPERTY_HINT_RANGE,"0.01,16,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_STRENGTH); ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/attenuation",PROPERTY_HINT_EXP_EASING),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION); ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0.01,1.0,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); -// ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); + //ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); ADD_PROPERTY( PropertyInfo(Variant::REAL,"params/resolution",PROPERTY_HINT_RANGE,"4,32,1"),_SCS("set_resolution"),_SCS("get_resolution")); } diff --git a/scene/3d/body_shape.cpp b/scene/3d/body_shape.cpp index ff8b0f15bf..f6ec8639d3 100644 --- a/scene/3d/body_shape.cpp +++ b/scene/3d/body_shape.cpp @@ -96,7 +96,7 @@ void CollisionShape::_update_indicator() { pt = VS::PRIMITIVE_LINES; } else if (shape->cast_to<SphereShape>()) { -// VisualServer *vs=VisualServer::get_singleton(); + //VisualServer *vs=VisualServer::get_singleton(); SphereShape *shapeptr=shape->cast_to<SphereShape>(); @@ -337,7 +337,7 @@ void CollisionShape::_notification(int p_what) { //indicator_instance = VisualServer::get_singleton()->instance_create2(indicator,get_world()->get_scenario()); } break; case NOTIFICATION_TRANSFORM_CHANGED: { - // VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); + //VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); if (can_update_body && updating_body) { _update_body(); } diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 8499542850..3f36caf62c 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -190,9 +190,11 @@ void Camera::_update_camera() { tr.origin+=tr.basis.get_axis(0)*h_offset; VisualServer::get_singleton()->camera_set_transform( camera, tr ); -// here goes listener stuff -// if (viewport_ptr && is_inside_scene() && is_current()) -// get_viewport()->_camera_transform_changed_notify(); + // here goes listener stuff + /* + if (viewport_ptr && is_inside_scene() && is_current()) + get_viewport()->_camera_transform_changed_notify(); + */ if (is_inside_tree() && is_current()) { get_viewport()->_camera_transform_changed_notify(); @@ -400,7 +402,7 @@ Vector3 Camera::project_ray_origin(const Point2& p_pos) const { #endif ERR_FAIL_COND_V( viewport_size.y == 0, Vector3() ); -// float aspect = viewport_size.x / viewport_size.y; + //float aspect = viewport_size.x / viewport_size.y; if (mode == PROJECTION_PERSPECTIVE) { diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index 96d8d13a29..7bba382db0 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -339,7 +339,7 @@ CollisionObject::CollisionObject(RID p_rid, bool p_area) { } else { PhysicsServer::get_singleton()->body_attach_object_instance_ID(rid,get_instance_ID()); } -// set_transform_notify(true); + //set_transform_notify(true); } diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 13e7c175ed..54d7cb6b9e 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -1182,7 +1182,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug){ if (p_create_visual_debug) { - // _create_debug_mesh(&baker); + //_create_debug_mesh(&baker); } diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 40666a60dc..9bb19880bf 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -368,7 +368,7 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3& p_start, const Vector while(!found_route) { if (open_list.size()==0) { - // print_line("NOU OPEN LIST"); + //print_line("NOU OPEN LIST"); break; } //check open list diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index 9e37658cd9..72fab4cccc 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -325,7 +325,7 @@ RES Particles::_get_gizmo_geometry() const { mat->set_parameter( FixedSpatialMaterial::PARAM_EMISSION,Color(0.5,0.7,0.8) ); mat->set_blend_mode( Material::BLEND_MODE_ADD ); mat->set_flag(Material::FLAG_DOUBLE_SIDED,true); -// mat->set_hint(Material::HINT_NO_DEPTH_DRAW,true); + //mat->set_hint(Material::HINT_NO_DEPTH_DRAW,true); surface_tool->begin(Mesh::PRIMITIVE_TRIANGLES); @@ -334,7 +334,7 @@ RES Particles::_get_gizmo_geometry() const { int sides=16; int sections=24; -// float len=1; + //float len=1; float deg=Math::deg2rad(var[VAR_SPREAD]*180); if (deg==180) deg=179.5; diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 9235eae643..0a44ad9c3d 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -437,7 +437,7 @@ void RigidBody::_direct_state_changed(Object *p_state) { int local_shape = state->get_contact_local_shape(i); int shape = state->get_contact_collider_shape(i); -// bool found=false; + //bool found=false; Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(obj); if (!E) { @@ -1000,7 +1000,7 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { if (collide_character) mask|=PhysicsDirectSpaceState::TYPE_MASK_CHARACTER_BODY; -// print_line("motion: "+p_motion+" margin: "+rtos(margin)); + //print_line("motion: "+p_motion+" margin: "+rtos(margin)); //print_line("margin: "+rtos(margin)); @@ -1038,10 +1038,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { #if 0 float d = a.distance_to(b); - //if (d<margin) - /// continue; - /// - /// + /* + if (d<margin) + continue; + */ recover_motion+=(b-a)*0.2; #else float dist = a.distance_to(b); @@ -1144,7 +1144,7 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { colliding=false; } - // print_line("Rest Travel: "+rest.normal); + //print_line("Rest Travel: "+rest.normal); } @@ -1159,8 +1159,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { } Vector3 motion=p_motion*safe; - //if (colliding) - // motion+=normal*0.001; + /* + if (colliding) + motion+=normal*0.001; + */ Transform gt = get_global_transform(); gt.origin+=motion; set_global_transform(gt); diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index 5e576b4960..f2e339604e 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -482,7 +482,7 @@ Transform Skeleton::get_bone_pose(int p_bone) const { void Skeleton::set_bone_custom_pose(int p_bone, const Transform& p_custom_pose) { ERR_FAIL_INDEX( p_bone, bones.size() ); -// ERR_FAIL_COND( !is_inside_scene() ); + //ERR_FAIL_COND( !is_inside_scene() ); bones[p_bone].custom_pose_enable=(p_custom_pose!=Transform()); diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 788ef7f935..63a27f3554 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -95,8 +95,10 @@ void Spatial::_propagate_transform_changed(Spatial *p_origin) { return; } -// if (data.dirty&DIRTY_GLOBAL) -// return; //already dirty + /* + if (data.dirty&DIRTY_GLOBAL) + return; //already dirty + */ data.children_lock++; @@ -179,7 +181,7 @@ void Spatial::_notification(int p_what) { #ifdef TOOLS_ENABLED if (get_tree()->is_editor_hint()) { -// get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); + //get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); get_tree()->call_group_flags(0,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); if (!data.gizmo_disabled) { diff --git a/scene/3d/spatial_stream_player.cpp b/scene/3d/spatial_stream_player.cpp index 087e60b48b..1f9765c1d3 100644 --- a/scene/3d/spatial_stream_player.cpp +++ b/scene/3d/spatial_stream_player.cpp @@ -153,10 +153,12 @@ void SpatialStreamPlayer::play(float p_from_offset) { SpatialSoundServer::get_singleton()->source_set_audio_stream(get_source_rid(),&internal_stream); -// AudioServer::get_singleton()->stream_set_active(stream_rid,true); -// AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); -// if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) -// set_idle_process(true); + /* + AudioServer::get_singleton()->stream_set_active(stream_rid,true); + AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); + if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) + set_idle_process(true); + */ } @@ -289,8 +291,10 @@ bool SpatialStreamPlayer::has_autoplay() const { void SpatialStreamPlayer::set_paused(bool p_paused) { paused=p_paused; - //if (stream.is_valid()) - // stream->set_paused(p_paused); + /* + if (stream.is_valid()) + stream->set_paused(p_paused); + */ } bool SpatialStreamPlayer::is_paused() const { diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index a2a96d7d0e..9f0c91c4b8 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -563,8 +563,10 @@ Rect2 Sprite3D::get_item_rect() const { if (texture.is_null()) return Rect2(0,0,1,1); - //if (texture.is_null()) - // return CanvasItem::get_item_rect(); + /* + if (texture.is_null()) + return CanvasItem::get_item_rect(); + */ Size2i s; @@ -1130,7 +1132,7 @@ void AnimatedSprite3D::_notification(int p_what) { //texture->draw_rect(ci,dst_rect,false,modulate); texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size()),modulate); -// VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); + //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); } break; #endif diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index f5d3957370..a14ce40495 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -185,7 +185,7 @@ public: virtual Rect2 get_item_rect() const; Sprite3D(); -// ~Sprite3D(); + //~Sprite3D(); }; #if 0 @@ -215,7 +215,7 @@ public: virtual Rect2 get_item_rect() const; AnimatedSprite3D(); -// ~AnimatedSprite3D(); + //~AnimatedSprite3D(); }; #endif diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 1cb443225c..a3f05f719d 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -340,10 +340,11 @@ void VehicleBody::_update_wheel_transform(VehicleWheel& wheel ,PhysicsDirectBody wheel.m_raycastInfo.m_isInContact = false; Transform chassisTrans = s->get_transform(); - //if (interpolatedTransform && (getRigidBody()->getMotionState())) - //{ - // getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); - //} + /* + if (interpolatedTransform && (getRigidBody()->getMotionState())) { + getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); + } + */ wheel.m_raycastInfo.m_hardPointWS = chassisTrans.xform( wheel.m_chassisConnectionPointCS ); //wheel.m_raycastInfo.m_hardPointWS+=s->get_linear_velocity()*s->get_step(); @@ -360,8 +361,8 @@ void VehicleBody::_update_wheel(int p_idx,PhysicsDirectBodyState *s) { const Vector3& right = wheel.m_raycastInfo.m_wheelAxleWS; Vector3 fwd = up.cross(right); fwd = fwd.normalized(); -// up = right.cross(fwd); -// up.normalize(); + //up = right.cross(fwd); + //up.normalize(); //rotate around steering over de wheelAxleWS real_t steering = wheel.steers?m_steeringValue:0.0; @@ -371,8 +372,10 @@ void VehicleBody::_update_wheel(int p_idx,PhysicsDirectBodyState *s) { Basis rotatingMat(right,-wheel.m_rotation); -// if (p_idx==1) -// print_line("steeringMat " +steeringMat); + /* + if (p_idx==1) + print_line("steeringMat " +steeringMat); + */ Basis basis2( right[0],up[0],fwd[0], @@ -502,7 +505,7 @@ void VehicleBody::_update_suspension(PhysicsDirectBodyState *s) if ( wheel_info.m_raycastInfo.m_isInContact ) { real_t force; - // Spring + //Spring { real_t susp_length = wheel_info.m_suspensionRestLength; real_t current_length = wheel_info.m_raycastInfo.m_suspensionLength; diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h index cd627f8998..273e63d741 100644 --- a/scene/3d/vehicle_body.h +++ b/scene/3d/vehicle_body.h @@ -63,7 +63,7 @@ friend class VehicleBody; VehicleBody *body; -// btVector3 m_wheelAxleCS; // const or modified by steering ? + //btVector3 m_wheelAxleCS; // const or modified by steering ? real_t m_steering; real_t m_rotation; diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index ca78f8e21f..ec37aa2bc4 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -102,7 +102,7 @@ void VisualInstance::_notification(int p_what) { VisualServer::get_singleton()->instance_set_scenario( instance, RID() ); VisualServer::get_singleton()->instance_set_room(instance,RID()); VisualServer::get_singleton()->instance_attach_skeleton( instance, RID() ); - // VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() ); + //VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() ); } break; case NOTIFICATION_VISIBILITY_CHANGED: { @@ -368,7 +368,7 @@ void GeometryInstance::_bind_methods() { ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_distance",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_distance"), _SCS("get_lod_max_distance")); ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_hysteresis",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_hysteresis"), _SCS("get_lod_max_hysteresis")); -// ADD_SIGNAL( MethodInfo("visibility_changed")); + //ADD_SIGNAL( MethodInfo("visibility_changed")); BIND_CONSTANT(FLAG_CAST_SHADOW ); BIND_CONSTANT(FLAG_BILLBOARD ); @@ -399,7 +399,7 @@ GeometryInstance::GeometryInstance() { shadow_casting_setting=SHADOW_CASTING_SETTING_ON; extra_cull_margin=0; -// VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0); + //VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0); } |