diff options
Diffstat (limited to 'scene/3d/gpu_particles_3d.h')
-rw-r--r-- | scene/3d/gpu_particles_3d.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scene/3d/gpu_particles_3d.h b/scene/3d/gpu_particles_3d.h index e04473727d..0d8dadd31d 100644 --- a/scene/3d/gpu_particles_3d.h +++ b/scene/3d/gpu_particles_3d.h @@ -64,6 +64,7 @@ private: bool local_coords; int fixed_fps; bool fractional_delta; + NodePath sub_emitter; Ref<Material> process_material; @@ -71,6 +72,8 @@ private: Vector<Ref<Mesh>> draw_passes; + void _attach_sub_emitter(); + protected: static void _bind_methods(); void _notification(int p_what); @@ -121,13 +124,27 @@ public: virtual String get_configuration_warning() const override; + void set_sub_emitter(const NodePath &p_path); + NodePath get_sub_emitter() const; + void restart(); + enum EmitFlags { + EMIT_FLAG_POSITION = RS::PARTICLES_EMIT_FLAG_POSITION, + EMIT_FLAG_ROTATION_SCALE = RS::PARTICLES_EMIT_FLAG_ROTATION_SCALE, + EMIT_FLAG_VELOCITY = RS::PARTICLES_EMIT_FLAG_VELOCITY, + EMIT_FLAG_COLOR = RS::PARTICLES_EMIT_FLAG_COLOR, + EMIT_FLAG_CUSTOM = RS::PARTICLES_EMIT_FLAG_CUSTOM + }; + + void emit_particle(const Transform &p_transform, const Vector3 &p_velocity, const Color &p_color, const Color &p_custom, uint32_t p_emit_flags); + AABB capture_aabb() const; GPUParticles3D(); ~GPUParticles3D(); }; VARIANT_ENUM_CAST(GPUParticles3D::DrawOrder) +VARIANT_ENUM_CAST(GPUParticles3D::EmitFlags) #endif // PARTICLES_H |