diff options
Diffstat (limited to 'scene/3d/gpu_particles_3d.cpp')
-rw-r--r-- | scene/3d/gpu_particles_3d.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/scene/3d/gpu_particles_3d.cpp b/scene/3d/gpu_particles_3d.cpp index 44cd7c10d8..d56228df66 100644 --- a/scene/3d/gpu_particles_3d.cpp +++ b/scene/3d/gpu_particles_3d.cpp @@ -30,11 +30,8 @@ #include "gpu_particles_3d.h" -#include "core/os/os.h" #include "scene/resources/particles_material.h" -#include "servers/rendering_server.h" - AABB GPUParticles3D::get_aabb() const { return AABB(); } @@ -59,7 +56,7 @@ void GPUParticles3D::set_amount(int p_amount) { RS::get_singleton()->particles_set_amount(particles, amount); } -void GPUParticles3D::set_lifetime(float p_lifetime) { +void GPUParticles3D::set_lifetime(double p_lifetime) { ERR_FAIL_COND_MSG(p_lifetime <= 0, "Particles lifetime must be greater than 0."); lifetime = p_lifetime; RS::get_singleton()->particles_set_lifetime(particles, lifetime); @@ -81,17 +78,17 @@ void GPUParticles3D::set_one_shot(bool p_one_shot) { } } -void GPUParticles3D::set_pre_process_time(float p_time) { +void GPUParticles3D::set_pre_process_time(double p_time) { pre_process_time = 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); } @@ -118,12 +115,12 @@ void GPUParticles3D::set_process_material(const Ref<Material> &p_material) { update_configuration_warnings(); } -void GPUParticles3D::set_speed_scale(float p_scale) { +void GPUParticles3D::set_speed_scale(double p_scale) { speed_scale = 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); } @@ -136,7 +133,7 @@ int GPUParticles3D::get_amount() const { return amount; } -float GPUParticles3D::get_lifetime() const { +double GPUParticles3D::get_lifetime() const { return lifetime; } @@ -144,15 +141,15 @@ bool GPUParticles3D::get_one_shot() const { return one_shot; } -float GPUParticles3D::get_pre_process_time() const { +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; } @@ -168,11 +165,11 @@ Ref<Material> GPUParticles3D::get_process_material() const { return process_material; } -float GPUParticles3D::get_speed_scale() const { +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 +183,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 +193,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; } @@ -485,6 +484,7 @@ void GPUParticles3D::set_skin(const Ref<Skin> &p_skin) { skin = p_skin; _skinning_changed(); } + Ref<Skin> GPUParticles3D::get_skin() const { return skin; } |