Vector3D

public class Vector3D implements Parcelable


A three-dimensional real vector.

Summary

Constants

static final Parcelable.Creator<Vector3D>

Public fields

double
double
double

Public constructors

Vector3D(double x, double y, double z)

Constructs a Vector3D.

Public methods

double

Returns the x-component of the vector.

double

Returns the y-component of the vector.

double

Returns the z-component of the vector.

void
setX(double x)

Sets the x-component of the vector.

void
setY(double y)

Sets the y-component of the vector.

void
setZ(double z)

Sets the z-component of the vector.

void
writeToParcel(Parcel dest, int flags)

Extension functions

final void

Validates a specified Vector3D object properties: x, y, and z to be finite values.

Inherited Constants

From android.os.Parcelable
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int

Constants

CREATOR

public static final Parcelable.Creator<Vector3DCREATOR

Public fields

x

public double x

y

public double y

z

public double z

Public constructors

Vector3D

public Vector3D(double x, double y, double z)

Constructs a Vector3D.

Parameters
double x

The x-component of the vector.

double y

The y-component of the vector.

double z

The z-component of the vector.

Public methods

getX

public double getX()

Returns the x-component of the vector.

getY

public double getY()

Returns the y-component of the vector.

getZ

public double getZ()

Returns the z-component of the vector.

setX

public void setX(double x)

Sets the x-component of the vector.

setY

public void setY(double y)

Sets the y-component of the vector.

setZ

public void setZ(double z)

Sets the z-component of the vector.

writeToParcel

public void writeToParcel(Parcel dest, int flags)

Extension functions

ValidatorsKt.validate

public final void ValidatorsKt.validate(@NonNull Vector3D receiver)

Validates a specified Vector3D object properties: x, y, and z to be finite values.

Throws
java.lang.IllegalArgumentException

If the Vector3D is not valid.