projectPoint(_:)
Projects a point from the 3D world coordinate system of the scene to the 2D pixel coordinate system of the renderer.
Declaration
func projectPoint(_ point: SCNVector3) -> SCNVector3Parameters
- point:
A point in the world coordinate system of the renderer’s scene.
Return Value
The corresponding point in the screen-space (view, layer, or GPU viewport) coordinate system of the scene renderer.
Discussion
The z-coordinate of the returned point describes the depth of the projected point relative to the near and far clipping planes of the renderer’s viewing frustum (defined by its pointOfView node). Projecting a point on the near clipping plane returns a point whose z-coordinate is 0.0; projecting a point on the far clipping plane returns a point whose z-coordinate is 1.0.