Structure

SCNVector3

A representation of a three-component vector.

Declaration

typedef struct SCNVector3 {
    ...
} SCNVector3;

Overview

SceneKit uses three-component vectors for a variety of purposes, such as describing node or vertex positions, surface normals, and scale or translation transforms. The different vector components should be interpreted based on the context in which the vector is being used.

Topics

Components

x

The first component in the vector.

y

The second component in the vector.

z

The third component in the vector.

Creating Vectors

SCNVector3Make

Returns a new three-component vector created from individual component values.

Converting Vector Types

SCNVector3FromGLKVector3

Returns a three-element SceneKit vector structure corresponding to a GLKit vector structure.

SCNVector3ToGLKVector3

Returns a three-element GLKit vector structure corresponding to a SceneKit vector structure.

Comparing Vectors

SCNVector3EqualToVector3

Returns a Boolean value that indicates whether the corresponding components of two vectors are equal.

Zero Constant

SCNVector3Zero

The three-component vector whose every component is 0.0.

See Also

Vectors

SCNVector4

A representation of a four-component vector.