Instance Method

projectPoint:

Projects a point from the 3D world coordinate system of the scene to the 2D pixel coordinate system of the renderer.

Required.

Declaration

- (SCNVector3)projectPoint:(SCNVector3)point;

Parameters

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.

See Also

Working With Projected Scene Contents

- hitTest:options:

Searches the renderer’s scene for objects corresponding to a point in the rendered image.

Required.

SCNHitTestOption

Options affecting the behavior of SceneKit hit-testing methods.

- isNodeInsideFrustum:withPointOfView:

Returns a Boolean value indicating whether a node might be visible from a specified point of view.

Required.

- nodesInsideFrustumWithPointOfView:

Returns all nodes that might be visible from a specified point of view.

Required.

- unprojectPoint:

Unprojects a point from the 2D pixel coordinate system of the renderer to the 3D world coordinate system of the scene.

Required.