Platforms to show: All Mac Windows Linux Cross-Platform

Back to SCNViewMBS class.

SCNViewMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 18.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a new box view with size 100/100 and position 0/0
Example
dim x as new SCNViewMBS

On success the handle property is not zero.

You can set PreferLowPowerDevice and PreferredRenderingAPI properties before initializing a view.

See also:

SCNViewMBS.Constructor(Handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 18.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an object based on the given NSView handle.
Example
dim t as new SCNViewMBS(0, 0, 100, 100)
dim v as new SCNViewMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)

The handle is casted to a SCNView and the plugin retains this handle.

See also:

SCNViewMBS.Constructor(left as double, top as double, width as double, height as double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 18.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a new control with the given size and position.
Example
dim left,top,width,height as Integer
// define rectangle
dim x as new SCNViewMBS(left, top, width, height)

On success the handle property is not zero.

You can set PreferLowPowerDevice and PreferredRenderingAPI properties before initializing a view.

See also:

SCNViewMBS.hitTest(Point as CGPointMBS, Options as Dictionary = nil) as SCNHitTestResultMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Searches the renderer’s scene for objects corresponding to a point in the rendered image.

Point: A point in the screen-space (view, layer, or GPU viewport) coordinate system of the scene renderer.
options: A dictionary of options affecting the search. See Hit Testing Options Keys for acceptable values.

Returns an array of SCNHitTestResultMBS objects representing search results.

A 2D point in the rendered screen coordinate space can refer to any point along a line segment in the 3D scene coordinate space. Hit-testing is the process of finding elements of a scene located along this line segment. For example, you can use this method to find the geometry corresponding to a click event in a SceneKit view.

Some examples using this method:

SCNViewMBS.isNodeInsideFrustum(node as SCNNodeMBS, pointOfView as SCNNodeMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns a Boolean value indicating whether a node might be visible from a specified point of view.

node: The node whose visibility is to be tested.
pointOfView: A node defining a point of view, as used by the pointOfView property.

Returns true if the bounding box of the tested node intersects the view frustum defined by the pointOfView node; otherwise, false.

Any node containing a camera or spotlight may serve as a point of view (see the pointOfView property for details). Such a node defines a viewing frustum—a portion of the scene’s coordinate space, shaped like a truncated pyramid, that encloses all points visible from that point of view.

Use this method to test whether a node lies within the viewing frustum defined by another node (which may or may not be the scene renderer’s current pointOfView node). For example, in a game scene containing multiple camera nodes, you could use this method to determine which camera is currently best for viewing a moving player character.

Note that this method does not perform occlusion testing. That is, it returns true if the tested node lies within the specified viewing frustum regardless of whether that node’s contents are obscured by other geometry.

SCNViewMBS.nodesInsideFrustumWithPointOfView(pointOfView as SCNNodeMBS) as SCNNodeMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns all nodes that might be visible from a specified point of view.

pointOfView: A node defining a point of view, as used by the pointOfView property.

Returns an array of nodes whose bounding boxes intersect the view frustum defined by the pointOfView node. If the array is empty, no nodes lie within the specified frustum.

Any node containing a camera or spotlight may serve as a point of view (see the pointOfView property for details). Such a node defines a viewing frustum—a portion of the scene’s coordinate space, shaped like a truncated pyramid, that encloses all points visible from that point of view.
Use this method find all nodes whose content lies within the viewing frustum defined by another node (which may or may not be the scene renderer’s current pointOfView node).
Note that this method does not perform occlusion testing. That is, the returned array includes any node that lies within the specified viewing frustum regardless of whether that node’s contents are obscured by other geometry.

SCNViewMBS.pause

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 18.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Pauses playback of the view’s scene.

This method has no effect if the scene is already paused.

SCNViewMBS.play

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 18.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Resumes playback of the view’s scene.

This method has no effect if the scene is not paused.

SCNViewMBS.projectPoint(Point as SCNVector3MBS) as SCNVector3MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Projects a point from the 3D world coordinate system of the scene to the 2D pixel coordinate system of the renderer.

point: A point in the world coordinate system of the renderer’s scene.

Returns the corresponding point in the screen-space (view, layer, or GPU viewport) coordinate system of the scene renderer.

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.

SCNViewMBS.snapshot as NSImageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 18.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Renders the view’s scene into a new image object.

SCNViewMBS.stop

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 18.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Stops playback of the view’s scene and resets the scene time to its start time.

SCNViewMBS.unprojectPoint(Point as SCNVector3MBS) as SCNVector3MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Unprojects a point from the 2D pixel coordinate system of the renderer to the 3D world coordinate system of the scene.

point: A point in the screen-space (view, layer, or GPU viewport) coordinate system of the scene renderer.

Returns the corresponding point in the world coordinate system of the renderer’s scene.

The z-coordinate of the point parameter describes the depth at which to unproject the point relative to the near and far clipping planes of the renderer’s viewing frustum (defined by its pointOfView node). Unprojecting a point whose z-coordinate is 0.0 returns a point on the near clipping plane; unprojecting a point whose z-coordinate is 1.0 returns a point on the far clipping plane.

A 2D point in the rendered screen coordinate space can refer to any point along a line segment in the 3D scene coordinate space. To test for scene contents along this line—for example, to find the geometry corresponding to the location of a click event in a view—use the hitTest method.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...