I have functions like this:
func getdrawnHorLineFrom(pos1: SCNVector3, toPos2: SCNVector3) -> SCNNode {
let obj1 = SCNVector3(x: toPos2.x, y: toPos2.y, z:pos1.z)
let line = lineFrom(vector: pos1, toVector: obj1)
let lineInBetween1 = SCNNode(geometry: line)
glLineWidth(15)
return lineInBetween1
}
also:
func lineFrom(vector vector1: SCNVector3, toVector vector2: SCNVector3) -> SCNGeometry {
let indices: [Int32] = [0, 1]
let source = SCNGeometrySource(vertices: [vector1, vector2])
let element = SCNGeometryElement(indices: indices, primitiveType: .line)
return SCNGeometry(sources: [source], elements: [element])
}
Basically, I am trying to draw a line between two 3D Points, which are of type SCNVector3. The line drawn is a 'SCNGeometry' with a primitiveType 'line'.
Now, I would like to increase my line thickness, such that it appears clearly. Also, I would like to know, if there is any way, I can make my line appear as 'dotted line'. I Inorder to increase the thickness of my lines tried to use 'glLineWidth() etc, but not successful.
I would be really glad, if someone can help me out.
Thanks in advance!