Skip to content

File openxr_view_frame.hpp

File List > data_format > openxr_view_frame.hpp

Go to the documentation of this file

#pragma once

#include "illixr/data_format/poses/pose_base.hpp"
#include "illixr/switchboard.hpp"

#include 

namespace ILLIXR::data_format {

struct openxr_eye_view : public pose::pose_base {
#ifdef USING_OPENXR
    openxr_eye_view() {
        orientation.w = 1.0F;
    }
#endif

    float angle_left{0.0F};
    float angle_right{0.0F};
    float angle_up{0.0F};
    float angle_down{0.0F};

    std::uint32_t recommended_width{0};
    std::uint32_t recommended_height{0};

#ifdef USING_OPENXR
    bool valid{false};
#endif
    bool pose_tracked{false};
};

struct openxr_view_frame : public switchboard::event {
    std::uint64_t sequence{0};
    time_point   sample_time{};
    std::int64_t xr_sample_time{0};
    std::int64_t xr_predicted_display_period{0};
    bool should_render{false};

    openxr_eye_view left;
    openxr_eye_view right;
};

} // namespace ILLIXR::data_format