diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2021-08-12 09:07:47 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-08-12 11:35:31 -0500 |
commit | 03e2544d50b73a56907694fc45cb82ad11c74a95 (patch) | |
tree | f7a516477af7169d5ecb4745d29b57c757a5584e /scene/3d/gpu_particles_3d.cpp | |
parent | c89ad92c96a9b99d8550acda47e71948dffec1cd (diff) |
Use real_t and double where appropriate in Particles
Diffstat (limited to 'scene/3d/gpu_particles_3d.cpp')
-rw-r--r-- | scene/3d/gpu_particles_3d.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 8b8b53c3bf..7a6410ec51 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -86,12 +86,12 @@ void GPUParticles3D::set_pre_process_time(double p_time) { RS::get_singleton()->particles_set_pre_process_time(particles, pre_process_time); } -void GPUParticles3D::set_explosiveness_ratio(float p_ratio) { +void GPUParticles3D::set_explosiveness_ratio(real_t p_ratio) { explosiveness_ratio = p_ratio; RS::get_singleton()->particles_set_explosiveness_ratio(particles, explosiveness_ratio); } -void GPUParticles3D::set_randomness_ratio(float p_ratio) { +void GPUParticles3D::set_randomness_ratio(real_t p_ratio) { randomness_ratio = p_ratio; RS::get_singleton()->particles_set_randomness_ratio(particles, randomness_ratio); } @@ -123,7 +123,7 @@ void GPUParticles3D::set_speed_scale(double p_scale) { RS::get_singleton()->particles_set_speed_scale(particles, p_scale); } -void GPUParticles3D::set_collision_base_size(float p_size) { +void GPUParticles3D::set_collision_base_size(real_t p_size) { collision_base_size = p_size; RS::get_singleton()->particles_set_collision_base_size(particles, p_size); } @@ -148,11 +148,11 @@ double GPUParticles3D::get_pre_process_time() const { return pre_process_time; } -float GPUParticles3D::get_explosiveness_ratio() const { +real_t GPUParticles3D::get_explosiveness_ratio() const { return explosiveness_ratio; } -float GPUParticles3D::get_randomness_ratio() const { +real_t GPUParticles3D::get_randomness_ratio() const { return randomness_ratio; } @@ -172,7 +172,7 @@ double GPUParticles3D::get_speed_scale() const { return speed_scale; } -float GPUParticles3D::get_collision_base_size() const { +real_t GPUParticles3D::get_collision_base_size() const { return collision_base_size; } @@ -186,7 +186,8 @@ void GPUParticles3D::set_trail_enabled(bool p_enabled) { RS::get_singleton()->particles_set_trails(particles, trail_enabled, trail_length); update_configuration_warnings(); } -void GPUParticles3D::set_trail_length(float p_seconds) { + +void GPUParticles3D::set_trail_length(double p_seconds) { ERR_FAIL_COND(p_seconds < 0.001); trail_length = p_seconds; RS::get_singleton()->particles_set_trails(particles, trail_enabled, trail_length); @@ -195,7 +196,8 @@ void GPUParticles3D::set_trail_length(float p_seconds) { bool GPUParticles3D::is_trail_enabled() const { return trail_enabled; } -float GPUParticles3D::get_trail_length() const { + +double GPUParticles3D::get_trail_length() const { return trail_length; } |