LigTag

data class LigTag(status: Int, coordinateX: Float, coordinateY: Float, isDetected: Boolean, deviceId: Long, detectionTime: Long, decodedTime: Long, poseCalculated: Boolean, rotation: Vector3, translation: Vector3, position: Vector3, accessToken: String) : Parcelable

LigTag represents a LigTag device and carries information about its status.

Constructors

LigTag
Link copied to clipboard
fun LigTag(deviceId: Long, coordinateX: Float, coordinateY: Float)
LigTag
Link copied to clipboard
fun LigTag(deviceId: Long, coordinateX: Float, coordinateY: Float, ready: Boolean, rx: Float, ry: Float, rz: Float, tx: Float, ty: Float, tz: Float)
LigTag
Link copied to clipboard
fun LigTag(status: Int, coordinateX: Float, coordinateY: Float, isDetected: Boolean, deviceId: Long, detectionTime: Long, decodedTime: Long, poseCalculated: Boolean, rotation: Vector3, translation: Vector3, position: Vector3, accessToken: String = LiGScanner.accessToken.toString())

Types

Status
Link copied to clipboard
object Status

Functions

describeContents
Link copied to clipboard
abstract fun describeContents(): Int
toString
Link copied to clipboard
open override fun toString(): String
transform
Link copied to clipboard
fun transform(cameraPose: Transform): Transform

Calculates the world-space transform of this LigTag device.

writeToParcel
Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

accessToken
Link copied to clipboard
val accessToken: String

Access token from LiG Scanner SDK. This is convenience property for you to get the access token.

codes
Link copied to clipboard
var codes: IntArray
coordinateX
Link copied to clipboard
val coordinateX: Float

X coordinate in percentage of the screen of the LigTag device.

coordinateY
Link copied to clipboard
val coordinateY: Float

Y coordinate in percentage of the screen of the LigTag device.

decoded
Link copied to clipboard
val decoded: Boolean

Computed property indicating if the device ID was successfully decoded. True when the device is registered and has a valid ID.

decodedTime
Link copied to clipboard
val decodedTime: Long

How long does it take for the LigTag device to be decoded.

detected
Link copied to clipboard
val detected: Boolean

Computed property indicating if the LigTag is detected. Recommended replacement for the deprecated isDetected field.

detectionTime
Link copied to clipboard
val detectionTime: Long

How long does it take for the LigTag device to be detected.

deviceId
Link copied to clipboard
val deviceId: Long

ID of the LigTag device.

isDetected
Link copied to clipboard
val isDetected: Boolean

Whether the LigTag device has been detected.

isReady
Link copied to clipboard
val isReady: Boolean

Computed property indicating if the LigTag device is ready to be used. True when both device ID is decoded AND pose calculation is complete.

ligtagIndex
Link copied to clipboard
var ligtagIndex: Int
poseCalculated
Link copied to clipboard
val poseCalculated: Boolean

Whether the 6DOF pose calculation is complete.

position
Link copied to clipboard
val position: Vector3

Position of the LigTag device in mobile phone coordinate system.

rotation
Link copied to clipboard
val rotation: Vector3

Rotation of the LigTag device.

status
Link copied to clipboard
val status: Int

Status of the LigTag device.

translation
Link copied to clipboard
val translation: Vector3

Translation of the LigTag device.

validPose
Link copied to clipboard
val validPose: Boolean

Computed property indicating if the 6DOF pose calculation is complete. True when 3D position and rotation data are mathematically valid.