Platforms to show: All Mac Windows Linux Cross-Platform
SCNViewMBS class
Super class: NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | SceneKit | MBS Mac64bit Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
In macOS, SCNView is a subclass of NSView. As part of the operating system’s view hierarchy, an SCNView object provides a place for SceneKit content in your app’s user interface. You can create a SceneKit view by using its Constructor method. To provide content for a SceneKit view, assign an SCNSceneMBS object to its scene property.
For additional important methods and properties for working with SceneKit views, see the SCNSceneRenderer protocol. (You can also render SceneKit content into an arbitrary Metal command queue or OpenGL context using the SCNRenderer class, or into a Core Animation layer on macOS using the SCNLayer class. The SCNSceneRenderer protocol defines functionality common to all three SceneKit rendering classes.)
see
https://developer.apple.com/documentation/scenekit/scnview
Requires 64bit app on macOS 10.8 or newer
Subclass of the NSViewMBS class.
- 16 properties
- property allowsCameraControl as Boolean
- property audioListener as SCNNodeMBS
- property autoenablesDefaultLighting as Boolean
- property backgroundColor as NSColorMBS
- property debugOptions as Integer
- property defaultCameraController as SCNCameraControllerMBS
- property jitteringEnabled as Boolean
- property loops as Boolean
- property Playing as Boolean
- property pointOfView as SCNNodeMBS
- property preferredFramesPerSecond as Integer
- property renderingAPI as Integer
- property rendersContinuously as Boolean
- property scene as SCNSceneMBS
- property sceneTime as Double
- property showsStatistics as Boolean
- 2 shared properties
- shared property PreferLowPowerDevice as Integer
- shared property PreferredRenderingAPI as Integer
- 12 methods
- method Constructor
- method Constructor(Handle as Integer)
- method Constructor(left as double, top as double, width as double, height as double)
- method hitTest(Point as CGPointMBS, Options as Dictionary = nil) as SCNHitTestResultMBS()
- method isNodeInsideFrustum(node as SCNNodeMBS, pointOfView as SCNNodeMBS) as Boolean
- method nodesInsideFrustumWithPointOfView(pointOfView as SCNNodeMBS) as SCNNodeMBS()
- method pause
- method play
- method projectPoint(Point as SCNVector3MBS) as SCNVector3MBS
- method snapshot as NSImageMBS
- method stop
- method unprojectPoint(Point as SCNVector3MBS) as SCNVector3MBS
- 21 constants
Antialiasing Modes
Constant | Value | Description |
---|---|---|
kAntialiasingModeMultisampling16X | 4 |
Multisampling 16x |
kAntialiasingModeMultisampling2X | 1 |
Multisampling 2x |
kAntialiasingModeMultisampling4X | 2 |
Multisampling 4x |
kAntialiasingModeMultisampling8X | 3 |
Multisampling 8x |
kAntialiasingModeNone | 0 |
No antialiasing. |
Debug Options
Constant | Value | Description |
---|---|---|
kDebugOptionNone | 0 |
Disable all debugging overlays. |
kDebugOptionRenderAsWireframe | 64 | Display only wireframe placeholders for geometries in the scene. more |
kDebugOptionShowBoundingBoxes | 2 |
Display the bounding boxes for any nodes with content. |
kDebugOptionShowCameras | 1024 |
Display visualizations for nodes in the scene with attached cameras and their fields of view. |
kDebugOptionShowConstraints | 512 |
Display visualizations of the constraint objects acting on nodes in the scene. |
kDebugOptionShowCreases | 256 |
Display nonsmoothed crease regions for geometries affected by surface subdivision. |
kDebugOptionShowLightExtents | 8 | Display the regions affected by each SCNLightMBS object in the scene. more |
kDebugOptionShowLightInfluences | 4 |
Display the locations of each SCNLightMBS object in the scene. |
kDebugOptionShowPhysicsFields | 16 |
Display the regions affected by each SCNPhysicsFieldMBS object in the scene. |
kDebugOptionShowPhysicsShapes | 1 |
Display the physics shapes for any nodes with attached SCNPhysicsBodyMBS objects. |
kDebugOptionShowSkeletons | 128 |
Display visualizations of the skeletal animation parameters for relevant geometries. |
kDebugOptionShowWireframe | 32 | Display geometries in the scene with wireframe rendering. more |
Rendering API
Constant | Value | Description |
---|---|---|
kRenderingAPIMetal | 0 | Use the Metal framework for SceneKit rendering. more |
kRenderingAPIOpenGLCore32 | 2 |
Use the OpenGL 3.2 Core Profile API for SceneKit rendering in macOS. Used by the renderingAPI property and the SCNPreferredRenderingAPIKey option when initializing an SCNViewMBS object. |
kRenderingAPIOpenGLCore41 | 3 |
Use the OpenGL 4.1 Core Profile API for SceneKit rendering in macOS. Used by the renderingAPI property and the SCNPreferredRenderingAPIKey option when initializing an SCNViewMBS object. |
kRenderingAPIOpenGLLegacy | 1 | Use the Legacy OpenGL API for SceneKit rendering in macOS. more |
Super class NSViewMBS
- 43 properties
- property acceptsTouchEvents as boolean
- property allowsVibrancy as Boolean
- property alphaValue as Double
- property autoresizesSubviews as boolean
- property autoresizingMask as Integer
- property bounds as NSRectMBS
- property boundsRotation as Double
- property canBecomeKeyView as boolean
- property canDraw as boolean
- property canDrawConcurrently as boolean
- property className as string
- property classPath as string
- property clipsToBounds as Boolean
- property focusRingType as Integer
- property frame as NSRectMBS
- property frameCenterRotation as Double
- property frameHeight as Double
- property frameLeft as Double
- property frameRotation as Double
- property frameTop as Double
- property frameWidth as Double
- property identifier as string
- property isFlipped as Boolean
- property isHidden as Boolean
- property isHiddenOrHasHiddenAncestor as Boolean
- property isOpaque as Boolean
- property isRotatedFromBase as Boolean
- property isRotatedOrScaledFromBase as Boolean
- property layer as Variant
- property layerUsesCoreImageFilters as Boolean
- property needsDisplay as Boolean
- property nextKeyView as NSViewMBS
- property opaqueAncestor as NSViewMBS
- property RetainCount as Integer
- property superview as NSViewMBS
- property toolTip as string
- property userInteractionEnabled as Boolean
- property visibleRect as NSRectMBS
- property wantsDefaultClipping as boolean
- property wantsLayer as Boolean
- property wantsRestingTouches as boolean
- property window as NSWindowMBS
- property compositingFilter as variant
- 62 methods
- method addSubview(subview as NSViewMBS)
- method addSubview(subview as NSViewMBS, positioned as Integer, relativeToView as NSViewMBS)
- method addToolTipRect(rect as NSRectMBS, tooltip as NSViewTooltipMBS)
- method adjustScroll(rect as NSRectMBS) as NSRectMBS New in 24.5
- method ancestorSharedWithView(view as NSViewMBS) as NSViewMBS
- method animator as NSViewMBS
- method autoscroll(e as NSEventMBS) as Boolean New in 24.5
- method backgroundFilters as variant()
- method beginDraggingSessionWithItems(items() as Variant, e as NSEventMBS, source as NSViewMBS) as Variant
- method Constructor
- method Constructor(Handle as Integer)
- method Constructor(left as Double, top as Double, width as Double, height as Double)
- method contentFilters as variant()
- method convertPointFromView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS
- method convertPointToView(point as NSPointMBS, View as NSViewMBS) as NSPointMBS
- method convertRectFromView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS
- method convertRectToView(rect as NSRectMBS, View as NSViewMBS) as NSRectMBS
- method convertSizeFromView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS
- method convertSizeToView(Size as NSSizeMBS, View as NSViewMBS) as NSSizeMBS
- method dataWithEPSInsideRect(left as Double, top as Double, width as Double, height as Double) as Memoryblock
- method dataWithPDFInsideRect(left as Double, top as Double, width as Double, height as Double) as Memoryblock
- method dataWithPDFInsideRect(r as NSRectMBS) as Memoryblock
- method dragImage(image as NSImageMBS, viewLocation as NSPointMBS, offset as NSSizeMBS, NSEvent as NSEventMBS, pboard as NSPasteboardMBS, source as NSViewMBS, slideFlag as boolean)
- method drawFocusRingMask
- method enclosingMenuItem as Variant
- method enclosingScrollView as Variant
- method focusRingMaskBounds as NSRectMBS
- method hitTest(x as double, y as double) as NSViewMBS New in 24.4
- method isDescendantOf(view as NSViewMBS) as boolean
- method makeBackingLayer as Variant
- method nextValidKeyView as NSViewMBS
- method noteFocusRingMaskChanged
- method pageFooter as NSAttributedStringMBS
- method pageHeader as NSAttributedStringMBS
- method previousKeyView as NSViewMBS
- method previousValidKeyView as NSViewMBS
- method print
- method registeredDraggedTypes as string()
- method registerForDraggedTypes(Types() as string)
- method removeAllToolTips
- method removeFromSuperview
- method removeFromSuperviewWithoutNeedingDisplay
- method RenderImage(subviews as boolean = false, flipped as boolean = false) as variant
- method replaceSubview(oldView as NSViewMBS, newView as NSViewMBS)
- method rotateByAngle(angle as Double)
- method scaleUnitSquareToSize(size as NSSizeMBS)
- method Screenshot as Picture
- method scrollPoint(x as double, y as double) New in 24.5
- method scrollRectToVisible(rect as NSRectMBS) as Boolean New in 24.5
- method setBackgroundFilters(Filters() as variant)
- method setBoundsOrigin(origin as NSPointMBS)
- method setBoundsOrigin(x as Double, y as Double)
- method setBoundsSize(size as NSSizeMBS)
- method setBoundsSize(width as Double, height as Double)
- method setContentFilters(Filters() as variant)
- method setFocus
- method setFrameOrigin(origin as NSPointMBS)
- method setFrameOrigin(x as Double, y as Double)
- method setFrameSize(size as NSSizeMBS)
- method setFrameSize(width as Double, height as Double)
- method subviews(recursive as boolean = false) as NSViewMBS()
- method unregisterDraggedTypes
- 5 shared methods
- shared method NSViewBoundsDidChangeNotification as string
- shared method NSViewDidUpdateTrackingAreasNotification as string
- shared method NSViewFocusDidChangeNotification as string
- shared method NSViewFrameDidChangeNotification as string
- shared method NSViewGlobalFrameDidChangeNotification as string
- 21 constants
Constants
Constant | Value | Description |
---|---|---|
NSBezelBorder | 2 |
One of the constants to specify the type of a view's border.
A concave border that makes the view look sunken. |
NSFocusRingTypeDefault | 0 |
One of the constants for the focusringtype property.
The default focus ring type for NSView or NSCell. |
NSFocusRingTypeExterior | 2 |
One of the constants for the focusringtype property.
The standard Aqua focus ring. |
NSFocusRingTypeNone | 1 |
One of the constants for the focusringtype property.
No focus ring. If you set the focus ring type to this value, NSView and NSCell will not draw any focus ring. |
NSGrooveBorder | 3 |
One of the constants to specify the type of a view's border.
A thin border that looks etched around the image. |
NSLineBorder | 1 |
One of the constants to specify the type of a view's border.
A black line border around the view. |
NSNoBorder | 0 |
One of the constants to specify the type of a view's border.
No border. |
NSViewHeightSizable | 16 |
One of the constants for the autoresizingMask property.
The receiver's height is flexible. |
NSViewLayerContentsRedrawBeforeViewResize | 3 | One of the view layer content redraw policy constants. |
NSViewLayerContentsRedrawDuringViewResize | 2 | One of the view layer content redraw policy constants. |
NSViewLayerContentsRedrawNever | 0 | One of the view layer content redraw policy constants. |
NSViewLayerContentsRedrawOnSetNeedsDisplay | 1 | One of the view layer content redraw policy constants. |
NSViewMaxXMargin | 4 |
One of the constants for the autoresizingMask property.
The right margin between the receiver and its superview is flexible. |
NSViewMaxYMargin | 32 |
One of the constants for the autoresizingMask property.
The top margin between the receiver and its superview is flexible. |
NSViewMinXMargin | 1 |
One of the constants for the autoresizingMask property.
The left margin between the receiver and its superview is flexible. |
NSViewMinYMargin | 8 |
One of the constants for the autoresizingMask property.
The bottom margin between the receiver and its superview is flexible. |
NSViewNotSizable | 0 |
One of the constants for the autoresizingMask property.
The receiver cannot be resized. |
NSViewWidthSizable | 2 |
One of the constants for the autoresizingMask property.
The receiver's width is flexible. |
Window Order Constants
Constant | Value | Description |
---|---|---|
NSWindowAbove | 1 |
Moves the window above the indicated window. |
NSWindowBelow | -1 |
Moves the window below the indicated window. |
NSWindowOut | 0 |
Moves the window off the screen. |
Super class NSResponderMBS
- 3 properties
- property Handle as Integer
- property menu as NSMenuMBS
- property nextResponder as NSResponderMBS
- 123 methods
- method beginGestureWithEvent(e as NSEventMBS)
- method cancelOperation
- method capitalizeWord
- method centerSelectionInVisibleArea
- method changeCaseOfLetter
- method complete
- method Constructor Private
- method cursorUpdate(e as NSEventMBS)
- method deleteBackward
- method deleteBackwardByDecomposingPreviousCharacter
- method deleteForward
- method deleteToBeginningOfLine
- method deleteToBeginningOfParagraph
- method deleteToEndOfLine
- method deleteToEndOfParagraph
- method deleteToMark
- method deleteWordBackward
- method deleteWordForward
- method endGestureWithEvent(e as NSEventMBS)
- method flagsChanged(e as NSEventMBS)
- method flushBufferedKeyEvents
- method helpRequested(e as NSEventMBS)
- method indent
- method insertBacktab
- method insertContainerBreak
- method insertDoubleQuoteIgnoringSubstitution
- method insertLineBreak
- method insertNewline
- method insertNewlineIgnoringFieldEditor
- method insertParagraphSeparator
- method insertSingleQuoteIgnoringSubstitution
- method insertTab
- method insertTabIgnoringFieldEditor
- method keyDown(e as NSEventMBS)
- method keyUp(e as NSEventMBS)
- method lowercaseWord
- method magnifyWithEvent(e as NSEventMBS)
- method makeBaseWritingDirectionLeftToRight
- method makeBaseWritingDirectionNatural
- method makeBaseWritingDirectionRightToLeft
- method makeTextWritingDirectionLeftToRight
- method makeTextWritingDirectionNatural
- method makeTextWritingDirectionRightToLeft
- method mouseDown(e as NSEventMBS)
- method mouseDragged(e as NSEventMBS)
- method mouseEntered(e as NSEventMBS)
- method mouseExited(e as NSEventMBS)
- method mouseMoved(e as NSEventMBS)
- method mouseUp(e as NSEventMBS)
- method moveBackward
- method moveBackwardAndModifySelection
- method moveDown
- method moveDownAndModifySelection
- method moveForward
- method moveForwardAndModifySelection
- method moveLeft
- method moveLeftAndModifySelection
- method moveParagraphBackwardAndModifySelection
- method moveParagraphForwardAndModifySelection
- method moveRight
- method moveRightAndModifySelection
- method moveToBeginningOfDocument
- method moveToBeginningOfDocumentAndModifySelection
- method moveToBeginningOfLine
- method moveToBeginningOfLineAndModifySelection
- method moveToBeginningOfParagraph
- method moveToBeginningOfParagraphAndModifySelection
- method moveToEndOfDocument
- method moveToEndOfDocumentAndModifySelection
- method moveToEndOfLine
- method moveToEndOfLineAndModifySelection
- method moveToEndOfParagraph
- method moveToEndOfParagraphAndModifySelection
- method moveToLeftEndOfLine
- method moveToLeftEndOfLineAndModifySelection
- method moveToRightEndOfLine
- method moveToRightEndOfLineAndModifySelection
- method moveUp
- method moveUpAndModifySelection
- method moveWordBackward
- method moveWordBackwardAndModifySelection
- method moveWordForward
- method moveWordForwardAndModifySelection
- method moveWordLeft
- method moveWordLeftAndModifySelection
- method moveWordRight
- method moveWordRightAndModifySelection
- method otherMouseDown(e as NSEventMBS)
- method otherMouseDragged(e as NSEventMBS)
- method otherMouseUp(e as NSEventMBS)
- method pageDown
- method pageDownAndModifySelection
- method pageUp
- method pageUpAndModifySelection
- method performMnemonic(theString as string) as boolean
- method presentError(e as NSErrorMBS) as boolean
- method rightMouseDown(e as NSEventMBS)
- method rightMouseDragged(e as NSEventMBS)
- method rightMouseUp(e as NSEventMBS)
- method rotateWithEvent(e as NSEventMBS)
- method scrollLineDown
- method scrollLineUp
- method scrollPageDown
- method scrollPageUp
- method scrollToBeginningOfDocument
- method scrollToEndOfDocument
- method scrollWheel(e as NSEventMBS)
- method selectAll
- method selectLine
- method selectParagraph
- method selectToMark
- method selectWord
- method setMark
- method showContextHelp
- method swapWithMark
- method swipeWithEvent(e as NSEventMBS)
- method tabletPoint(e as NSEventMBS)
- method tabletProximity(e as NSEventMBS)
- method transpose
- method transposeWords
- method undoManager as NSUndoManagerMBS
- method uppercaseWord
- method yank
This class has no sub classes.
Some properties using for this class:
- DesktopSCNControlMBS.View as SCNViewMBS
- SCNControlMBS.View as SCNViewMBS
- SCNIOSControlMBS.View as SCNViewMBS
Some examples using this class:
- /Mac64bit/SceneKit/Camera
- /Mac64bit/SceneKit/Camera with fix elements
- /Mac64bit/SceneKit/Change Backgroundcolor by Click
- /Mac64bit/SceneKit/Free form
- /Mac64bit/SceneKit/Rotation
- /Mac64bit/SceneKit/SceneKit Example
- /Mac64bit/SceneKit/SceneKit Hanoi
- /Mac64bit/SceneKit/SceneKit iOS
- /Mac64bit/SceneKit/SceneKit Primitives
- /Mac64bit/SceneKit/SceneKit Spheres
Blog Entries
- MonkeyBread Software Releases the MBS Xojo Plugins in version 24.1
- MBS Xojo Plugins, version 24.1pr4
- MBS Xojo Plugins, version 20.2pr1
- MBS Xojo Plugins, version 18.4pr8
Xojo Developer Magazine
- 19.6, page 46: Rotating Christmas Tree, Using the MBS Plugins to create an animated 3D Christmas tree by Stefanie Juchmes
- 18.4, page 39: On the Scene Again (Part 3), Getting Started with SceneKit by Stefanie Juchmes
- 18.1, page 26: On the Scene, Getting Started with SceneKit by Stefanie Juchmes
Release notes
- Version 24.1
- Added PreferLowPowerDevice and PreferredRenderingAPI properties in SCNViewMBS class.
- Version 20.2
- Added more methods to SCNViewMBS and SCNNodeMBS classes.
- Version 18.4
- Started SceneKit plugin part with new SCNControlMBS control and new SCNGeometryMBS, SCNNodeMBS, SCNSceneMBS and SCNViewMBS classes.
The items on this page are in the following plugins: MBS Mac64bit Plugin, MBS MacBase Plugin.
SCNVector4MBS - SCPreferencesMBS