[orx-mesh] Split MeshData types from orx-obj-loader
This commit is contained in:
13
orx-mesh/src/commonMain/kotlin/Wireframe.kt
Normal file
13
orx-mesh/src/commonMain/kotlin/Wireframe.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
package org.openrndr.extra.objloader
|
||||
|
||||
import org.openrndr.math.Vector3
|
||||
|
||||
fun IMeshData.wireframe(): List<List<Vector3>> {
|
||||
return polygons.map { ip -> ip.toPolygon(this.vertexData).positions.toList() }
|
||||
}
|
||||
|
||||
fun ICompoundMeshData.wireframe(): List<List<Vector3>> {
|
||||
return compounds.values.flatMap {
|
||||
it.wireframe()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user