Platforms to show: All Mac Windows Linux Cross-Platform
SCNGeometryMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | SceneKit | MBS Mac64bit Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
In SceneKit, geometries attached to SCNNode objects form the visible elements of a scene, and SCNMaterial objects attached to a geometry determine its appearance.
Working with Geometry Objects
You control a geometry’s appearance in a scene with nodes and materials. A geometry object provides only the form of a visible object rendered by SceneKit. You specify color and texture for a geometry’s surface, control how it responds to light, and add special effects by attaching materials (for details, see the methods in Managing a Geometry’s Materials). You position and orient a geometry in a scene by attaching it to an SCNNode object. Multiple nodes can reference the same geometry object, allowing it to appear at different positions in a scene.
You can easily copy geometries and change their materials. A geometry object manages the association between immutable vertex data and a mutable assignment of materials. To make a geometry appear more than once in the same scene with a different set of materials, use its inherited copy method. The copy shares the underlying vertex data of the original, but can be assigned materials independently. You can thus make many copies of a geometry without incurring a significant cost to rendering performance.
You can animate a geometry object. The vertex data associated with a geometry is immutable, but SceneKit provides several ways to animate geometry. You can use a SCNMorpher or SCNSkinner object to deform a geometry’s surface, or run animations created in an external 3D authoring tool and loaded from a scene file. You can also use methods in the SCNShadable protocol to add custom GLSL shader programs that alter SceneKit’s rendering of a geometry.
Obtaining a Geometry Object
SceneKit provides several ways to introduce geometry objects to your app:
Action | For further information |
Load from a scene file created using external 3D authoring tools | SCNScene, SCNSceneSource |
Use and customize SceneKit’s built-in primitive shapes | SCNPlane, SCNBox, SCNSphere, SCNPyramid, SCNCone, SCNCylinder, SCNCapsule, SCNTube, and SCNTorus |
Create 3D geometry from 2D text or Bézier curves | SCNText, SCNShape |
Create a custom geometry from vertex data | SCNGeometrySource, SCNGeometryElement, geometryWithSources. |
- 10 properties
- property edgeCreasesElement as SCNGeometryElementMBS
- property edgeCreasesSource as SCNGeometrySourceMBS
- property firstMaterial as SCNMaterialMBS
- property geometryElementCount as Integer
- property Handle as Integer
- property Name as String
- property shaderModifiers as Dictionary New in 24.4
- property subdivisionLevel as Integer
- property tessellator as SCNGeometryTessellatorMBS
- property wantsAdaptiveSubdivision as Boolean
- 14 methods
- method Constructor
- method copy as SCNGeometryMBS
- method geometryElementAtIndex(index as Integer) as SCNGeometryElementMBS
- method geometryElements as SCNGeometryElementMBS()
- method geometrySources as SCNGeometrySourceMBS()
- method geometrySourcesForSemantic(semantic as String) as SCNGeometrySourceMBS()
- method insertMaterial(Material as SCNMaterialMBS, Index as Integer)
- method levelsOfDetail as SCNLevelOfDetailMBS()
- method materials as SCNMaterialMBS()
- method materialWithName(name as string) as SCNMaterialMBS
- method removeMaterial(Index as Integer)
- method replaceMaterial(Index as Integer, Material as SCNMaterialMBS)
- method setLevelsOfDetail(LevelsOfDetails() as SCNLevelOfDetailMBS = nil)
- method setMaterials(materials() as SCNMaterialMBS)
- 2 shared methods
- shared method geometry as SCNGeometryMBS
- shared method geometryWithSources(sources() as SCNGeometrySourceMBS, elements() as SCNGeometryElementMBS) as SCNGeometryMBS
Sub classes:
- class SCNBoxMBS
- class SCNCapsuleMBS
- class SCNConeMBS
- class SCNCylinderMBS
- class SCNFloorMBS
- class SCNPlaneMBS
- class SCNPyramidMBS
- class SCNShapeMBS
- class SCNSphereMBS
- class SCNTextMBS
- class SCNTorusMBS
- class SCNTubeMBS
Some methods using this class:
- SCNLevelOfDetailMBS.levelOfDetailWithGeometryAndScreenSpaceRadius(geo as SCNGeometryMBS, screenSpaceRadius as Double) as SCNLevelOfDetailMBS
- SCNLevelOfDetailMBS.levelOfDetailWithGeometryAndWorldSpaceDistance(geo as SCNGeometryMBS, worldSpaceDistance as Double) as SCNLevelOfDetailMBS
- SCNNodeMBS.Constructor(geometry as SCNGeometryMBS)
- SCNNodeMBS.nodeWithGeometry(geometry as SCNGeometryMBS) as SCNNodeMBS
- SCNPhysicsShapeMBS.Constructor(geometry as SCNGeometryMBS, Options as Dictionary = nil)
- SCNPhysicsShapeMBS.shapeWithGeometry(geometry as SCNGeometryMBS, Options as Dictionary = nil) as SCNPhysicsShapeMBS
Some properties using for this class:
- SCNLevelOfDetailMBS.geometry as SCNGeometryMBS
- SCNNodeMBS.Geometry as SCNGeometryMBS
Some examples using this class:
- /Mac64bit/SceneKit/Free form
- /Mac64bit/SceneKit/SceneKit Primitives
- /Mac64bit/SceneKit/Triangle Demo
Blog Entries
- MonkeyBread Software Releases the MBS Xojo Plugins in version 24.4
- MBS Xojo Plugins, version 24.4pr6
- MBS Xojo Plugins, version 18.4pr8
Xojo Developer Magazine
Release notes
- Version 24.4
- Added shaderModifiers for SCNGeometryMBS class.
- 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.
SCNGeometryElementMBS - SCNGeometrySourceMBS