/// /// MotionReading.kt /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE. /// https://github.com/mrousavy/nitro /// Copyright © Marc Rousavy @ Margelo /// package com.margelo.nitro.one import androidx.annotation.Keep import com.facebook.proguard.annotations.DoNotStrip import java.util.Objects /** * Represents the JavaScript object/struct "MotionReading". */ @DoNotStrip @Keep data class MotionReading( @DoNotStrip @Keep val sensor: MotionSensor, @DoNotStrip @Keep val timestampMs: Double, @DoNotStrip @Keep val value: MotionVector, @DoNotStrip @Keep val gravity: MotionVector?, @DoNotStrip @Keep val userAcceleration: MotionVector?, @DoNotStrip @Keep val rotationRate: MotionVector?, @DoNotStrip @Keep val attitude: MotionVector? ) { /* primary constructor */ override fun equals(other: Any?): Boolean { if (this === other) return true if (other !is MotionReading) return false return Objects.deepEquals(this.sensor, other.sensor) && Objects.deepEquals(this.timestampMs, other.timestampMs) && Objects.deepEquals(this.value, other.value) && Objects.deepEquals(this.gravity, other.gravity) && Objects.deepEquals(this.userAcceleration, other.userAcceleration) && Objects.deepEquals(this.rotationRate, other.rotationRate) && Objects.deepEquals(this.attitude, other.attitude) } override fun hashCode(): Int { return arrayOf( sensor, timestampMs, value, gravity, userAcceleration, rotationRate, attitude ).contentDeepHashCode() } companion object { /** * Constructor called from C++ */ @DoNotStrip @Keep @Suppress("unused") @JvmStatic private fun fromCpp(sensor: MotionSensor, timestampMs: Double, value: MotionVector, gravity: MotionVector?, userAcceleration: MotionVector?, rotationRate: MotionVector?, attitude: MotionVector?): MotionReading { return MotionReading(sensor, timestampMs, value, gravity, userAcceleration, rotationRate, attitude) } } }