AppleSCNGeometryElement - UBogun/Xojo-iosLib GitHub Wiki

Inherits from AppleObject
Memory leak check: not yet done.
Status: incomplete, MDL constructor missing.

An SCNGeometryElement object describes how vertices are connected to form the surface of a three-dimensional object, or geometry. You use geometry elements together with SCNGeometrySource objects to define custom SCNGeometry objects or to inspect the data that composes an existing geometry.
You create a custom geometry using a three-step process:

    1. Create one or more SCNGeometrySource objects, each of which defines per-vertex information such as position, surface normal, or texture coordinates for all vertices in the geometry.
    1. Create at least one SCNGeometryElement object, containing an array of indices identifying vertices in the geometry sources and describing the drawing primitive that SceneKit uses to connect the vertices when rendering the geometry.
    1. Create an SCNGeometry instance from the geometry sources and geometry elements.

Constructors

Constructor (Data as Appledata, primitiveType as SCNGeometryPrimitiveType, primitiveCount as integer, bytesPerIndex as Integer): Creates a geometry element from the specified data and options.

Properties

BytesPerIndex As Integer: The number of bytes that represent each index value in the element’s data. (read-only)

Data As AppleData: The data describing the geometry element. (read-only)

PrimitiveCount As Integer: The number of primitives in the element. (read-only)

PrimitiveType As SCNGeometryPrimitiveType: The drawing primitive that connects vertices when rendering the geometry element. (read-only)

SCNGeometryPrimitiveType Definition
Triangles The geometry element’s data is a sequence of triangles, with each triangle described by three new vertices.
TriangleStrip The geometry element’s data is a sequence of triangles, with each triangle described by one new vertex and two vertices from the previous triangle.
Line The geometry element’s data is a sequence of line segments, with each line segment described by two new vertices.
Point The geometry element’s data is a sequence of unconnected points.