|
EngineKit
|
#import <Rotation.h>
Instance Methods | |
| (instancetype) | - initWithSCNVector4: |
| (instancetype) | - initWithAxis:angle: |
| (instancetype) | - initWithArray: |
| (instancetype) | - initWithObject: |
| (SCNVector4) | - toSCNVector |
Class Methods | |
| (instancetype) | + rotationWithAxis:angle: |
| (instancetype) | + rotationWithArray: |
| (instancetype) | + rotationWithObject: |
| (instancetype) | + rotationWithSCNVector4: |
Represents a rotation of a determined angle around a determined axis.
| - (instancetype) initWithArray: | (NSArray *) | array |
Creates a Rotation based on the given NSArray. Trusts that the array has enough (4 or more) components, and that the first 4 components may be cast into NSNumbers.
The first 3 numbers are used to create an Axis, and the fourth represents the angle for the rotation. This is much like the SCNVector4s are used for rotation.
| array | The array representing the rotation. |
| - (instancetype) initWithObject: | (id) | object |
Creates a Rotation based on the given object. The supported objects are:
-initWithArray.-initWithSCNVector4.assert(false) will be triggered.| object | An object of any one of the classes mentioned above. |
| - (instancetype) initWithSCNVector4: | (SCNVector4) | vector |
| + (instancetype) rotationWithArray: | (NSArray *) | array |
Creates a Rotation based on the given NSArray. Trusts that the array has enough (4 or more) components, and that the first 4 components may be cast into NSNumbers.
The first 3 numbers are used to create an Axis, and the fourth represents the angle for the rotation. This is much like the SCNVector4s are used for rotation.
| array | The array representing the rotation. |
| + (instancetype) rotationWithObject: | (id) | object |
Creates a Rotation based on the given object. The supported objects are:
-initWithArray.-initWithSCNVector4.assert(false) will be triggered.| object | An object of any one of the classes mentioned above. |
| + (instancetype) rotationWithSCNVector4: | (SCNVector4) | vector |
| - (SCNVector4) toSCNVector |