#ifndef C_API_SENSOR_MSGS_DEPTHCAMERADATA_H
#define C_API_SENSOR_MSGS_DEPTHCAMERADATA_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <stddef.h>
#include "std_msgs/Header.h"
#include "sensor_msgs/Image.h"
#include "sensor_msgs/CameraInfo.h"

/**
 * @brief One coherent depth-camera sample: a depth image plus the intrinsics that describe it.
 *
 * Mirrors robot_sensor_msgs::DepthCameraData. "Coherent" is the whole point of the struct: the
 * voxel layer projects every depth pixel through the intrinsics to build a frustum, so a depth
 * image paired with intrinsics from a different resolution or a different instant clears the wrong
 * volume of space. Pair them at the source, not here.
 */
typedef struct
{
  /** Canonical timestamp and optical frame of this sample. */
  Header header;
  /** Depth image. `encoding` must be the true encoding ("16UC1" or "32FC1"). */
  Image depth;
  /** Intrinsics of the exact image above — same resolution, same instant. */
  CameraInfo camera_info;
} DepthCameraData;

#ifdef __cplusplus
}
#endif

#endif // C_API_SENSOR_MSGS_DEPTHCAMERADATA_H
