AppleSCNHitTestResult - UBogun/Xojo-iosLib GitHub Wiki

Inherits from AppleObject
Memory leak check: not yet done.
Status: completed.

Hit-testing is the process of finding elements of a scene located at a specified point, or along a specified line segment (or ray). An SCNHitTestResult object provides details about one result from a hit-test search. There are three ways to perform a hit-test search. Use the hitTest method of an AppleSCNView object, the hitTest method of a node, or the rayTest method of your scene’s physics world. Each of these tests returns a HitTestResult for each geometry that is touched.

Constructor

No constructor. You receive this class as an API result.

Properties

Faceindex As Integer: The index of the primitive in the geomety element intersected by the search ray. (read-only)

GeometryIndex As Integer: The index of the geometry element whose surface the search ray intersects. (read-only)

LocalCoordinates As SCNVector3: The point of intersection between the geometry and the search ray, in the local coordinate system of the node containing the geometry. (read-only)

LocalNormal As SCNVector3: The point of intersection between the geometry and the search ray, in the local coordinate system of the node containing the geometry. (read-only)

ModelTransform As SCNMatrix4: The world transform matrix of the node containing the intersection. (read-only)

Node As AppleSCNNode: The node whose geometry intersects the search ray. (read-only)

WorldCoordinates As SCNVector3: The point of intersection between the geometry and the search ray, in the scene’s world coordinate system. (read-only)

WorldNormal As SCNVector3: The surface normal vector at the point of intersection, in the scene’s world coordinate system. (read-only)

Methods

TextureCoordinates (Channel As Integer) As FoundationFramework.NSPoint: Returns the texture coordinates at the point of intersection for the specified texture mapping channel.