Stairs

class Stairs @JvmOverloads constructor(val position: Point = Point.ORIGIN, val stepCount: Int) : Shape

A staircase shape whose steps are distributed within a 1x1x1 bounding box.

Each step occupies 1/stepCount of the total depth (y-axis) and height (z-axis), while the full width (x-axis) is always 1 unit. Use translate and Shape.scale to reposition or resize the staircase.

Parameters

position

The origin corner of the staircase bounding box (default Point.ORIGIN)

stepCount

The number of steps (must be at least 1)

Constructors

Link copied to clipboard
constructor(position: Point = Point.ORIGIN, stepCount: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Sort the list of faces by distance then return the ordered paths

Link copied to clipboard
fun rotateX(origin: Point, angle: Double): Shape

Rotate about origin on the X axis

Link copied to clipboard
fun rotateY(origin: Point, angle: Double): Shape

Rotate about origin on the Y axis

Link copied to clipboard
fun rotateZ(origin: Point, angle: Double): Shape

Rotate about origin on the Z axis

Link copied to clipboard
fun scale(origin: Point, dx: Double): Shape
fun scale(origin: Point, dx: Double, dy: Double): Shape

fun scale(origin: Point, dx: Double, dy: Double, dz: Double): Shape

Scale about a given origin

Link copied to clipboard
open override fun translate(dx: Double, dy: Double, dz: Double): Stairs

Translate the shape by the given deltas