Platforms to show: All Mac Windows Linux Cross-Platform

Back to SCNGeometrySourceMBS class.

SCNGeometrySourceMBS.geometrySourceWithData(data as MemoryBlock, Semantic as String, vectorCount as Integer, floatComponents as boolean, componentsPerVector as Integer, bytesPerComponent as Integer, dataOffset as Integer, dataStride as Integer) as SCNGeometrySourceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a geometry source from the specified data and options.

data: The data for the geometry source.
semantic: The semantic value (or attribute) that the geometry source describes for each vertex. See Geometry Semantic Identifiers for available values.
vectorCount: The number of geometry source vectors.
floatComponents: A Boolean value that indicates whether vector components are floating-point values. Specify true for floating-point values, or false for integer values.
componentsPerVector: The number of scalar components in each vector.
bytesPerComponent: The size, in bytes, of each vector component.
offset: The offset, in bytes, from the beginning of the data to the first vector component to be used in the geometry source.
stride: The number of bytes from each vector to the next in the data.

Returns a new geometry source object.

sA geometry source’s data is an array of vectors, each of which represents a particular attribute (or semantic) of a vertex in the geometry. The other parameters determine how SceneKit interprets this data. For example, an array of vertex positions may have three 32-bit floating-point components per vector, but an array of texture coordinates may have two 8-bit integer coponents per vector. You can use the offset and stride parameters together to interleave data for multiple geometry sources in the same array, improving rendering performance. See SCNGeometrySourceMBS for details.
To create a custom SCNGeometryMBS object from the geometry source, use the geometryWithSources method.

Some examples using this method:

SCNGeometrySourceMBS.geometrySourceWithNormals(Normals() as SCNVector3MBS) as SCNGeometrySourceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a geometry source from an array of normal vectors.

normals: An array of three-component vectors, each of which represents a surface normal for the geometry source.

A new geometry source whose SCNGeometrySource property is SCNGeometrySourceSemanticNormal.

SceneKit converts this data to its own format to optimize rendering performance. To read the converted data, examine the properties of the created SCNGeometrySourceMBS object.
To create a custom SCNGeometryMBS object from the geometry source, use the geometryWithSources method.

See also:

Some examples using this method:

SCNGeometrySourceMBS.geometrySourceWithNormals(texcoord() as CGPointMBS) as SCNGeometrySourceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a geometry source from an array of texture coordinate points.

texcoord: An array of points, each of which represents a texture coordinate pair for the geometry source.

A new geometry source whose SCNGeometrySource property is SCNGeometrySourceSemanticTexcoord.

SceneKit converts this data to its own format to optimize rendering performance. To read the converted data, examine the properties of the created SCNGeometrySourceMBS object.
To create a custom SCNGeometryMBS object from the geometry source, use the geometryWithSources:elements: method.

See also:

SCNGeometrySourceMBS.geometrySourceWithVertices(vertices() as SCNVector3MBS) as SCNGeometrySourceMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a geometry source from an array of vertex positions.

vertices: An array of three-component vectors, each of which represents a vertex position for the geometry source.

Returns a new geometry source whose SCNGeometrySource property is SCNGeometrySourceSemanticVertex.

SceneKit converts this data to its own format to optimize rendering performance. To read the converted data, examine the properties of the created SCNGeometrySourceMBS object.
To create a custom SCNGeometryMBS object from the geometry source, use the geometryWithSources method.

Some examples using this method:

SCNGeometrySourceMBS.SCNGeometrySourceSemanticBoneIndices as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for bone index data, used for skeletal animation of skinned surfaces.

For a geometry source, this semantic identifies data containing skeletal animation data for each vertex in the geometry. SceneKit uses this information to determine which bone nodes in the skeleton affect the behavior of each vertex.
For a custom shader program, you use this semantic to bind SceneKit’s bone index data to an input attribute of the shader.
For details on skeletal animation, see SCNSkinnerMBS.

SCNGeometrySourceMBS.SCNGeometrySourceSemanticBoneWeights as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for bone weight data, used for skeletal animation of skinned surfaces.

For a geometry source, this semantic identifies data containing skeletal animation data for each vertex in the geometry. SceneKit uses this information to determine how much a vertex’s position is influenced by the positions of bone nodes in the skeleton.
For a custom shader program, you use this semantic to bind SceneKit’s bone weight data to an input attribute of the shader.
For details on skeletal animation, see SCNSkinnerMBS.

SCNGeometrySourceMBS.SCNGeometrySourceSemanticColor as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for per-vertex color data.

For a geometry source, this semantic identifies data containing a color for each vertex in the geometry. SceneKit interpolates per-vertex colors across a surface to produce smooth shading. Per-vertex colors modulate those produced by lighting and a geometry’s materials, if applicable.
For a custom shader program, you use this semantic to bind SceneKit’s vertex color data to an input attribute of the shader.
Vertex color data is typically an array of three- or four-component vectors.

Some examples using this method:

SCNGeometrySourceMBS.SCNGeometrySourceSemanticEdgeCrease as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for edge crease data, used for subdividing surfaces.

For a geometry source, this semantic identifies data containing crease data for each vertex in the geometry. SceneKit uses this information to determine the sharpness of edges and smoothness of surfaces when you change a geometry’s subdivisionLevel property.
For a custom shader program, you use this semantic to bind SceneKit’s edge crease data to an input attribute of the shader.
Edge crease data is an array of scalar floating-point values, where each value determines the smoothness or sharpness of the edge identified by the primitive at the corresponding index in the geometry’s SceneKit Constants geometry element: A value of 0.0 specifies a completely smoothed edge, and a value of 10.0 or greater specifies an infinitely sharp edge.

SCNGeometrySourceMBS.SCNGeometrySourceSemanticNormal as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for surface normal data.

For a geometry source, this semantic identifies data containing the surface normal vector at each vertex in the geometry. SceneKit uses this information to compute lighting effects on the surface.
For a custom shader program, you use this semantic to bind SceneKit’s vertex normal data to an input attribute of the shader.
Vertex normal data is typically an array of three- or four-component vectors.

SCNGeometrySourceMBS.SCNGeometrySourceSemanticTangent as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for surface tangent vector data.

For a geometry source, this semantic identifies data containing the surface tangent vector at each vertex in the geometry. SceneKit uses this information to compute advanced lighting effects on the surface.
For a custom shader program, you use this semantic to bind SceneKit’s vertex tangent data to an input attribute of the shader.
Vertex tangent data is typically an array of three- or four-component vectors.

SCNGeometrySourceMBS.SCNGeometrySourceSemanticTexcoord as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for texture coordinate data.

For a geometry source, this semantic identifies data containing texture mapping coordinates for each vertex in the geometry. Unlike other semantics, a geometry may contain multiple sources for texture coordinates—each corresponds to a separate mappingChannel number that you can use when associating textured materials.
For a custom shader program, you use this semantic to bind SceneKit’s texture coordinate data to one or more input attributes of the shader.
Texture coordinate data is typically an array of two-component vectors.

SCNGeometrySourceMBS.SCNGeometrySourceSemanticVertex as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for vertex position data.

For a geometry source, this semantic identifies data containing the positions of each vertex in the geometry. If you create a custom geometry using the geometryWithSources method, you must provide a geometry source for this semantic.
For a custom shader program, you use this semantic to bind SceneKit’s vertex position data to an input attribute of the shader.
Vertex position data is typically an array of three- or four-component vectors.

SCNGeometrySourceMBS.SCNGeometrySourceSemanticVertexCrease as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The semantic for vertex crease data, used for subdividing surfaces.

For a geometry source, this semantic identifies data containing crease data for each vertex in the geometry. SceneKit uses this information to determine the sharpness of corners and smoothness of surfaces when you change a geometry’s subdivisionLevel property.
For a custom shader program, you use this semantic to bind SceneKit’s vertex crease data to an input attribute of the shader.
Vertex crease data is an array of scalar floating-point values, where each value determines the smoothness or sharpness of the corresponding vertex: A value of 0.0 specifies a completely smoothed corner, and a value of 10.0 or greater specifies an infinitely sharp point.

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


The biggest plugin in space...