Octahedron

class Octahedron(val position: Point = Point.ORIGIN) : Shape

An octahedron (8-faced polyhedron) inscribed in a unit cube.

The octahedron has a fixed size of approximately 1 world unit across each axis. Use translate and Shape.scale to reposition or resize it.

Parameters

position

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

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

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): Octahedron

Translate the shape by the given deltas