ModelBuilder

class ModelBuilder(base: Model)

Builds a model by applying transformations such as rotations, translations, scaling and combinations to a base model.

Constructors

Link copied to clipboard
constructor(base: Model)

Functions

Link copied to clipboard

Combines this model with the given model by flattening the elements of the other model and adding them to this model.

Link copied to clipboard
fun build(context: ModelContent?): Model

Builds the model according to the configured actions.

Link copied to clipboard
fun rotate(axis: Model.Axis, angle: Double, uvLock: Boolean = false, rescale: Boolean = false): ModelBuilder

Rotates the model by the given euler angle in degrees angle around the given axis through the pivot point (8, 8, 8).

fun rotate(pivot: Vector3dc, axis: Model.Axis, angle: Double, uvLock: Boolean = false, rescale: Boolean = false): ModelBuilder

Rotates the model by the given euler angle in degrees angle around the given axis through the given pivot point.

Link copied to clipboard
fun rotateX(angle: Double, uvLock: Boolean = false, rescale: Boolean = false): ModelBuilder

Rotates the model by the given euler angle in degrees around the X axis through the pivot point (8, 8, 8).

fun rotateX(pivot: Vector3dc, angle: Double, uvLock: Boolean = false, rescale: Boolean = false): ModelBuilder

Rotates the model by the given euler angle in degrees angle around the X axis through the given pivot point.

Link copied to clipboard
fun rotateY(angle: Double, uvLock: Boolean = false, rescale: Boolean = false): ModelBuilder

Rotates the model by the given euler angle in degrees around the Y axis through the pivot point (8, 8, 8).

fun rotateY(pivot: Vector3dc, angle: Double, uvLock: Boolean = false, rescale: Boolean = false): ModelBuilder

Rotates the model by the given euler angle in degrees angle around the Y axis through the given pivot point.

Link copied to clipboard
fun rotateZ(angle: Double, uvLock: Boolean = false, rescale: Boolean = false): ModelBuilder

Rotates the model by the given euler angle in degrees around the Z axis through the pivot point (8, 8, 8).

fun rotateZ(pivot: Vector3dc, angle: Double, uvLock: Boolean = false, rescale: Boolean = false): ModelBuilder

Rotates the model by the given euler angle in degrees angle around the Z axis through the given pivot point.

Link copied to clipboard
fun scale(scale: Double, scaleUV: Boolean = false): ModelBuilder

Scales the model by the given factor scale for all axes to the pivot point (8, 8, 8).

fun scale(scale: Vector3dc, scaleUV: Boolean = false): ModelBuilder

Scales the model by scale.

fun scale(pivot: Vector3dc, scale: Double, scaleUV: Boolean = false): ModelBuilder

Scales the model by the given factor scale for all axes to the given pivot point.

fun scale(pivot: Vector3dc, scale: Vector3dc, scaleUV: Boolean = false): ModelBuilder

Scales the model by scale to the given pivot point.

Link copied to clipboard
fun translate(offset: Vector3dc): ModelBuilder

Translates the model by the given offset vector.