[orx-mesh-generators] Fix grid issue when count==1
This commit is contained in:
@@ -4,7 +4,10 @@ import org.openrndr.draw.CullTestPass
|
||||
import org.openrndr.draw.DrawPrimitive
|
||||
import org.openrndr.draw.shadeStyle
|
||||
import org.openrndr.extra.camera.Orbital
|
||||
import org.openrndr.extra.meshgenerators.*
|
||||
import org.openrndr.extra.meshgenerators.buildTriangleMesh
|
||||
import org.openrndr.extra.meshgenerators.extrudeShape
|
||||
import org.openrndr.extra.meshgenerators.grid
|
||||
import org.openrndr.extra.meshgenerators.twist
|
||||
import org.openrndr.math.Vector3
|
||||
import org.openrndr.shape.Circle
|
||||
|
||||
@@ -20,15 +23,15 @@ fun main() {
|
||||
this.eye = Vector3(0.0, 30.0, 50.0)
|
||||
}
|
||||
val m = buildTriangleMesh {
|
||||
grid(5,5, 5) { u, v, w ->
|
||||
grid(5, 5, 5) { u, v, w ->
|
||||
isolated {
|
||||
translate(u * 20.0, v * 20.0, w * 20.0)
|
||||
extrudeShape(Circle(0.0, 0.0, 50.0).shape, 4.0, scale = 0.1)
|
||||
}
|
||||
}
|
||||
twist(360.0/200.0, 0.0)
|
||||
twist(360.0/200.0, 0.0, Vector3.UNIT_X)
|
||||
twist(360.0/200.0, 0.0, Vector3.UNIT_Z)
|
||||
twist(360.0 / 200.0, 0.0)
|
||||
twist(360.0 / 200.0, 0.0, Vector3.UNIT_X)
|
||||
twist(360.0 / 200.0, 0.0, Vector3.UNIT_Z)
|
||||
}
|
||||
|
||||
extend {
|
||||
|
||||
Reference in New Issue
Block a user