LDKWaterSystem
typedef struct LDKWaterSystem{
float water_level;
float center_x;
float center_z;
float width;
float depth;
float cell_size;
u32 chunk_size;
u32 shallow_color;
u32 deep_color;
float depth_color_distance;
float edge_fade_distance;
float wave_0_height;
float wave_0_length;
float wave_0_speed;
float wave_0_direction_degrees;
float wave_1_height;
float wave_1_length;
float wave_1_speed;
float wave_1_direction_degrees;
float wave_2_height;
float wave_2_length;
float wave_2_speed;
float wave_2_direction_degrees;
LDKAssetImage normal_texture;
float detail_scale;
float detail_strength;
float detail_speed;
float specular;
float shininess;
LDKAssetImage noise_texture;
float noise_scale;
float noise_speed;
float distortion_strength;
LDKAssetImage foam_texture;
u32 foam_color;
float foam_width;
float foam_strength;
float foam_scale;
float foam_speed;
float foam_cutoff;
float surface_foam_strength;
float shore_range;
float shore_wave_length;
float shore_wave_speed;
float shore_foam_strength;
LDKAssetImage caustics_texture;
float caustics_scale;
float caustics_strength;
float caustics_speed;
float caustics_depth;
u32 chunk_count;
u32 visible_chunk_count;
u32 mesh_update_count;
bool has_geometry;
}LDKWaterSystem;
ldk_water_height_at_world
Query the animated surface inside the configured rectangle.
LDK_API bool ldk_water_height_at_world(
float world_x,
float world_z,
float *out_height
);
Parameters
float world_x
- World-space X coordinate.
float world_z
- World-space Z coordinate.
float *out_height
- Receives the surface height in world-space units.
Returns
True if the operation succeeds; false otherwise.
ldk_water_system_defaults
Set default values for water system.
LDK_API void ldk_water_system_defaults(LDKWaterSystem *system);
ldk_water_system_initialize
Initialize the water system.
LDK_API int ldk_water_system_initialize(void *data);
Parameters
void *data
- Source data or system-owned context for this operation.
Returns
System initialization status code.
ldk_water_system_is_active
Check whether the water system is active.
LDK_API bool ldk_water_system_is_active(void);
Returns
True when the queried condition holds; false otherwise.
ldk_water_system_terminate
Shut down the water system.
LDK_API void ldk_water_system_terminate(void *data);
Parameters
void *data
- Source data or system-owned context for this operation.
ldk_water_system_update
Update the water system.
LDK_API void ldk_water_system_update(
void *data,
const LDKEntityGroup *group,
float dt
);
Parameters
void *data
- Source data or system-owned context for this operation.
const LDKEntityGroup *group
- Entity group used for this system update.
float dt
- Elapsed time since the preceding update, in seconds.