|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||SceneKit||MBS Mac64bit Plugin||20.2||Yes||No||No||Yes, macOS only||No|
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 SCNViewMBS object (or other scene renderer), the hitTestWithSegment method of a node, or the rayTestWithSegment method of your scene’s physics world.
When you perform a hit-test search, SceneKit looks for SCNGeometryMBS objects along the ray you specify. For each intersection between the ray and and a geometry, SceneKit creates a hit-test result to provide information about both the SCNNodeMBS object containing the geometry and the location of the intersection on the geometry’s surface.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 10 properties
- property boneNode as SCNNodeMBS
- property faceIndex as Integer
- property geometryIndex as Integer
- property Handle as Integer
- property localCoordinates as SCNVector3MBS
- property localNormal as SCNVector3MBS
- property modelTransform as SCNMatrix4MBS
- property node as SCNNodeMBS
- property worldCoordinates as SCNVector3MBS
- property worldNormal as SCNVector3MBS
- method Constructor
- 8 shared methods
- shared method SCNHitTestBackFaceCullingKey as String
- shared method SCNHitTestBoundingBoxOnlyKey as String
- shared method SCNHitTestClipToZRangeKey as String
- shared method SCNHitTestIgnoreChildNodesKey as String
- shared method SCNHitTestIgnoreHiddenNodesKey as String
- shared method SCNHitTestOptionCategoryBitMask as String
- shared method SCNHitTestOptionSearchMode as String
- shared method SCNHitTestRootNodeKey as String
- 3 constants
Hit Test Search Modes
The hit test should return all possible results, sorted from nearest to farthest.
The hit test should return only the first object found, regardless of distance.
The hit test should return only the closes object found.
This class has no sub classes.
Some methods using this class:
- SCNNodeMBS.hitTestWithSegment(PointA as SCNVector3MBS, PointB as SCNVector3MBS, Options as Dictionary = nil) as SCNHitTestResultMBS()
- SCNViewMBS.hitTest(Point as CGPointMBS, Options as Dictionary = nil) as SCNHitTestResultMBS()
Some examples which use this class:
- MonkeyBread Software Releases the MBS Xojo Plugins in version 20.2
- Basic Forms in MBS Xojo SceneKit Plugin
- MBS Xojo Plugins, version 20.2pr1
The items on this page are in the following plugins: MBS Mac64bit Plugin.
MBS Xojo Chart Plugins