// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from mynteye_types.djinni

#include "NativeMotionIntrinsics.hpp"  // my header
#include "NativeImuIntrinsics.hpp"

namespace djinni_generated {

NativeMotionIntrinsics::NativeMotionIntrinsics() = default;

NativeMotionIntrinsics::~NativeMotionIntrinsics() = default;

auto NativeMotionIntrinsics::fromCpp(JNIEnv* jniEnv, const CppType& c) -> ::djinni::LocalRef<JniType> {
    const auto& data = ::djinni::JniClass<NativeMotionIntrinsics>::get();
    auto r = ::djinni::LocalRef<JniType>{jniEnv->NewObject(data.clazz.get(), data.jconstructor,
                                                           ::djinni::get(::djinni_generated::NativeImuIntrinsics::fromCpp(jniEnv, c.accel)),
                                                           ::djinni::get(::djinni_generated::NativeImuIntrinsics::fromCpp(jniEnv, c.gyro)))};
    ::djinni::jniExceptionCheck(jniEnv);
    return r;
}

auto NativeMotionIntrinsics::toCpp(JNIEnv* jniEnv, JniType j) -> CppType {
    ::djinni::JniLocalScope jscope(jniEnv, 3);
    assert(j != nullptr);
    const auto& data = ::djinni::JniClass<NativeMotionIntrinsics>::get();
    return {::djinni_generated::NativeImuIntrinsics::toCpp(jniEnv, jniEnv->GetObjectField(j, data.field_mAccel)),
            ::djinni_generated::NativeImuIntrinsics::toCpp(jniEnv, jniEnv->GetObjectField(j, data.field_mGyro))};
}

}  // namespace djinni_generated
