diff options
Diffstat (limited to 'servers/rendering_server.h')
-rw-r--r-- | servers/rendering_server.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 7dae45f126..7680dc1390 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -578,6 +578,7 @@ public: virtual void particles_set_process_material(RID p_particles, RID p_material) = 0; virtual void particles_set_fixed_fps(RID p_particles, int p_fps) = 0; virtual void particles_set_fractional_delta(RID p_particles, bool p_enable) = 0; + virtual void particles_set_collision_base_size(RID p_particles, float p_size) = 0; virtual bool particles_is_inactive(RID p_particles) = 0; virtual void particles_request_process(RID p_particles) = 0; virtual void particles_restart(RID p_particles) = 0; @@ -609,6 +610,43 @@ public: virtual void particles_set_emission_transform(RID p_particles, const Transform &p_transform) = 0; //this is only used for 2D, in 3D it's automatic + /* PARTICLES COLLISION API */ + + virtual RID particles_collision_create() = 0; + + enum ParticlesCollisionType { + PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT, + PARTICLES_COLLISION_TYPE_BOX_ATTRACT, + PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT, + PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE, + PARTICLES_COLLISION_TYPE_BOX_COLLIDE, + PARTICLES_COLLISION_TYPE_SDF_COLLIDE, + PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE, + }; + + virtual void particles_collision_set_collision_type(RID p_particles_collision, ParticlesCollisionType p_type) = 0; + virtual void particles_collision_set_cull_mask(RID p_particles_collision, uint32_t p_cull_mask) = 0; + virtual void particles_collision_set_sphere_radius(RID p_particles_collision, float p_radius) = 0; //for spheres + virtual void particles_collision_set_box_extents(RID p_particles_collision, const Vector3 &p_extents) = 0; //for non-spheres + virtual void particles_collision_set_attractor_strength(RID p_particles_collision, float p_strength) = 0; + virtual void particles_collision_set_attractor_directionality(RID p_particles_collision, float p_directionality) = 0; + virtual void particles_collision_set_attractor_attenuation(RID p_particles_collision, float p_curve) = 0; + virtual void particles_collision_set_field_texture(RID p_particles_collision, RID p_texture) = 0; //for SDF and vector field, heightfield is dynamic + + virtual void particles_collision_height_field_update(RID p_particles_collision) = 0; //for SDF and vector field + + enum ParticlesCollisionHeightfieldResolution { //longest axis resolution + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX, + }; + + virtual void particles_collision_set_height_field_resolution(RID p_particles_collision, ParticlesCollisionHeightfieldResolution p_resolution) = 0; //for SDF and vector field + /* CAMERA API */ virtual RID camera_create() = 0; @@ -965,6 +1003,7 @@ public: INSTANCE_MULTIMESH, INSTANCE_IMMEDIATE, INSTANCE_PARTICLES, + INSTANCE_PARTICLES_COLLISION, INSTANCE_LIGHT, INSTANCE_REFLECTION_PROBE, INSTANCE_DECAL, |