Skip to main content

TensorMath.rotatePoints3d

Function

Applies a rotation to each point in a set of 3D points, and places the results in outPoints.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

rotatePoints3d(points, pointsShape, rotation, outPoints): void

Applies a rotation to each point in a set of 3D points, and places the results in outPoints.

points - Float32Array of size (point count * 3). Points to rotate

pointsShape - Should be {3, point count, 1}

rotation - Quaternion rotation to apply

outPoints - Float32Array of size (point count * 3). Resulting rotated points are placed here

Parameters

ParameterType
pointsFloat32Array
pointsShapevec3
rotationquat
outPointsFloat32Array

Returns

void