Drawing 3D lines with 2 Vertices

Guten Tag, my project is simple, first I want draw wired Hexa,-Tetra- and Octahedrons. I draw a cube with Metal but I didn't found rotation, translation and scale. I have searched help , the examples I found are too complicated for me.

Mit freundlichen Grüßen VanceRegnet

Answered by DTS Engineer in 807462022

Taking this further w.r.t. SceneKit you would create an SCNGeometry from an SCNGeometrySource and attach that to an SCNNode i.e. "You position and orient a geometry in a scene by attaching it to an SCNNode object."

Similarly, you can animate the geometry with SCNNode's affine transform properties. See Managing the Node's Transform.

Metal is an advanced API for low-level 3D graphics programming. You seem to be working at a higher layer of abstraction. I recommend you look into using SceneKit instead of using Metal directly.

Taking this further w.r.t. SceneKit you would create an SCNGeometry from an SCNGeometrySource and attach that to an SCNNode i.e. "You position and orient a geometry in a scene by attaching it to an SCNNode object."

Similarly, you can animate the geometry with SCNNode's affine transform properties. See Managing the Node's Transform.

Drawing 3D lines with 2 Vertices
 
 
Q