Cube

Represents a cube element, the basic building block of a model.

Since

1.15.2

Parameters

name

the name of the cube

from

the starting coordinate (min corner)

to

the ending coordinate (max corner)

inflate

the inflation value

rotation

the rotation of the cube

origin

the pivot point of the cube

faces

the UV mapping for the faces

lightEmission

the light emission level (1-15 or null if 0)

visibility

whether the cube is visible

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val MESH_PIXEL: String = "mesh_pixel"
Link copied to clipboard
val MESH_TRIANGLE_DUPLEX: String = "mesh_triangle_duplex"
Link copied to clipboard
val MESH_TRIANGLE_SINGLE: String = "mesh_triangle_single"

Functions

Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
@NotNull
open fun faces(): @NotNull ModelFace
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
open fun hasTexture(): Boolean
Checks if this cube has any textures defined.
Link copied to clipboard
open fun max(@NotNull origin: @NotNull Float3): Float
Calculates the maximum distance from the origin to any corner of the cube.
Link copied to clipboard
@NotNull
open fun rotation(): @NotNull Float3
Returns the rotation of the element.
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard
open fun visibility(): Boolean
Checks if the element is visible.