Struct in ldk_grass_system.h

LDKGrassPatch

Opaque identity of one patch. Individual blades are intentionally hidden.

typedef struct LDKGrassPatch{
  u32 index;
  u32 version;
}LDKGrassPatch;
Struct in ldk_grass_system.h

LDKGrassPatchDesc

Per-region state. Visual configuration comes from LDKGrassSystem.

typedef struct LDKGrassPatchDesc{
  LDKGrassPlane plane;
  float density_scale;
  u32 seed;
}LDKGrassPatchDesc;
Struct in ldk_grass_system.h

LDKGrassPlane

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;
Function in ldk_grass_system.h

ldk_grass_clear

Remove every live patch. Renderer-side style resources remain cached.

LDK_API void ldk_grass_clear(void);
Function in ldk_grass_system.h

ldk_grass_patch_is_valid

True while patch identifies a live entry in the active GrassSystem.

LDK_API bool ldk_grass_patch_is_valid(LDKGrassPatch patch);

Parameters

LDKGrassPatch patch
Patch used by this operation.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_grass_system.h

ldk_grass_remove

Remove a patch and every opaque blade belonging to it.

LDK_API bool ldk_grass_remove(LDKGrassPatch patch);

Parameters

LDKGrassPatch patch
Patch used by this operation.

Returns

True if the operation succeeds; false otherwise.