summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorTwistedTwigleg <beard.noah@gmail.com>2017-08-11 15:10:05 -0400
committerRĂ©mi Verschelde <rverschelde@gmail.com>2017-08-16 17:22:23 +0200
commit00f6c859282bb4dab3f6b4f6c20c44222221ebe9 (patch)
treeab3d2bae1ce8e9661480535a6442c94e5aeafd83 /servers
parentb1ecaaa22b8dd87a75db414cb84ad0f60d5d4cef (diff)
Synchronize parameter names in definition and declaration
Fixes #10244.
Diffstat (limited to 'servers')
-rw-r--r--servers/arvr_server.h14
-rw-r--r--servers/audio/audio_filter_sw.h16
-rw-r--r--servers/audio/audio_stream.h4
-rw-r--r--servers/audio/effects/audio_effect_distortion.h8
-rw-r--r--servers/audio/effects/audio_effect_panner.h2
-rw-r--r--servers/physics/broad_phase_basic.cpp4
-rw-r--r--servers/physics/broad_phase_octree.h2
-rw-r--r--servers/physics/collision_object_sw.h2
-rw-r--r--servers/physics/joints/cone_twist_joint_sw.cpp10
-rw-r--r--servers/physics/joints/cone_twist_joint_sw.h4
-rw-r--r--servers/physics/joints/generic_6dof_joint_sw.cpp6
-rw-r--r--servers/physics/joints/generic_6dof_joint_sw.h4
-rw-r--r--servers/physics/physics_server_sw.h2
-rw-r--r--servers/physics/shape_sw.h2
-rw-r--r--servers/physics_2d/broad_phase_2d_basic.cpp4
-rw-r--r--servers/physics_2d/broad_phase_2d_hash_grid.h2
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h2
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp8
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h8
-rw-r--r--servers/physics_2d_server.cpp16
-rw-r--r--servers/physics_server.cpp16
-rw-r--r--servers/visual/visual_server_canvas.cpp4
-rw-r--r--servers/visual/visual_server_canvas.h2
-rw-r--r--servers/visual/visual_server_scene.cpp12
-rw-r--r--servers/visual/visual_server_scene.h2
25 files changed, 78 insertions, 78 deletions
diff --git a/servers/arvr_server.h b/servers/arvr_server.h
index fd7c5470c3..06e0a4561c 100644
--- a/servers/arvr_server.h
+++ b/servers/arvr_server.h
@@ -88,7 +88,7 @@ protected:
public:
static ARVRServer *get_singleton();
- /*
+ /*
World scale allows you to specify a scale factor that is applied to all positioning vectors in our VR world in essence scaling up, or scaling down the world.
For stereoscopic rendering specifically this is very important to give an accurate sense of scale.
Add controllers into the mix and an accurate mapping of real world movement to percieved virtual movement becomes very important.
@@ -107,18 +107,18 @@ public:
actions be it straffing, teleporting, etc. Movement of the player by moving through the physical space is always tracked
in relation to this point.
- Note that the ARVROrigin spatial node in your scene automatically updates this property and it should be used instead of
+ Note that the ARVROrigin spatial node in your scene automatically updates this property and it should be used instead of
direct access to this property and it therefor is not available in GDScript
Note: this should not be used in AR and should be ignored by an AR based interface as it would throw what you're looking at in the real world
and in the virtual world out of sync
*/
Transform get_world_origin() const;
- void set_world_origin(const Transform p_origin);
+ void set_world_origin(const Transform p_world_origin);
/*
Requesting a reference frame results in a matrix being calculated that ensures the HMD is positioned to 0,0,0 facing 0,0,-1 (need to verify this direction)
- in the virtual world.
+ in the virtual world.
Note: this should not be used in AR and should be ignored by an AR based interface as it would throw what you're looking at in the real world
and in the virtual world out of sync
@@ -127,7 +127,7 @@ public:
void request_reference_frame(bool p_ignore_tilt, bool p_keep_height);
/*
- Interfaces are objects that 'glue' Godot to an AR or VR SDK such as the Oculus SDK, OpenVR, OpenHMD, etc.
+ Interfaces are objects that 'glue' Godot to an AR or VR SDK such as the Oculus SDK, OpenVR, OpenHMD, etc.
*/
void add_interface(const Ref<ARVRInterface> &p_interface);
void remove_interface(const Ref<ARVRInterface> &p_interface);
@@ -144,10 +144,10 @@ public:
void clear_primary_interface_if(const Ref<ARVRInterface> &p_primary_interface); /* this is automatically called if an interface destructs */
/*
- Our trackers are objects that expose the orientation and position of physical devices such as controller, anchor points, etc.
+ Our trackers are objects that expose the orientation and position of physical devices such as controller, anchor points, etc.
They are created and managed by our active AR/VR interfaces.
- Note that for trackers that
+ Note that for trackers that
*/
int get_free_tracker_id_for_type(TrackerType p_tracker_type);
void add_tracker(ARVRPositionalTracker *p_tracker);
diff --git a/servers/audio/audio_filter_sw.h b/servers/audio/audio_filter_sw.h
index f5a07c4c8f..caf735436a 100644
--- a/servers/audio/audio_filter_sw.h
+++ b/servers/audio/audio_filter_sw.h
@@ -97,24 +97,24 @@ public:
/* inline methods */
-void AudioFilterSW::Processor::process_one(float &p_val) {
+void AudioFilterSW::Processor::process_one(float &p_sample) {
- float pre = p_val;
- p_val = (p_val * coeffs.b0 + hb1 * coeffs.b1 + hb2 * coeffs.b2 + ha1 * coeffs.a1 + ha2 * coeffs.a2);
+ float pre = p_sample;
+ p_sample = (p_sample * coeffs.b0 + hb1 * coeffs.b1 + hb2 * coeffs.b2 + ha1 * coeffs.a1 + ha2 * coeffs.a2);
ha2 = ha1;
hb2 = hb1;
hb1 = pre;
- ha1 = p_val;
+ ha1 = p_sample;
}
-void AudioFilterSW::Processor::process_one_interp(float &p_val) {
+void AudioFilterSW::Processor::process_one_interp(float &p_sample) {
- float pre = p_val;
- p_val = (p_val * coeffs.b0 + hb1 * coeffs.b1 + hb2 * coeffs.b2 + ha1 * coeffs.a1 + ha2 * coeffs.a2);
+ float pre = p_sample;
+ p_sample = (p_sample * coeffs.b0 + hb1 * coeffs.b1 + hb2 * coeffs.b2 + ha1 * coeffs.a1 + ha2 * coeffs.a2);
ha2 = ha1;
hb2 = hb1;
hb1 = pre;
- ha1 = p_val;
+ ha1 = p_sample;
coeffs.b0 += incr_coeffs.b0;
coeffs.b1 += incr_coeffs.b1;
diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h
index a35826be21..0d63e7af82 100644
--- a/servers/audio/audio_stream.h
+++ b/servers/audio/audio_stream.h
@@ -74,7 +74,7 @@ protected:
virtual float get_stream_sampling_rate() = 0;
public:
- virtual void mix(AudioFrame *p_bufer, float p_rate_scale, int p_frames);
+ virtual void mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames);
AudioStreamPlaybackResampled() { mix_offset = 0; }
};
@@ -104,7 +104,7 @@ protected:
static void _bind_methods();
public:
- void set_audio_stream(const Ref<AudioStream> &audio_stream);
+ void set_audio_stream(const Ref<AudioStream> &p_audio_stream);
Ref<AudioStream> get_audio_stream() const;
void set_random_pitch(float p_pitch);
diff --git a/servers/audio/effects/audio_effect_distortion.h b/servers/audio/effects/audio_effect_distortion.h
index 2f84bd4dc7..afeb6ac7ec 100644
--- a/servers/audio/effects/audio_effect_distortion.h
+++ b/servers/audio/effects/audio_effect_distortion.h
@@ -71,16 +71,16 @@ public:
void set_mode(Mode p_mode);
Mode get_mode() const;
- void set_pre_gain(float pre_gain);
+ void set_pre_gain(float p_pre_gain);
float get_pre_gain() const;
- void set_keep_hf_hz(float keep_hf_hz);
+ void set_keep_hf_hz(float p_keep_hf_hz);
float get_keep_hf_hz() const;
- void set_drive(float drive);
+ void set_drive(float p_drive);
float get_drive() const;
- void set_post_gain(float post_gain);
+ void set_post_gain(float p_post_gain);
float get_post_gain() const;
AudioEffectDistortion();
diff --git a/servers/audio/effects/audio_effect_panner.h b/servers/audio/effects/audio_effect_panner.h
index 4b41fecc45..8c3edfbde0 100644
--- a/servers/audio/effects/audio_effect_panner.h
+++ b/servers/audio/effects/audio_effect_panner.h
@@ -54,7 +54,7 @@ protected:
public:
Ref<AudioEffectInstance> instance();
- void set_pan(float p_volume);
+ void set_pan(float p_cpanume);
float get_pan() const;
AudioEffectPanner();
diff --git a/servers/physics/broad_phase_basic.cpp b/servers/physics/broad_phase_basic.cpp
index 679b9a31fc..05a2e1fdf8 100644
--- a/servers/physics/broad_phase_basic.cpp
+++ b/servers/physics/broad_phase_basic.cpp
@@ -169,10 +169,10 @@ void BroadPhaseBasic::set_pair_callback(PairCallback p_pair_callback, void *p_us
pair_userdata = p_userdata;
pair_callback = p_pair_callback;
}
-void BroadPhaseBasic::set_unpair_callback(UnpairCallback p_pair_callback, void *p_userdata) {
+void BroadPhaseBasic::set_unpair_callback(UnpairCallback p_unpair_callback, void *p_userdata) {
unpair_userdata = p_userdata;
- unpair_callback = p_pair_callback;
+ unpair_callback = p_unpair_callback;
}
void BroadPhaseBasic::update() {
diff --git a/servers/physics/broad_phase_octree.h b/servers/physics/broad_phase_octree.h
index 88d72a2bd8..bd3ba6677a 100644
--- a/servers/physics/broad_phase_octree.h
+++ b/servers/physics/broad_phase_octree.h
@@ -47,7 +47,7 @@ class BroadPhaseOctree : public BroadPhaseSW {
public:
// 0 is an invalid ID
- virtual ID create(CollisionObjectSW *p_object_, int p_subindex = 0);
+ virtual ID create(CollisionObjectSW *p_object, int p_subindex = 0);
virtual void move(ID p_id, const Rect3 &p_aabb);
virtual void set_static(ID p_id, bool p_static);
virtual void remove(ID p_id);
diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h
index a56253e33d..44786829af 100644
--- a/servers/physics/collision_object_sw.h
+++ b/servers/physics/collision_object_sw.h
@@ -98,7 +98,7 @@ protected:
void _set_static(bool p_static);
virtual void _shapes_changed() = 0;
- void _set_space(SpaceSW *space);
+ void _set_space(SpaceSW *p_space);
bool ray_pickable;
diff --git a/servers/physics/joints/cone_twist_joint_sw.cpp b/servers/physics/joints/cone_twist_joint_sw.cpp
index 51bc27ea7d..d00eab53d3 100644
--- a/servers/physics/joints/cone_twist_joint_sw.cpp
+++ b/servers/physics/joints/cone_twist_joint_sw.cpp
@@ -110,7 +110,7 @@ ConeTwistJointSW::ConeTwistJointSW(BodySW *rbA, BodySW *rbB, const Transform &rb
m_appliedImpulse = 0;
}
-bool ConeTwistJointSW::setup(real_t p_step) {
+bool ConeTwistJointSW::setup(real_t p_timestep) {
m_appliedImpulse = real_t(0.);
//set bias, sign, clear accumulator
@@ -237,7 +237,7 @@ bool ConeTwistJointSW::setup(real_t p_step) {
return true;
}
-void ConeTwistJointSW::solve(real_t timeStep) {
+void ConeTwistJointSW::solve(real_t p_timestep) {
Vector3 pivotAInW = A->get_transform().xform(m_rbAFrame.origin);
Vector3 pivotBInW = B->get_transform().xform(m_rbBFrame.origin);
@@ -261,7 +261,7 @@ void ConeTwistJointSW::solve(real_t timeStep) {
rel_vel = normal.dot(vel);
//positional error (zeroth order error)
real_t depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal
- real_t impulse = depth * tau / timeStep * jacDiagABInv - rel_vel * jacDiagABInv;
+ real_t impulse = depth * tau / p_timestep * jacDiagABInv - rel_vel * jacDiagABInv;
m_appliedImpulse += impulse;
Vector3 impulse_vector = normal * impulse;
A->apply_impulse(pivotAInW - A->get_transform().origin, impulse_vector);
@@ -276,7 +276,7 @@ void ConeTwistJointSW::solve(real_t timeStep) {
// solve swing limit
if (m_solveSwingLimit) {
- real_t amplitude = ((angVelB - angVelA).dot(m_swingAxis) * m_relaxationFactor * m_relaxationFactor + m_swingCorrection * (real_t(1.) / timeStep) * m_biasFactor);
+ real_t amplitude = ((angVelB - angVelA).dot(m_swingAxis) * m_relaxationFactor * m_relaxationFactor + m_swingCorrection * (real_t(1.) / p_timestep) * m_biasFactor);
real_t impulseMag = amplitude * m_kSwing;
// Clamp the accumulated impulse
@@ -292,7 +292,7 @@ void ConeTwistJointSW::solve(real_t timeStep) {
// solve twist limit
if (m_solveTwistLimit) {
- real_t amplitude = ((angVelB - angVelA).dot(m_twistAxis) * m_relaxationFactor * m_relaxationFactor + m_twistCorrection * (real_t(1.) / timeStep) * m_biasFactor);
+ real_t amplitude = ((angVelB - angVelA).dot(m_twistAxis) * m_relaxationFactor * m_relaxationFactor + m_twistCorrection * (real_t(1.) / p_timestep) * m_biasFactor);
real_t impulseMag = amplitude * m_kTwist;
// Clamp the accumulated impulse
diff --git a/servers/physics/joints/cone_twist_joint_sw.h b/servers/physics/joints/cone_twist_joint_sw.h
index 65d26d0ca7..f0e029712c 100644
--- a/servers/physics/joints/cone_twist_joint_sw.h
+++ b/servers/physics/joints/cone_twist_joint_sw.h
@@ -104,8 +104,8 @@ public:
public:
virtual PhysicsServer::JointType get_type() const { return PhysicsServer::JOINT_CONE_TWIST; }
- virtual bool setup(real_t p_step);
- virtual void solve(real_t p_step);
+ virtual bool setup(real_t p_timestep);
+ virtual void solve(real_t p_timestep);
ConeTwistJointSW(BodySW *rbA, BodySW *rbB, const Transform &rbAFrame, const Transform &rbBFrame);
diff --git a/servers/physics/joints/generic_6dof_joint_sw.cpp b/servers/physics/joints/generic_6dof_joint_sw.cpp
index e4349bda9a..e1cd6ee7e5 100644
--- a/servers/physics/joints/generic_6dof_joint_sw.cpp
+++ b/servers/physics/joints/generic_6dof_joint_sw.cpp
@@ -298,7 +298,7 @@ bool Generic6DOFJointSW::testAngularLimitMotor(int axis_index) {
return m_angularLimits[axis_index].needApplyTorques();
}
-bool Generic6DOFJointSW::setup(real_t p_step) {
+bool Generic6DOFJointSW::setup(real_t p_timestep) {
// Clear accumulated impulses for the next simulation step
m_linearLimits.m_accumulatedImpulse = Vector3(real_t(0.), real_t(0.), real_t(0.));
@@ -347,8 +347,8 @@ bool Generic6DOFJointSW::setup(real_t p_step) {
return true;
}
-void Generic6DOFJointSW::solve(real_t timeStep) {
- m_timeStep = timeStep;
+void Generic6DOFJointSW::solve(real_t p_timestep) {
+ m_timeStep = p_timestep;
//calculateTransforms();
diff --git a/servers/physics/joints/generic_6dof_joint_sw.h b/servers/physics/joints/generic_6dof_joint_sw.h
index 4af0c93876..587a5850df 100644
--- a/servers/physics/joints/generic_6dof_joint_sw.h
+++ b/servers/physics/joints/generic_6dof_joint_sw.h
@@ -264,8 +264,8 @@ public:
virtual PhysicsServer::JointType get_type() const { return PhysicsServer::JOINT_6DOF; }
- virtual bool setup(real_t p_step);
- virtual void solve(real_t p_step);
+ virtual bool setup(real_t p_timestep);
+ virtual void solve(real_t p_timestep);
//! Calcs global transform of the offsets
/*!
diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h
index bae2839b71..818922a989 100644
--- a/servers/physics/physics_server_sw.h
+++ b/servers/physics/physics_server_sw.h
@@ -127,7 +127,7 @@ public:
virtual void area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value);
virtual void area_set_transform(RID p_area, const Transform &p_transform);
- virtual Variant area_get_param(RID p_parea, AreaParameter p_param) const;
+ virtual Variant area_get_param(RID p_area, AreaParameter p_param) const;
virtual Transform area_get_transform(RID p_area) const;
virtual void area_set_ray_pickable(RID p_area, bool p_enable);
diff --git a/servers/physics/shape_sw.h b/servers/physics/shape_sw.h
index aa1975b655..52623c019d 100644
--- a/servers/physics/shape_sw.h
+++ b/servers/physics/shape_sw.h
@@ -385,7 +385,7 @@ public:
virtual void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
virtual Vector3 get_support(const Vector3 &p_normal) const;
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_point, Vector3 &r_normal) const;
virtual bool intersect_point(const Vector3 &p_point) const;
virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
diff --git a/servers/physics_2d/broad_phase_2d_basic.cpp b/servers/physics_2d/broad_phase_2d_basic.cpp
index a0bcd37fbc..76094ad98c 100644
--- a/servers/physics_2d/broad_phase_2d_basic.cpp
+++ b/servers/physics_2d/broad_phase_2d_basic.cpp
@@ -124,10 +124,10 @@ void BroadPhase2DBasic::set_pair_callback(PairCallback p_pair_callback, void *p_
pair_userdata = p_userdata;
pair_callback = p_pair_callback;
}
-void BroadPhase2DBasic::set_unpair_callback(UnpairCallback p_pair_callback, void *p_userdata) {
+void BroadPhase2DBasic::set_unpair_callback(UnpairCallback p_unpair_callback, void *p_userdata) {
unpair_userdata = p_userdata;
- unpair_callback = p_pair_callback;
+ unpair_callback = p_unpair_callback;
}
void BroadPhase2DBasic::update() {
diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.h b/servers/physics_2d/broad_phase_2d_hash_grid.h
index 2234557857..0cb3edb94f 100644
--- a/servers/physics_2d/broad_phase_2d_hash_grid.h
+++ b/servers/physics_2d/broad_phase_2d_hash_grid.h
@@ -167,7 +167,7 @@ class BroadPhase2DHashGrid : public BroadPhase2DSW {
void _check_motion(Element *p_elem);
public:
- virtual ID create(CollisionObject2DSW *p_object_, int p_subindex = 0);
+ virtual ID create(CollisionObject2DSW *p_object, int p_subindex = 0);
virtual void move(ID p_id, const Rect2 &p_aabb);
virtual void set_static(ID p_id, bool p_static);
virtual void remove(ID p_id);
diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h
index 5e29132e8d..ad8edb0b3d 100644
--- a/servers/physics_2d/collision_object_2d_sw.h
+++ b/servers/physics_2d/collision_object_2d_sw.h
@@ -90,7 +90,7 @@ protected:
void _set_static(bool p_static);
virtual void _shapes_changed() = 0;
- void _set_space(Space2DSW *space);
+ void _set_space(Space2DSW *p_space);
CollisionObject2DSW(Type p_type);
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index c698d614b8..3805075ac3 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -722,11 +722,11 @@ uint32_t Physics2DServerSW::body_get_object_instance_id(RID p_body) const {
return body->get_instance_id();
};
-void Physics2DServerSW::body_set_collision_layer(RID p_body, uint32_t p_flags) {
+void Physics2DServerSW::body_set_collision_layer(RID p_body, uint32_t p_layer) {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
- body->set_collision_layer(p_flags);
+ body->set_collision_layer(p_layer);
};
uint32_t Physics2DServerSW::body_get_collision_layer(RID p_body) const {
@@ -737,11 +737,11 @@ uint32_t Physics2DServerSW::body_get_collision_layer(RID p_body) const {
return body->get_collision_layer();
};
-void Physics2DServerSW::body_set_collision_mask(RID p_body, uint32_t p_flags) {
+void Physics2DServerSW::body_set_collision_mask(RID p_body, uint32_t p_mask) {
Body2DSW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
- body->set_collision_mask(p_flags);
+ body->set_collision_mask(p_mask);
};
uint32_t Physics2DServerSW::body_get_collision_mask(RID p_body) const {
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index 830ba91c98..e767aad1da 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -134,7 +134,7 @@ public:
virtual void area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value);
virtual void area_set_transform(RID p_area, const Transform2D &p_transform);
- virtual Variant area_get_param(RID p_parea, AreaParameter p_param) const;
+ virtual Variant area_get_param(RID p_area, AreaParameter p_param) const;
virtual Transform2D area_get_transform(RID p_area) const;
virtual void area_set_monitorable(RID p_area, bool p_monitorable);
virtual void area_set_collision_mask(RID p_area, uint32_t p_mask);
@@ -169,8 +169,8 @@ public:
virtual void body_remove_shape(RID p_body, int p_shape_idx);
virtual void body_clear_shapes(RID p_body);
- virtual void body_set_shape_disabled(RID p_body, int p_shape, bool p_disabled);
- virtual void body_set_shape_as_one_way_collision(RID p_body, int p_shape, bool p_enabled);
+ virtual void body_set_shape_disabled(RID p_body, int p_shape_idx, bool p_disabled);
+ virtual void body_set_shape_as_one_way_collision(RID p_body, int p_shape_idx, bool p_enable);
virtual void body_attach_object_instance_id(RID p_body, uint32_t p_ID);
virtual uint32_t body_get_object_instance_id(RID p_body) const;
@@ -182,7 +182,7 @@ public:
virtual uint32_t body_get_collision_layer(RID p_body) const;
virtual void body_set_collision_mask(RID p_body, uint32_t p_mask);
- virtual uint32_t body_get_collision_mask(RID p_) const;
+ virtual uint32_t body_get_collision_mask(RID p_body) const;
virtual void body_set_param(RID p_body, BodyParameter p_param, real_t p_value);
virtual real_t body_get_param(RID p_body, BodyParameter p_param) const;
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 7b0e5ab445..27732b9c29 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -245,11 +245,11 @@ Dictionary Physics2DDirectSpaceState::_intersect_ray(const Vector2 &p_from, cons
return d;
}
-Array Physics2DDirectSpaceState::_intersect_shape(const Ref<Physics2DShapeQueryParameters> &psq, int p_max_results) {
+Array Physics2DDirectSpaceState::_intersect_shape(const Ref<Physics2DShapeQueryParameters> &p_shape_query, int p_max_results) {
Vector<ShapeResult> sr;
sr.resize(p_max_results);
- int rc = intersect_shape(psq->shape, psq->transform, psq->motion, psq->margin, sr.ptr(), sr.size(), psq->exclude, psq->collision_layer, psq->object_type_mask);
+ int rc = intersect_shape(p_shape_query->shape, p_shape_query->transform, p_shape_query->motion, p_shape_query->margin, sr.ptr(), sr.size(), p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
Array ret;
ret.resize(rc);
for (int i = 0; i < rc; i++) {
@@ -266,10 +266,10 @@ Array Physics2DDirectSpaceState::_intersect_shape(const Ref<Physics2DShapeQueryP
return ret;
}
-Array Physics2DDirectSpaceState::_cast_motion(const Ref<Physics2DShapeQueryParameters> &psq) {
+Array Physics2DDirectSpaceState::_cast_motion(const Ref<Physics2DShapeQueryParameters> &p_shape_query) {
float closest_safe, closest_unsafe;
- bool res = cast_motion(psq->shape, psq->transform, psq->motion, psq->margin, closest_safe, closest_unsafe, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = cast_motion(p_shape_query->shape, p_shape_query->transform, p_shape_query->motion, p_shape_query->margin, closest_safe, closest_unsafe, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
if (!res)
return Array();
Array ret;
@@ -307,12 +307,12 @@ Array Physics2DDirectSpaceState::_intersect_point(const Vector2 &p_point, int p_
return r;
}
-Array Physics2DDirectSpaceState::_collide_shape(const Ref<Physics2DShapeQueryParameters> &psq, int p_max_results) {
+Array Physics2DDirectSpaceState::_collide_shape(const Ref<Physics2DShapeQueryParameters> &p_shape_query, int p_max_results) {
Vector<Vector2> ret;
ret.resize(p_max_results * 2);
int rc = 0;
- bool res = collide_shape(psq->shape, psq->transform, psq->motion, psq->margin, ret.ptr(), p_max_results, rc, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = collide_shape(p_shape_query->shape, p_shape_query->transform, p_shape_query->motion, p_shape_query->margin, ret.ptr(), p_max_results, rc, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
if (!res)
return Array();
Array r;
@@ -321,11 +321,11 @@ Array Physics2DDirectSpaceState::_collide_shape(const Ref<Physics2DShapeQueryPar
r[i] = ret[i];
return r;
}
-Dictionary Physics2DDirectSpaceState::_get_rest_info(const Ref<Physics2DShapeQueryParameters> &psq) {
+Dictionary Physics2DDirectSpaceState::_get_rest_info(const Ref<Physics2DShapeQueryParameters> &p_shape_query) {
ShapeRestInfo sri;
- bool res = rest_info(psq->shape, psq->transform, psq->motion, psq->margin, &sri, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = rest_info(p_shape_query->shape, p_shape_query->transform, p_shape_query->motion, p_shape_query->margin, &sri, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
Dictionary r;
if (!res)
return r;
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index fbf104c6ac..86bf6253ee 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -270,11 +270,11 @@ Dictionary PhysicsDirectSpaceState::_intersect_ray(const Vector3 &p_from, const
return d;
}
-Array PhysicsDirectSpaceState::_intersect_shape(const Ref<PhysicsShapeQueryParameters> &psq, int p_max_results) {
+Array PhysicsDirectSpaceState::_intersect_shape(const Ref<PhysicsShapeQueryParameters> &p_shape_query, int p_max_results) {
Vector<ShapeResult> sr;
sr.resize(p_max_results);
- int rc = intersect_shape(psq->shape, psq->transform, psq->margin, sr.ptr(), sr.size(), psq->exclude, psq->collision_layer, psq->object_type_mask);
+ int rc = intersect_shape(p_shape_query->shape, p_shape_query->transform, p_shape_query->margin, sr.ptr(), sr.size(), p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
Array ret;
ret.resize(rc);
for (int i = 0; i < rc; i++) {
@@ -290,10 +290,10 @@ Array PhysicsDirectSpaceState::_intersect_shape(const Ref<PhysicsShapeQueryParam
return ret;
}
-Array PhysicsDirectSpaceState::_cast_motion(const Ref<PhysicsShapeQueryParameters> &psq, const Vector3 &p_motion) {
+Array PhysicsDirectSpaceState::_cast_motion(const Ref<PhysicsShapeQueryParameters> &p_shape_query, const Vector3 &p_motion) {
float closest_safe, closest_unsafe;
- bool res = cast_motion(psq->shape, psq->transform, p_motion, psq->margin, closest_safe, closest_unsafe, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = cast_motion(p_shape_query->shape, p_shape_query->transform, p_motion, p_shape_query->margin, closest_safe, closest_unsafe, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
if (!res)
return Array();
Array ret;
@@ -302,12 +302,12 @@ Array PhysicsDirectSpaceState::_cast_motion(const Ref<PhysicsShapeQueryParameter
ret[1] = closest_unsafe;
return ret;
}
-Array PhysicsDirectSpaceState::_collide_shape(const Ref<PhysicsShapeQueryParameters> &psq, int p_max_results) {
+Array PhysicsDirectSpaceState::_collide_shape(const Ref<PhysicsShapeQueryParameters> &p_shape_query, int p_max_results) {
Vector<Vector3> ret;
ret.resize(p_max_results * 2);
int rc = 0;
- bool res = collide_shape(psq->shape, psq->transform, psq->margin, ret.ptr(), p_max_results, rc, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = collide_shape(p_shape_query->shape, p_shape_query->transform, p_shape_query->margin, ret.ptr(), p_max_results, rc, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
if (!res)
return Array();
Array r;
@@ -316,11 +316,11 @@ Array PhysicsDirectSpaceState::_collide_shape(const Ref<PhysicsShapeQueryParamet
r[i] = ret[i];
return r;
}
-Dictionary PhysicsDirectSpaceState::_get_rest_info(const Ref<PhysicsShapeQueryParameters> &psq) {
+Dictionary PhysicsDirectSpaceState::_get_rest_info(const Ref<PhysicsShapeQueryParameters> &p_shape_query) {
ShapeRestInfo sri;
- bool res = rest_info(psq->shape, psq->transform, psq->margin, &sri, psq->exclude, psq->collision_layer, psq->object_type_mask);
+ bool res = rest_info(p_shape_query->shape, p_shape_query->transform, p_shape_query->margin, &sri, p_shape_query->exclude, p_shape_query->collision_layer, p_shape_query->object_type_mask);
Dictionary r;
if (!res)
return r;
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index 584f45412e..dcc16794e7 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -392,14 +392,14 @@ void VisualServerCanvas::canvas_item_set_draw_behind_parent(RID p_item, bool p_e
canvas_item->behind = p_enable;
}
-void VisualServerCanvas::canvas_item_add_line(RID p_item, const Point2 &p_from, const Point2 &p_to, const Color &p_colors, float p_width, bool p_antialiased) {
+void VisualServerCanvas::canvas_item_add_line(RID p_item, const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width, bool p_antialiased) {
Item *canvas_item = canvas_item_owner.getornull(p_item);
ERR_FAIL_COND(!canvas_item);
Item::CommandLine *line = memnew(Item::CommandLine);
ERR_FAIL_COND(!line);
- line->color = p_colors;
+ line->color = p_color;
line->from = p_from;
line->to = p_to;
line->width = p_width;
diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h
index 48e3186ece..25d4973cb7 100644
--- a/servers/visual/visual_server_canvas.h
+++ b/servers/visual/visual_server_canvas.h
@@ -171,7 +171,7 @@ public:
void canvas_item_set_draw_behind_parent(RID p_item, bool p_enable);
void canvas_item_add_line(RID p_item, const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width = 1.0, bool p_antialiased = false);
- void canvas_item_add_polyline(RID p_item, const Vector<Point2> &p_line, const Vector<Color> &p_colors, float p_width = 1.0, bool p_antialiased = false);
+ void canvas_item_add_polyline(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width = 1.0, bool p_antialiased = false);
void canvas_item_add_rect(RID p_item, const Rect2 &p_rect, const Color &p_color);
void canvas_item_add_circle(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color);
void canvas_item_add_texture_rect(RID p_item, const Rect2 &p_rect, RID p_texture, bool p_tile = false, const Color &p_modulate = Color(1, 1, 1), bool p_transpose = false, RID p_normal_map = RID());
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index d0990f0bc8..5faf0e67ca 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -2645,11 +2645,11 @@ static float _get_normal_advance(const Vector3 &p_normal) {
return 1.0 / normal.dot(unorm);
}
-void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, const GIProbeDataCell *cells, InstanceGIProbeData::LocalData *local_data, const uint32_t *leaves, int leaf_count, const InstanceGIProbeData::LightCache &light_cache, int sign) {
+void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, const GIProbeDataCell *cells, InstanceGIProbeData::LocalData *local_data, const uint32_t *leaves, int p_leaf_count, const InstanceGIProbeData::LightCache &light_cache, int p_sign) {
- int light_r = int(light_cache.color.r * light_cache.energy * 1024.0) * sign;
- int light_g = int(light_cache.color.g * light_cache.energy * 1024.0) * sign;
- int light_b = int(light_cache.color.b * light_cache.energy * 1024.0) * sign;
+ int light_r = int(light_cache.color.r * light_cache.energy * 1024.0) * p_sign;
+ int light_g = int(light_cache.color.g * light_cache.energy * 1024.0) * p_sign;
+ int light_b = int(light_cache.color.b * light_cache.energy * 1024.0) * p_sign;
float limits[3] = { float(header->width), float(header->height), float(header->depth) };
Plane clip[3];
@@ -2685,7 +2685,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
uint64_t us = OS::get_singleton()->get_ticks_usec();
- for (int i = 0; i < leaf_count; i++) {
+ for (int i = 0; i < p_leaf_count; i++) {
uint32_t idx = leaves[i];
@@ -2750,7 +2750,7 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
float local_radius = light_cache.radius * light_cache.transform.basis.get_axis(2).length();
- for (int i = 0; i < leaf_count; i++) {
+ for (int i = 0; i < p_leaf_count; i++) {
uint32_t idx = leaves[i];
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index a4895382a4..910e75c3e3 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -567,7 +567,7 @@ public:
_FORCE_INLINE_ uint32_t _gi_bake_find_cell(const GIProbeDataCell *cells, int x, int y, int z, int p_cell_subdiv);
void _bake_gi_downscale_light(int p_idx, int p_level, const GIProbeDataCell *p_cells, const GIProbeDataHeader *p_header, InstanceGIProbeData::LocalData *p_local_data, float p_propagate);
void _bake_gi_probe_light(const GIProbeDataHeader *header, const GIProbeDataCell *cells, InstanceGIProbeData::LocalData *local_data, const uint32_t *leaves, int p_leaf_count, const InstanceGIProbeData::LightCache &light_cache, int p_sign);
- void _bake_gi_probe(Instance *p_probe);
+ void _bake_gi_probe(Instance *p_gi_probe);
bool _check_gi_probe(Instance *p_gi_probe);
void _setup_gi_probe(Instance *p_instance);