Point3i
Objective-C
@interface Point3i : NSObject
Swift
class Point3i : NSObject
Represents a three dimensional point the coordinate values of which are of type int
-
Declaration
Objective-C
@property int xSwift
var x: Int32 { get set } -
Declaration
Objective-C
@property int ySwift
var y: Int32 { get set } -
Declaration
Objective-C
@property int zSwift
var z: Int32 { get set } -
Declaration
Objective-C
- (instancetype)init;Swift
init() -
Declaration
Objective-C
- (instancetype)initWithX:(int)x y:(int)y z:(int)z;Swift
init(x: Int32, y: Int32, z: Int32) -
Declaration
Objective-C
- (instancetype)initWithVals:(NSArray<NSNumber*>*)vals;Swift
init(vals: [NSNumber]) -
Calculate the dot product of this point and another point
Declaration
Objective-C
- (double)dot:(nonnull Point3i *)point;Swift
func dot(_ point: Point3i) -> DoubleParameters
pointThe other point
-
Calculate the cross product of this point and another point
Declaration
Objective-C
- (nonnull Point3i *)cross:(nonnull Point3i *)point;Swift
func cross(_ point: Point3i) -> Point3iParameters
pointThe other point
-
Set the point coordinates from the values of an array
Declaration
Objective-C
- (void)set:(nonnull NSArray<NSNumber *> *)vals;Swift
func set(vals: [NSNumber])Parameters
valsThe array of values from which to set the coordinates
-
Clone object
Declaration
Objective-C
- (nonnull Point3i *)clone;Swift
func clone() -> Point3i -
Compare for equality
Declaration
Objective-C
- (BOOL)isEqual:(nullable id)other;Swift
func isEqual(_ other: Any?) -> BoolParameters
otherObject to compare
-
Calculate hash value for this object
Declaration
Objective-C
- (NSUInteger)hash;Swift
func hash() -> UInt -
Returns a string that describes the contents of the object
Declaration
Objective-C
- (nonnull NSString *)description;Swift
func description() -> String
View on GitHub
Point3i Class Reference