extrudeShape

fun extrudeShape(baseTriangles: List<Vector2>, contours: List<List<Vector2>>, front: Double, back: Double, frontScale: Double = 1.0, backScale: Double = 1.0, frontCap: Boolean = true, backCap: Boolean = true, sides: Boolean = true, flipNormals: Boolean = false, writer: VertexWriter)(source)

Extrudes a Shape from its triangulations

Parameters

baseTriangles

triangle vertices for the caps

contours

contour vertices for the sides

front

the z position of the front

back

the z position of the back

frontScale

scale factor for the front cap

backScale

scale factor for the back cap

frontCap

add a front cap if true

backCap

add a back cap if true

sides

add the sides if true

flipNormals

generates inside-out geometry if true

writer

the vertex writer function


fun extrudeShape(shape: Shape, front: Double, back: Double, frontScale: Double = 1.0, backScale: Double = 1.0, frontCap: Boolean = true, backCap: Boolean = true, sides: Boolean = true, distanceTolerance: Double = 0.5, flipNormals: Boolean = false, writer: VertexWriter)(source)

Extrudes a shape by triangulating it and creating side- and cap geometry.

Parameters

front

the z position of the front

back

the z position of the back

frontScale

scale factor for the front cap

backScale

scale factor for the back cap

frontCap

add a front cap if true

backCap

add a back cap if true

sides

add the sides if true

distanceTolerance
flipNormals

generates inside-out geometry if true

writer

the vertex writer function


fun TriangleMeshBuilder.extrudeShape(baseTriangles: List<Vector2>, contours: List<List<Vector2>>, length: Double, scale: Double = 1.0, frontCap: Boolean = true, backCap: Boolean = true, sides: Boolean = true)(source)

Extrudes a Shape from its triangulations

Parameters

baseTriangles

triangle vertices for the caps

contours

contour vertices for the sides

length

the length of the extrusion

scale

scale factor for the caps

frontCap

add a front cap if true

backCap

add a back cap if true

sides

add the sides if true


fun TriangleMeshBuilder.extrudeShape(shape: Shape, length: Double, scale: Double = 1.0, frontCap: Boolean = true, backCap: Boolean = true, sides: Boolean = true, distanceTolerance: Double = 0.5)(source)

Extrudes a Shape

Parameters

shape

the Shape to extrude

length

length of the extrusion

scale

scale factor of the caps

frontCap

add a front cap if true

backCap

add a back cap if true

sides

add the sides if true

distanceTolerance

controls how many segments will be created. Lower values result in higher vertex counts.


fun extrudeShape(shape: Shape, front: Double, back: Double, distanceTolerance: Double = 0.5, writer: VertexWriter)(source)

Deprecated

binary compatibility only