Platforms to show: All Mac Windows Linux Cross-Platform

SCNShapeMBS class

Superclass: SCNGeometryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
SCNShape represents a 2D shape (cubic Bezier spline) than can be extruded.
Example
// This example needs a window with SCNControl1, a DesktopSCNControlMBS.
// extrude a rounded rectangle into a 3D shape
Var path As NSBezierPathMBS = NSBezierPathMBS.bezierPathWithRoundedRect(NSMakeRectMBS(-1, -0.5, 2, 1), 0.2, 0.2)
Var shape As New SCNShapeMBS(path, 0.3) // extrusion depth
shape.chamferRadius = 0.05
shape.firstMaterial.diffuse.contents = NSColorMBS.systemTealColor
Var node As New SCNNodeMBS(shape)

Var scene As New SCNSceneMBS
scene.rootNode.addChildNode node


Var view As SCNViewMBS = SCNControl1.View
view.scene = scene
view.allowsCameraControl = True // rotate with the mouse
view.autoenablesDefaultLighting = True

Subclass of the SCNGeometryMBS class.

Chamfer Mode

Constant Value Description
ChamferModeBack 2 Apply a chamfer to only the back edge of the extruded shape.
ChamferModeBoth 0 Apply a chamfer to both front and back edges of the extruded shape.
ChamferModeFront 1 Apply a chamfer to only the front edge of the extruded shape.

Superclass SCNGeometryMBS

This class has no subclasses.

Blog Entries

Release notes

Some related classes:


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


SCNSceneMBS   -   SCNSliderConstraintMBS


The biggest plugin in space...