Enum in ldk_transform.h

LDKTransformFlags

typedef enum LDKTransformFlags{
  LDK_TRANSFORM_FLAG_NONE=0,
  LDK_TRANSFORM_FLAG_WORLD_DIRTY=1<<0,
}LDKTransformFlags;
Struct in ldk_transform.h

LDKTransform

typedef struct LDKTransform{
  u32 flags;
  Vec3 local_position;
  Vec3 local_scale;
  Quat local_rotation;
  Mat4 world_matrix;
  LDKEntity parent;
  LDKEntity first_child;
  LDKEntity next_sibling;
  LDKEntity prev_sibling;
}LDKTransform;
Function in ldk_transform.h

ldk_transform_make_default

Create default settings for transform.

LDK_API LDKTransform ldk_transform_make_default(void);

Returns

A value initialized with the engine defaults.

Function in ldk_transform.h

ldk_transform_set_local_position

Set transform local position.

LDK_API bool ldk_transform_set_local_position(
 LDKEntity entity,
 Vec3 position
);

Parameters

LDKEntity entity
Entity to inspect or modify.
Vec3 position
Position used by the operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_set_local_rotation

Set transform local rotation.

LDK_API bool ldk_transform_set_local_rotation(
 LDKEntity entity,
 Quat rotation
);

Parameters

LDKEntity entity
Entity to inspect or modify.
Quat rotation
Rotation used by the operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_set_local_scale

Set transform local scale.

LDK_API bool ldk_transform_set_local_scale(
 LDKEntity entity,
 Vec3 scale
);

Parameters

LDKEntity entity
Entity to inspect or modify.
Vec3 scale
Scale used by the operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_get_local_position

Get transform local position.

LDK_API bool ldk_transform_get_local_position(
 LDKEntity entity,
 Vec3 *out_position
);

Parameters

LDKEntity entity
Entity to inspect or modify.
Vec3 *out_position
Receives the resulting position.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_get_local_rotation

Get transform local rotation.

LDK_API bool ldk_transform_get_local_rotation(
 LDKEntity entity,
 Quat *out_rotation
);

Parameters

LDKEntity entity
Entity to inspect or modify.
Quat *out_rotation
Receives the resulting rotation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_get_local_scale

Get transform local scale.

LDK_API bool ldk_transform_get_local_scale(
 LDKEntity entity,
 Vec3 *out_scale
);

Parameters

LDKEntity entity
Entity to inspect or modify.
Vec3 *out_scale
Receives the resulting scale.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_get_world_matrix

Get transform world matrix.

LDK_API bool ldk_transform_get_world_matrix(
 LDKEntity entity,
 Mat4 *out_world_matrix
);

Parameters

LDKEntity entity
Entity to inspect or modify.
Mat4 *out_world_matrix
Receives the computed world transformation matrix.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_set_parent

Set transform parent.

LDK_API bool ldk_transform_set_parent(
 LDKEntity child_entity,
 LDKEntity parent_entity
);

Parameters

LDKEntity child_entity
Entity whose parent is being set.
LDKEntity parent_entity
Parent entity to assign.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_mark_dirty

Mark an entity transform dirty so its world state can be recalculated.

LDK_API bool ldk_transform_mark_dirty(LDKEntity entity);

Parameters

LDKEntity entity
Entity to inspect or modify.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_transform.h

ldk_transform_component_desc

Build the ECS registration descriptor for the transform component.

LDK_API LDKComponentDesc ldk_transform_component_desc(u32 initial_capacity);

Parameters

u32 initial_capacity
Initial number of entries reserved in the registry.

Returns

A descriptor for the requested component or resource.