FloatSize3d


public final class FloatSize3d


Size of a 3d object represented as a Float, such as the dimensions of a spatial volume in meters.

Summary

Public constructors

FloatSize3d(float width, float height, float depth)

Public methods

final @NonNull FloatSize3d
div(float divisor)

Returns a new FloatSize3d that's uniformly divided by the divisor.

final @NonNull FloatSize3d
div(int divisor)

Returns a new FloatSize3d that's uniformly divided by the divisor.

boolean
equals(Object other)
static final @NonNull FloatSize3d

Creates a FloatSize3d from a Vector3, using the Vector3's x, y, and z components as the width, height, and depth respectively.

final float

the depth of the object

final float

the height of the object

final float

the width of the object

int
final @NonNull FloatSize3d
times(float scalar)

Returns a new FloatSize3d that's uniformly multiplied by the scalar.

final @NonNull FloatSize3d
times(int scalar)

Returns a new FloatSize3d that's uniformly multiplied by the scalar.

final @NonNull FloatSize2d

Returns a new FloatSize2d with the same width and height as this FloatSize3d.

@NonNull String

Public constructors

FloatSize3d

Added in 1.0.0-alpha10
public FloatSize3d(float width, float height, float depth)

Public methods

div

Added in 1.0.0-alpha10
public final @NonNull FloatSize3d div(float divisor)

Returns a new FloatSize3d that's uniformly divided by the divisor.

Parameters
float divisor

the value to divide the width, height, and depth by

Returns
@NonNull FloatSize3d

a new FloatSize3d with the divided dimensions

div

Added in 1.0.0-alpha10
public final @NonNull FloatSize3d div(int divisor)

Returns a new FloatSize3d that's uniformly divided by the divisor.

Parameters
int divisor

the value to divide the width, height, and depth by

Returns
@NonNull FloatSize3d

a new FloatSize3d with the divided dimensions

equals

public boolean equals(Object other)

fromVector3

Added in 1.0.0-alpha10
public static final @NonNull FloatSize3d fromVector3(@NonNull Vector3 vector)

Creates a FloatSize3d from a Vector3, using the Vector3's x, y, and z components as the width, height, and depth respectively.

Parameters
@NonNull Vector3 vector

the source Vector3

Returns
@NonNull FloatSize3d

a new FloatSize3d instance

getDepth

Added in 1.0.0-alpha10
public final float getDepth()

the depth of the object

getHeight

Added in 1.0.0-alpha10
public final float getHeight()

the height of the object

getWidth

Added in 1.0.0-alpha10
public final float getWidth()

the width of the object

hashCode

public int hashCode()

times

Added in 1.0.0-alpha10
public final @NonNull FloatSize3d times(float scalar)

Returns a new FloatSize3d that's uniformly multiplied by the scalar.

Parameters
float scalar

the value to multiply the width, height, and depth by

Returns
@NonNull FloatSize3d

a new FloatSize3d with the multiplied dimensions

times

Added in 1.0.0-alpha10
public final @NonNull FloatSize3d times(int scalar)

Returns a new FloatSize3d that's uniformly multiplied by the scalar.

Parameters
int scalar

the value to multiply the width, height, and depth by

Returns
@NonNull FloatSize3d

a new FloatSize3d with the multiplied dimensions

to2d

Added in 1.0.0-alpha10
public final @NonNull FloatSize2d to2d()

Returns a new FloatSize2d with the same width and height as this FloatSize3d.

toString

public @NonNull String toString()