25 #ifndef INCLUDED_ThreadsafeBodyReporting_h_GUID_EB81AB60_6C5C_4A92_CD3D_ADFA62489F70
26 #define INCLUDED_ThreadsafeBodyReporting_h_GUID_EB81AB60_6C5C_4A92_CD3D_ADFA62489F70
32 #include <boost/optional.hpp>
33 #include <folly/ProducerConsumerQueue.h>
43 enum class ReportStatus { Valid, MutexLocked, NoReportAvailable };
47 makeReportWithStatus(ReportStatus status = ReportStatus::Valid) {
55 explicit operator bool()
const {
return status == ReportStatus::Valid; }
68 static std::unique_ptr<BodyReporting>
make();
70 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
104 bool m_hasProcessModel =
false;
106 Eigen::Isometry3d m_trackerToRoom;
109 template <std::
size_t ArraySize>
struct QueueValue {
111 std::array<double, ArraySize> stateData;
115 using QueueValueType = QueueValue<13>;
116 using QueueValueVec = Eigen::Matrix<double, 13, 1>;
118 folly::ProducerConsumerQueue<QueueValueType> m_queue;
127 using BodyReportingPtr = std::unique_ptr<BodyReporting>;
129 using BodyReportingVector = std::vector<BodyReportingPtr>;
133 #endif // INCLUDED_ThreadsafeBodyReporting_h_GUID_EB81AB60_6C5C_4A92_CD3D_ADFA62489F70
bool getReport(double additionalPrediction, BodyReport &report)
void setTrackerToRoomTransform(Eigen::Isometry3d const &xform)
bool updateState(util::time::TimeValue const &tv, BodyState const &state)
static std::unique_ptr< BodyReporting > make()
Factory function.
Header providing a C++ wrapper around TimeValueC.h.
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
void initProcessModel(BodyProcessModel const &process)
Struct for combined velocity state.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...