LDKCameraProjection
typedef enum LDKCameraProjection{
LDK_CAMERA_PROJECTION_PERSPECTIVE=0,
LDK_CAMERA_PROJECTION_ORTHOGRAPHIC
}LDKCameraProjection;
Camera component data.
typedef enum LDKCameraProjection{
LDK_CAMERA_PROJECTION_PERSPECTIVE=0,
LDK_CAMERA_PROJECTION_ORTHOGRAPHIC
}LDKCameraProjection;
typedef enum LDKCameraRole{
LDK_CAMERA_ROLE_NONE=0,
LDK_CAMERA_ROLE_MAIN,
LDK_CAMERA_ROLE_EDITOR,
LDK_CAMERA_ROLE_RENDER_TARGET
}LDKCameraRole;
typedef enum LDKCameraBackgroundMode{
LDK_CAMERA_BACKGROUND_COLOR=0,
LDK_CAMERA_BACKGROUND_SKYBOX,
LDK_CAMERA_BACKGROUND_NONE
}LDKCameraBackgroundMode;
typedef struct LDKCamera{
LDKCameraProjection projection;
LDKCameraRole role;
float fov_y;
float orthographic_height;
float near_plane;
float far_plane;
bool enabled;
LDKCameraBackgroundMode background_mode;
u32 background_color;
LDKAssetSkybox skybox_asset;
u64 skybox_revision;
LDKResourceSkybox renderer_skybox;
struct LDKRenderer *renderer;
}LDKCamera;
Build the ECS registration descriptor for the camera component.
LDK_API LDKComponentDesc ldk_camera_component_desc(u32 initial_capacity);
u32 initial_capacityA descriptor for the requested component or resource.
Orient a camera entity so it looks toward a world-space target.
LDK_API bool ldk_camera_look_at(
LDKEntity entity,
Vec3 target
);
LDKEntity entityVec3 targetTrue if the operation succeeds; false otherwise.
Get camera world matrix.
LDK_API bool ldk_camera_get_world_matrix(
LDKEntity entity,
Mat4 *out_world
);
LDKEntity entityMat4 *out_worldTrue if the operation succeeds; false otherwise.
Get camera view matrix.
LDK_API bool ldk_camera_get_view_matrix(
LDKEntity entity,
Mat4 *out_view
);
LDKEntity entityMat4 *out_viewTrue if the operation succeeds; false otherwise.
Get camera projection matrix.
LDK_API bool ldk_camera_get_projection_matrix(
LDKEntity entity,
float aspect,
Mat4 *out_projection
);
LDKEntity entityfloat aspectMat4 *out_projectionTrue if the operation succeeds; false otherwise.