2010-12-08 04:57:47 +00:00
|
|
|
//
|
|
|
|
// XniPoint.h
|
|
|
|
// XNI
|
|
|
|
//
|
|
|
|
// Created by Matej Jan on 8.12.10.
|
|
|
|
// Copyright 2010 Retronator. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
|
|
#import "Retronator.Xni.Framework.classes.h"
|
|
|
|
|
2012-10-11 21:45:34 +00:00
|
|
|
@interface XniPoint : NSObject <NSCopying, NSCoding> {
|
2010-12-08 04:57:47 +00:00
|
|
|
PointStruct data;
|
|
|
|
}
|
|
|
|
|
2010-12-14 23:28:16 +00:00
|
|
|
- (id) initWithIntX:(int)x y:(int)y;
|
|
|
|
- (id) initWithPointStruct:(PointStruct*) pointStruct;
|
2010-12-08 04:57:47 +00:00
|
|
|
- (id) initWithPoint:(XniPoint*) point;
|
|
|
|
|
|
|
|
+ (XniPoint*) pointWithX:(int)x y:(int)y;
|
|
|
|
+ (XniPoint*) pointWithStruct:(PointStruct*) pointStruct;
|
|
|
|
+ (XniPoint*) pointWithPoint:(XniPoint*) point;
|
|
|
|
+ (XniPoint*) pointWithCGPoint:(CGPoint) cgPoint;
|
|
|
|
|
|
|
|
@property (nonatomic) int x;
|
|
|
|
@property (nonatomic) int y;
|
|
|
|
@property (nonatomic, readonly) PointStruct *data;
|
|
|
|
|
2012-05-14 08:40:49 +00:00
|
|
|
+ (XniPoint*) add:(XniPoint*)value1 to:(XniPoint*)value2;
|
|
|
|
+ (XniPoint*) subtract:(XniPoint*)value1 by:(XniPoint*)value2;
|
|
|
|
|
2010-12-08 04:57:47 +00:00
|
|
|
- (XniPoint*) set:(XniPoint*)value;
|
|
|
|
|
2012-05-14 08:40:49 +00:00
|
|
|
- (XniPoint*) add:(XniPoint*)value;
|
|
|
|
- (XniPoint*) subtract:(XniPoint*)value;
|
|
|
|
|
2010-12-08 04:57:47 +00:00
|
|
|
- (BOOL) equals:(XniPoint*)point;
|
|
|
|
|
|
|
|
+ (XniPoint*) zero;
|
|
|
|
|
|
|
|
@end
|