EngineKit
Axis Class Reference

#import <Axis.h>

Inheritance diagram for Axis:
Vector <VectorExport>

Instance Methods

(instancetype) - initWithString:
 
- Instance Methods inherited from Vector
(instancetype) - initUniformWithNumber:
 
(instancetype) - initWithX:Y:Z:
 
(instancetype) - initWithSCNVector:
 
(instancetype) - initWithSCNVector4:
 
(instancetype) - initWithCIVector:
 
(instancetype) - initWithVector:
 
(instancetype) - initWithArray:
 
(instancetype) - initWithObject:
 
(BOOL) - isEqualToVector:
 
(SCNVector3) - toSCNVector
 

Class Methods

(instancetype) + x
 
(instancetype) + y
 
(instancetype) + z
 
- Class Methods inherited from Vector
(instancetype) + origin
 

Additional Inherited Members

- Properties inherited from Vector
SCNVector3 vector
 
CGFloat x
 The Vector's x component.
 
CGFloat y
 The Vector's y component.
 
CGFloat z
 The Vector's z component.
 
- Properties inherited from <VectorExport>
CGFloat x
 
CGFloat y
 
CGFloat z
 

Detailed Description

A representation of an axis (which is treated as an infinite vector and isn't necessarily x, y or z). Used mainly for Rotations.

Method Documentation

- (instancetype) initWithString: (NSString *)  string

Attempts to initialize an Axis by scanning the string for numbers. If at least three numbers are found, the first three are used. Otherwise, scans the string for the characters x, y or z, and returns the corresponding axis.

Warning
If the Axis fails to find something useful in the string, an assert(false) is triggered.
Parameters
stringThe NSString in which to search for the information.
Returns
The initialized Axis.
+ (instancetype) x

The default x Axis, represented by (1 0 0).

Returns
An initialized Axis.
+ (instancetype) y

The default y Axis, represented by (0 1 0).

Returns
An initialized Axis.
+ (instancetype) z

The default z Axis, represented by (0 0 1).

Returns
An initialized Axis.

The documentation for this class was generated from the following files: