Vector4

open class Vector4 : Parcelable

Represents a 4D vector with x, y, z, and w components.

This class is used for representing homogeneous coordinates and quaternions in the LiG Scanner SDK. Unlike Vector3, this class is mutable to support matrix operations. It implements Parcelable for serialization.

Constructors

Vector4
Link copied to clipboard
fun Vector4()
Vector4
Link copied to clipboard
fun Vector4(data: Vector4)
Vector4
Link copied to clipboard
fun Vector4(x: Float, y: Float, z: Float, w: Float)
Vector4
Link copied to clipboard
fun Vector4(parcel: Parcel)

Types

CREATOR
Link copied to clipboard
object CREATOR : Parcelable.Creator<Vector4>

Functions

describeContents
Link copied to clipboard
open override fun describeContents(): Int
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
get
Link copied to clipboard
fun get(index: Int): Float

Gets the component at the specified index.

set
Link copied to clipboard
fun set(data: Vector4)

Sets all components from another Vector4.

fun set(index: Int, value: Float)

Sets the component at the specified index.

fun set(x: Float, y: Float, z: Float, w: Float)

Sets all components to the specified values.

toString
Link copied to clipboard
open override fun toString(): String
writeToParcel
Link copied to clipboard
open override fun writeToParcel(parcel: Parcel, flags: Int)

Properties

w
Link copied to clipboard
var w: Float

The w component of the vector (typically 1.0 for positions, 0.0 for directions)

x
Link copied to clipboard
var x: Float

The x component of the vector

y
Link copied to clipboard
var y: Float

The y component of the vector

z
Link copied to clipboard
var z: Float

The z component of the vector

Inheritors

Quaternion
Link copied to clipboard