LDKGrassPatch
Opaque identity of one patch. Individual blades are intentionally hidden.
typedef struct LDKGrassPatch{
u32 index;
u32 version;
}LDKGrassPatch;
Opaque identity of one patch. Individual blades are intentionally hidden.
typedef struct LDKGrassPatch{
u32 index;
u32 version;
}LDKGrassPatch;
Per-region state. Visual configuration comes from LDKGrassSystem.
typedef struct LDKGrassPatchDesc{
LDKGrassPlane plane;
float density_scale;
u32 seed;
}LDKGrassPatchDesc;
Flat target geometry. The complete parallelogram, including its edges, is a valid generation area. origin + axis_u + axis_v is the opposite corner.
typedef struct LDKGrassPlane{
Vec3 origin;
Vec3 axis_u;
Vec3 axis_v;
}LDKGrassPlane;
Generate and retain one patch using a configured grass type.
LDK_API LDKGrassPatch ldk_grass_add(
LDKGrassTypeId type_id,
const LDKGrassPatchDesc *desc
);
LDKGrassTypeId type_idconst LDKGrassPatchDesc *descThe requested value.
Remove every live patch. Renderer-side style resources remain cached.
LDK_API void ldk_grass_clear(void);
Initialize an empty one-square-unit patch with density scale 1.
LDK_API void ldk_grass_patch_desc_defaults(LDKGrassPatchDesc *out_desc);
LDKGrassPatchDesc *out_descTrue while patch identifies a live entry in the active GrassSystem.
LDK_API bool ldk_grass_patch_is_valid(LDKGrassPatch patch);
LDKGrassPatch patchTrue when the queried condition holds; false otherwise.
Return an invalid grass patch handle.
LDK_API LDKGrassPatch ldk_grass_patch_null(void);
An invalid or empty handle.
Remove a patch and every opaque blade belonging to it.
LDK_API bool ldk_grass_remove(LDKGrassPatch patch);
LDKGrassPatch patchTrue if the operation succeeds; false otherwise.
Replace a patch recipe and regenerate its persistent blade transforms.
LDK_API bool ldk_grass_update(
LDKGrassPatch patch,
LDKGrassTypeId type_id,
const LDKGrassPatchDesc *desc
);
LDKGrassPatch patchLDKGrassTypeId type_idconst LDKGrassPatchDesc *descTrue if the operation succeeds; false otherwise.