mirror of
https://github.com/thes3m/XNI
synced 2024-12-26 13:26:06 +01:00
Adding texture support to pipeline. Also headers for linear algebra classes.
git-svn-id: http://xni.googlecode.com/svn/XNI@15 ac433895-eea3-a490-d80a-17149a75e588
This commit is contained in:
parent
801508e414
commit
d639f8483d
@ -8,7 +8,6 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface ContentManager : NSObject {
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#import "ContentManager.h"
|
||||
|
||||
#import "Retronator.Xni.Framework.Content.Pipeline.h"
|
||||
|
||||
@implementation ContentManager
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
//
|
||||
// ContentIdentity.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface ContentIdentity : NSObject {
|
||||
NSString *fragmentIdentifier;
|
||||
NSString *sourceFilename;
|
||||
NSString *sourceTool;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) NSString *fragmentIdentifier;
|
||||
@property (nonatomic, retain) NSString *sourceFilename;
|
||||
@property (nonatomic, retain) NSString *sourceTool;
|
||||
|
||||
@end
|
@ -0,0 +1,18 @@
|
||||
//
|
||||
// ContentIdentity.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ContentIdentity.h"
|
||||
|
||||
|
||||
@implementation ContentIdentity
|
||||
|
||||
@synthesize fragmentIdentifier;
|
||||
@synthesize sourceFilename;
|
||||
@synthesize sourceTool;
|
||||
|
||||
@end
|
@ -0,0 +1,18 @@
|
||||
//
|
||||
// ContentImporter.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface ContentImporter : NSObject {
|
||||
|
||||
}
|
||||
|
||||
- (id) importFile:(NSString*)filename;
|
||||
|
||||
@end
|
@ -0,0 +1,16 @@
|
||||
//
|
||||
// ContentImporter.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ContentImporter.h"
|
||||
|
||||
|
||||
@implementation ContentImporter
|
||||
|
||||
- (id) importFile:(NSString*)filename { return nil; }
|
||||
|
||||
@end
|
@ -0,0 +1,22 @@
|
||||
//
|
||||
// ContentItem.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "Retronator.Xni.Framework.Content.Pipeline.classes.h"
|
||||
|
||||
@interface ContentItem : NSObject {
|
||||
ContentIdentity *identity;
|
||||
NSString *name;
|
||||
}
|
||||
|
||||
@property (nonatomic, retain) ContentIdentity *identity;
|
||||
@property (nonatomic, retain) NSString *name;
|
||||
|
||||
|
||||
@end
|
@ -0,0 +1,17 @@
|
||||
//
|
||||
// ContentItem.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ContentItem.h"
|
||||
|
||||
|
||||
@implementation ContentItem
|
||||
|
||||
@synthesize identity;
|
||||
@synthesize name;
|
||||
|
||||
@end
|
@ -0,0 +1,29 @@
|
||||
//
|
||||
// BitmapContent.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "Retronator.Xni.Framework.Graphics.classes.h"
|
||||
|
||||
#import "ContentItem.h"
|
||||
|
||||
@interface BitmapContent : ContentItem {
|
||||
int width;
|
||||
int height;
|
||||
}
|
||||
|
||||
- (id) initWithWidth:(int)theWidth Height:(int)theHeight;
|
||||
|
||||
@property (nonatomic) int width;
|
||||
@property (nonatomic) int height;
|
||||
|
||||
- (void*) getPixelData;
|
||||
- (void) setPixelData:(void*)sourceData;
|
||||
- (SurfaceFormat) tryGetFormat;
|
||||
|
||||
@end
|
@ -0,0 +1,29 @@
|
||||
//
|
||||
// BitmapContent.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BitmapContent.h"
|
||||
|
||||
|
||||
@implementation BitmapContent
|
||||
|
||||
- (id) initWithWidth:(int)theWidth Height:(int)theHeight {
|
||||
if (self = [super init]) {
|
||||
width = theWidth;
|
||||
height = theHeight;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@synthesize width;
|
||||
@synthesize height;
|
||||
|
||||
- (void*) getPixelData { return nil; }
|
||||
- (void) setPixelData:(void*)sourceData { }
|
||||
- (SurfaceFormat) tryGetFormat { return SurfaceFormatColor; }
|
||||
|
||||
@end
|
@ -0,0 +1,24 @@
|
||||
//
|
||||
// ColorPixelBitmapContent.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "PixelBitmapContent.h"
|
||||
#import "Retronator.Xni.Framework.Graphics.PackedVector.classes.h"
|
||||
|
||||
@interface ColorPixelBitmapContent : PixelBitmapContent {
|
||||
Byte4* colorPixelData;
|
||||
}
|
||||
|
||||
- (Byte4*) getPixelData;
|
||||
- (void) setPixelData:(Byte4*)sourceData;
|
||||
|
||||
- (Byte4) getPixelAtX:(int)x Y:(int)y;
|
||||
- (void) setPixelAtX:(int)x Y:(int)y Value:(Byte4)value;
|
||||
|
||||
@end
|
@ -0,0 +1,37 @@
|
||||
//
|
||||
// ColorPixelBitmapContent.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ColorPixelBitmapContent.h"
|
||||
|
||||
|
||||
@implementation ColorPixelBitmapContent
|
||||
|
||||
- (id) initWithWidth:(int)theWidth Height:(int)theHeight {
|
||||
if (self = [super initWithWidth:theWidth Height:theHeight Format:SurfaceFormatColor]) {
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (Byte4 *) getPixelData {
|
||||
return colorPixelData;
|
||||
}
|
||||
|
||||
- (void) setPixelData:(Byte4 *)sourceData {
|
||||
colorPixelData = sourceData;
|
||||
[super setPixelData:sourceData];
|
||||
}
|
||||
|
||||
- (Byte4) getPixelAtX:(int)x Y:(int)y {
|
||||
return colorPixelData[x + y * width];
|
||||
}
|
||||
|
||||
- (void) setPixelAtX:(int)x Y:(int)y Value:(Byte4)value {
|
||||
colorPixelData[x + y * width] = value;
|
||||
}
|
||||
|
||||
@end
|
@ -0,0 +1,24 @@
|
||||
//
|
||||
// PixelBitmapContent.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 8.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "BitmapContent.h"
|
||||
|
||||
@interface PixelBitmapContent : BitmapContent {
|
||||
Byte* pixelData;
|
||||
SurfaceFormat format;
|
||||
int bytesPerPixel;
|
||||
}
|
||||
|
||||
- (id) initWithWidth:(int)theWidth Height:(int)theHeight Format:(SurfaceFormat)theFormat;
|
||||
|
||||
- (Byte*) getPixelAtX:(int)x Y:(int)y;
|
||||
- (void) setPixelAtX:(int)x Y:(int)y Value:(Byte*)value;
|
||||
|
||||
@end
|
@ -0,0 +1,48 @@
|
||||
//
|
||||
// PixelBitmapContent.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 8.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PixelBitmapContent.h"
|
||||
|
||||
#import "Retronator.Xni.Framework.Content.Pipeline.Graphics.h"
|
||||
|
||||
@implementation PixelBitmapContent
|
||||
|
||||
- (id) initWithWidth:(int)theWidth Height:(int)theHeight Format:(SurfaceFormat)theFormat {
|
||||
if (self = [super initWithWidth:theWidth Height:theHeight]) {
|
||||
format = theFormat;
|
||||
BOOL result = [VectorConverter tryGetSizeInBytesOfSurfaceFormat:format SizeInBytes:&bytesPerPixel];
|
||||
if (!result) {
|
||||
[NSException raise:@"ArgumentException" format:@"The provided format is not supported"];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void*) getPixelData {
|
||||
return pixelData;
|
||||
}
|
||||
|
||||
- (void) setPixelData:(void*)sourceData {
|
||||
pixelData = sourceData;
|
||||
}
|
||||
|
||||
- (SurfaceFormat) tryGetFormat {
|
||||
return format;
|
||||
}
|
||||
|
||||
- (Byte *) getPixelAtX:(int)x Y:(int)y {
|
||||
// Index into the data array at bytesPerPixel intervals.
|
||||
return &pixelData[(x + y * width) * bytesPerPixel];
|
||||
}
|
||||
|
||||
- (void) setPixelAtX:(int)x Y:(int)y Value:(Byte *)value {
|
||||
// The value contains bytesPerPixel bytes.
|
||||
memcpy(&pixelData[(x + y * width) * bytesPerPixel], value, bytesPerPixel);
|
||||
}
|
||||
|
||||
@end
|
@ -0,0 +1,4 @@
|
||||
|
||||
@class PixelBitmapContent;
|
||||
|
||||
@class VectorConverter;
|
@ -0,0 +1,4 @@
|
||||
|
||||
#import "PixelBitmapContent.h"
|
||||
|
||||
#import "VectorConverter.h"
|
@ -0,0 +1,16 @@
|
||||
//
|
||||
// TextureContent.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
@interface TextureContent : NSObject {
|
||||
|
||||
}
|
||||
|
||||
@end
|
@ -0,0 +1,14 @@
|
||||
//
|
||||
// TextureContent.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TextureContent.h"
|
||||
|
||||
|
||||
@implementation TextureContent
|
||||
|
||||
@end
|
@ -0,0 +1,22 @@
|
||||
//
|
||||
// VectorConverter.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "Retronator.Xni.Framework.Graphics.classes.h"
|
||||
|
||||
|
||||
@interface VectorConverter : NSObject {
|
||||
|
||||
}
|
||||
|
||||
+ (BOOL) tryGetSizeInBytesOfSurfaceFormat:(SurfaceFormat)surfaceFormat SizeInBytes:(int*)sizeInBytes;
|
||||
|
||||
+ (BOOL) tryGetVectorTypeOfSurfaceFormat:(SurfaceFormat)surfaceFormat VectorType:(Class*)type;
|
||||
|
||||
@end
|
@ -0,0 +1,64 @@
|
||||
//
|
||||
// VectorConverter.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "VectorConverter.h"
|
||||
|
||||
#import "Retronator.Xni.Framework.h"
|
||||
#import "Retronator.Xni.Framework.Graphics.PackedVector.h"
|
||||
|
||||
@implementation VectorConverter
|
||||
|
||||
+ (BOOL) tryGetSizeInBytesOfSurfaceFormat:(SurfaceFormat)surfaceFormat SizeInBytes:(int*)sizeInBytes {
|
||||
switch (surfaceFormat) {
|
||||
case SurfaceFormatColor:
|
||||
*sizeInBytes = sizeof(Byte4);
|
||||
return YES;
|
||||
case SurfaceFormatRgb565:
|
||||
*sizeInBytes = sizeof(Rgb565);
|
||||
return YES;
|
||||
case SurfaceFormatRgba5551:
|
||||
*sizeInBytes = sizeof(Rgba5551);
|
||||
return YES;
|
||||
case SurfaceFormatRgba4444:
|
||||
*sizeInBytes = sizeof(Rgba4444);
|
||||
return YES;
|
||||
case SurfaceFormatAlpha8:
|
||||
*sizeInBytes = sizeof(Alpha8);
|
||||
return YES;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
+ (BOOL) tryGetVectorTypeOfSurfaceFormat:(SurfaceFormat)surfaceFormat VectorType:(Class*)type {
|
||||
switch (surfaceFormat) {
|
||||
case SurfaceFormatColor:
|
||||
*type = [Vector4 class];
|
||||
return YES;
|
||||
case SurfaceFormatRgb565:
|
||||
*type = [Vector3 class];
|
||||
return YES;
|
||||
case SurfaceFormatRgba5551:
|
||||
*type = [Vector4 class];
|
||||
return YES;
|
||||
case SurfaceFormatRgba4444:
|
||||
*type = [Vector4 class];
|
||||
return YES;
|
||||
case SurfaceFormatAlpha8:
|
||||
*type = [NSNumber class];
|
||||
return YES;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
@ -0,0 +1,3 @@
|
||||
@class ContentIdentity, ContentItem;
|
||||
|
||||
@class TextureImporter;
|
@ -0,0 +1,4 @@
|
||||
#import "ContentIdentity.h"
|
||||
#import "ContentItem.h"
|
||||
|
||||
#import "TextureImporter.h"
|
@ -0,0 +1,17 @@
|
||||
//
|
||||
// TextureImporter.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "ContentImporter.h"
|
||||
|
||||
@interface TextureImporter : ContentImporter {
|
||||
|
||||
}
|
||||
|
||||
@end
|
@ -0,0 +1,20 @@
|
||||
//
|
||||
// TextureImporter.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 7.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TextureImporter.h"
|
||||
|
||||
|
||||
@implementation TextureImporter
|
||||
|
||||
- (id) importFile:(NSString*)filename {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
@ -1 +1 @@
|
||||
@class ContentManager
|
||||
@class ContentManager;
|
@ -0,0 +1,5 @@
|
||||
typedef UInt32 Byte4;
|
||||
typedef UInt16 Rgb565;
|
||||
typedef UInt16 Rgba5551;
|
||||
typedef UInt16 Rgba4444;
|
||||
typedef UInt8 Alpha8;
|
@ -0,0 +1,2 @@
|
||||
|
||||
#import "PackedVectorStructs.h"
|
@ -0,0 +1,2 @@
|
||||
|
||||
#import "PackedVectorStructs.h"
|
60
Classes/Retronator/Xni/Framework/Graphics/Vector4.h
Normal file
60
Classes/Retronator/Xni/Framework/Graphics/Vector4.h
Normal file
@ -0,0 +1,60 @@
|
||||
//
|
||||
// Vector4.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "Retronator.Xni.Framework.classes.h"
|
||||
|
||||
@interface Vector4 : NSObject {
|
||||
Vector4Struct data;
|
||||
}
|
||||
|
||||
- (id) initWithX:(float)x Y:(float)y Z:(float)z W:(float)w;
|
||||
- (id) initWithStruct: (Vector4Struct*)vectorData;
|
||||
- (id) initWithVector: (Vector4*)vector;
|
||||
|
||||
+ (Vector4*) vectorWithX:(float)x Y:(float)y Z:(float)z W:(float)w;
|
||||
+ (Vector4*) vectorWithStruct: (Vector4Struct*)vectorData;
|
||||
+ (Vector4*) vectorWithVector: (Vector4*)vector;
|
||||
|
||||
@property (nonatomic) float x;
|
||||
@property (nonatomic) float y;
|
||||
@property (nonatomic) float z;
|
||||
@property (nonatomic) float w;
|
||||
|
||||
@property (nonatomic, readonly) Vector4Struct *data;
|
||||
|
||||
+ (Vector4*) normalize:(Vector4*)value;
|
||||
+ (Vector4*) negate:(Vector4*)value;
|
||||
|
||||
+ (Vector4*) add:(Vector4*)value1 to:(Vector4*)value2;
|
||||
+ (Vector4*) subtract:(Vector4*)value1 by:(Vector4*)value2;
|
||||
+ (Vector4*) multiply:(Vector4*)value by:(float)scalar;
|
||||
|
||||
+ (Vector4*) transform:(Vector4*)value with:(Matrix*)matrix;
|
||||
|
||||
- (float) length;
|
||||
- (float) lengthSquared;
|
||||
|
||||
- (Vector4*) normalize;
|
||||
- (Vector4*) negate;
|
||||
- (Vector4*) add:(Vector4*)value;
|
||||
- (Vector4*) subtract:(Vector4*)value;
|
||||
- (Vector4*) multiplyBy:(float)scalar;
|
||||
- (Vector4*) transformWith:(Matrix*)matrix;
|
||||
|
||||
// Constants
|
||||
+ (Vector4*) zero;
|
||||
+ (Vector4*) one;
|
||||
+ (Vector4*) unitX;
|
||||
+ (Vector4*) unitY;
|
||||
+ (Vector4*) unitZ;
|
||||
+ (Vector4*) unitW;
|
||||
|
||||
|
||||
@end
|
14
Classes/Retronator/Xni/Framework/Graphics/Vector4.m
Normal file
14
Classes/Retronator/Xni/Framework/Graphics/Vector4.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Vector4.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Vector4.h"
|
||||
|
||||
|
||||
@implementation Vector4
|
||||
|
||||
@end
|
49
Classes/Retronator/Xni/Framework/Matrix.h
Normal file
49
Classes/Retronator/Xni/Framework/Matrix.h
Normal file
@ -0,0 +1,49 @@
|
||||
//
|
||||
// Matrix.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "Retronator.Xni.Framework.classes.h"
|
||||
|
||||
@interface Matrix : NSObject {
|
||||
MatrixStruct data;
|
||||
}
|
||||
|
||||
- (id) initWithStruct: (MatrixStruct*)matrixData;
|
||||
- (id) initWithMatrix: (Matrix*)matrix;
|
||||
|
||||
+ (Matrix*) matrixWithData: (MatrixStruct*)matrixData;
|
||||
+ (Matrix*) matrixWithMatrix: (Matrix*)matrix;
|
||||
|
||||
+ (Matrix*) translation:(Vector3*)position;
|
||||
+ (Matrix*) scale:(Vector3*)scale;
|
||||
+ (Matrix*) rotationAround:(Vector3*)axis for:(float)angle;
|
||||
+ (Matrix*) rotationWithQuaternion:(Quaternion*)quaternion;
|
||||
+ (Matrix*) lookAt:(Vector3*)target from:(Vector3*)position up:(Vector3*)up;
|
||||
+ (Matrix*) perspectiveWithWidth:(float)width height:(float)height nearPlane:(float)nearPlane farPlane:(float)farPlane;
|
||||
+ (Matrix*) perspectiveWithFieldOfView:(float)fieldOfView aspectRatio:(float)aspectRatio nearPlane:(float)nearPlane farPlane:(float)farPlane;
|
||||
+ (Matrix*) worldAt:(Vector3*)position forward:(Vector3*)forward up:(Vector3*)up;
|
||||
|
||||
@property (nonatomic, readonly) MatrixStruct *data;
|
||||
@property (nonatomic, assign) Vector3 *left;
|
||||
@property (nonatomic, assign) Vector3 *right;
|
||||
@property (nonatomic, assign) Vector3 *up;
|
||||
@property (nonatomic, assign) Vector3 *down;
|
||||
@property (nonatomic, assign) Vector3 *forward;
|
||||
@property (nonatomic, assign) Vector3 *backward;
|
||||
@property (nonatomic, assign) Vector3 *translation;
|
||||
|
||||
- (Matrix*) transpose;
|
||||
- (Matrix*) inverse;
|
||||
- (Matrix*) multiplyWith:(Matrix*)value;
|
||||
|
||||
// Constants
|
||||
+ (id) zero;
|
||||
+ (id) identity;
|
||||
|
||||
@end
|
14
Classes/Retronator/Xni/Framework/Matrix.m
Normal file
14
Classes/Retronator/Xni/Framework/Matrix.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Matrix.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Matrix.h"
|
||||
|
||||
|
||||
@implementation Matrix
|
||||
|
||||
@end
|
131
Classes/Retronator/Xni/Framework/MatrixStruct.h
Normal file
131
Classes/Retronator/Xni/Framework/MatrixStruct.h
Normal file
@ -0,0 +1,131 @@
|
||||
typedef struct {
|
||||
float m11;
|
||||
float m12;
|
||||
float m13;
|
||||
float m14;
|
||||
float m21;
|
||||
float m22;
|
||||
float m23;
|
||||
float m24;
|
||||
float m31;
|
||||
float m32;
|
||||
float m33;
|
||||
float m34;
|
||||
float m41;
|
||||
float m42;
|
||||
float m43;
|
||||
float m44;
|
||||
} MatrixStruct;
|
||||
|
||||
static inline MatrixStruct MatrixMake(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24,
|
||||
float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) {
|
||||
MatrixStruct matrix;
|
||||
matrix.m11 = m11;
|
||||
matrix.m12 = m12;
|
||||
matrix.m13 = m13;
|
||||
matrix.m14 = m14;
|
||||
matrix.m21 = m21;
|
||||
matrix.m22 = m22;
|
||||
matrix.m23 = m23;
|
||||
matrix.m24 = m24;
|
||||
matrix.m31 = m31;
|
||||
matrix.m32 = m32;
|
||||
matrix.m33 = m33;
|
||||
matrix.m34 = m34;
|
||||
matrix.m41 = m41;
|
||||
matrix.m42 = m42;
|
||||
matrix.m43 = m43;
|
||||
matrix.m44 = m44;
|
||||
return matrix;
|
||||
}
|
||||
|
||||
static inline void MatrixTranspose(MatrixStruct *value) {
|
||||
MatrixStruct matrix = *value;
|
||||
value->m11 = matrix.m11;
|
||||
value->m12 = matrix.m21;
|
||||
value->m13 = matrix.m31;
|
||||
value->m14 = matrix.m41;
|
||||
value->m21 = matrix.m12;
|
||||
value->m22 = matrix.m22;
|
||||
value->m23 = matrix.m32;
|
||||
value->m24 = matrix.m42;
|
||||
value->m31 = matrix.m13;
|
||||
value->m32 = matrix.m23;
|
||||
value->m33 = matrix.m33;
|
||||
value->m34 = matrix.m43;
|
||||
value->m41 = matrix.m14;
|
||||
value->m42 = matrix.m24;
|
||||
value->m43 = matrix.m34;
|
||||
value->m44 = matrix.m44;
|
||||
}
|
||||
|
||||
static inline void MatrixInverse(MatrixStruct *value) {
|
||||
MatrixStruct matrix = *value;
|
||||
float det1 = matrix.m11 * matrix.m22 - matrix.m12 * matrix.m21;
|
||||
float det2 = matrix.m11 * matrix.m23 - matrix.m13 * matrix.m21;
|
||||
float det3 = matrix.m11 * matrix.m24 - matrix.m14 * matrix.m21;
|
||||
float det4 = matrix.m12 * matrix.m23 - matrix.m13 * matrix.m22;
|
||||
float det5 = matrix.m12 * matrix.m24 - matrix.m14 * matrix.m22;
|
||||
float det6 = matrix.m13 * matrix.m24 - matrix.m14 * matrix.m23;
|
||||
float det7 = matrix.m31 * matrix.m42 - matrix.m32 * matrix.m41;
|
||||
float det8 = matrix.m31 * matrix.m43 - matrix.m33 * matrix.m41;
|
||||
float det9 = matrix.m31 * matrix.m44 - matrix.m34 * matrix.m41;
|
||||
float det10 = matrix.m32 * matrix.m43 - matrix.m33 * matrix.m42;
|
||||
float det11 = matrix.m32 * matrix.m44 - matrix.m34 * matrix.m42;
|
||||
float det12 = matrix.m33 * matrix.m44 - matrix.m34 * matrix.m43;
|
||||
|
||||
float detMatrix = (float)(det1*det12 - det2*det11 + det3*det10 + det4*det9 - det5*det8 + det6*det7);
|
||||
float invDetMatrix = 1.0f / detMatrix;
|
||||
|
||||
value->m11 = (matrix.m22*det12 - matrix.m23*det11 + matrix.m24*det10) * invDetMatrix;
|
||||
value->m12 = (-matrix.m12*det12 + matrix.m13*det11 - matrix.m14*det10) * invDetMatrix;
|
||||
value->m13 = (matrix.m42*det6 - matrix.m43*det5 + matrix.m44*det4) * invDetMatrix;
|
||||
value->m14 = (-matrix.m32*det6 + matrix.m33*det5 - matrix.m34*det4) * invDetMatrix;
|
||||
value->m21 = (-matrix.m21*det12 + matrix.m23*det9 - matrix.m24*det8) * invDetMatrix;
|
||||
value->m22 = (matrix.m11*det12 - matrix.m13*det9 + matrix.m14*det8) * invDetMatrix;
|
||||
value->m23 = (-matrix.m41*det6 + matrix.m43*det3 - matrix.m44*det2) * invDetMatrix;
|
||||
value->m24 = (matrix.m31*det6 - matrix.m33*det3 + matrix.m34*det2) * invDetMatrix;
|
||||
value->m31 = (matrix.m21*det11 - matrix.m22*det9 + matrix.m24*det7) * invDetMatrix;
|
||||
value->m32 = (-matrix.m11*det11 + matrix.m12*det9 - matrix.m14*det7) * invDetMatrix;
|
||||
value->m33 = (matrix.m41*det5 - matrix.m42*det3 + matrix.m44*det1) * invDetMatrix;
|
||||
value->m34 = (-matrix.m31*det5 + matrix.m32*det3 - matrix.m34*det1) * invDetMatrix;
|
||||
value->m41 = (-matrix.m21*det10 + matrix.m22*det8 - matrix.m23*det7) * invDetMatrix;
|
||||
value->m42 = (matrix.m11*det10 - matrix.m12*det8 + matrix.m13*det7) * invDetMatrix;
|
||||
value->m43 = (-matrix.m41*det4 + matrix.m42*det2 - matrix.m43*det1) * invDetMatrix;
|
||||
value->m44 = (matrix.m31*det4 - matrix.m32*det2 + matrix.m33*det1) * invDetMatrix;
|
||||
}
|
||||
|
||||
static inline void MatrixMultiply(MatrixStruct *value1, MatrixStruct *value2, MatrixStruct *result) {
|
||||
float m11 = value1->m11 * value2->m11 + value1->m12 * value2->m21 + value1->m13 * value2->m31 + value1->m14 * value2->m41;
|
||||
float m12 = value1->m11 * value2->m12 + value1->m12 * value2->m22 + value1->m13 * value2->m32 + value1->m14 * value2->m42;
|
||||
float m13 = value1->m11 * value2->m13 + value1->m12 * value2->m23 + value1->m13 * value2->m33 + value1->m14 * value2->m43;
|
||||
float m14 = value1->m11 * value2->m14 + value1->m12 * value2->m24 + value1->m13 * value2->m34 + value1->m14 * value2->m44;
|
||||
float m21 = value1->m21 * value2->m11 + value1->m22 * value2->m21 + value1->m23 * value2->m31 + value1->m24 * value2->m41;
|
||||
float m22 = value1->m21 * value2->m12 + value1->m22 * value2->m22 + value1->m23 * value2->m32 + value1->m24 * value2->m42;
|
||||
float m23 = value1->m21 * value2->m13 + value1->m22 * value2->m23 + value1->m23 * value2->m33 + value1->m24 * value2->m43;
|
||||
float m24 = value1->m21 * value2->m14 + value1->m22 * value2->m24 + value1->m23 * value2->m34 + value1->m24 * value2->m44;
|
||||
float m31 = value1->m31 * value2->m11 + value1->m32 * value2->m21 + value1->m33 * value2->m31 + value1->m34 * value2->m41;
|
||||
float m32 = value1->m31 * value2->m12 + value1->m32 * value2->m22 + value1->m33 * value2->m32 + value1->m34 * value2->m42;
|
||||
float m33 = value1->m31 * value2->m13 + value1->m32 * value2->m23 + value1->m33 * value2->m33 + value1->m34 * value2->m43;
|
||||
float m34 = value1->m31 * value2->m14 + value1->m32 * value2->m24 + value1->m33 * value2->m34 + value1->m34 * value2->m44;
|
||||
float m41 = value1->m41 * value2->m11 + value1->m42 * value2->m21 + value1->m43 * value2->m31 + value1->m44 * value2->m41;
|
||||
float m42 = value1->m41 * value2->m12 + value1->m42 * value2->m22 + value1->m43 * value2->m32 + value1->m44 * value2->m42;
|
||||
float m43 = value1->m41 * value2->m13 + value1->m42 * value2->m23 + value1->m43 * value2->m33 + value1->m44 * value2->m43;
|
||||
float m44 = value1->m41 * value2->m14 + value1->m42 * value2->m24 + value1->m43 * value2->m34 + value1->m44 * value2->m44;
|
||||
result->m11 = m11;
|
||||
result->m12 = m12;
|
||||
result->m13 = m13;
|
||||
result->m14 = m14;
|
||||
result->m21 = m21;
|
||||
result->m22 = m22;
|
||||
result->m23 = m23;
|
||||
result->m24 = m24;
|
||||
result->m31 = m31;
|
||||
result->m32 = m32;
|
||||
result->m33 = m33;
|
||||
result->m34 = m34;
|
||||
result->m41 = m41;
|
||||
result->m42 = m42;
|
||||
result->m43 = m43;
|
||||
result->m44 = m44;
|
||||
}
|
59
Classes/Retronator/Xni/Framework/Quaternion.h
Normal file
59
Classes/Retronator/Xni/Framework/Quaternion.h
Normal file
@ -0,0 +1,59 @@
|
||||
//
|
||||
// Quaternion.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "Retronator.Xni.Framework.classes.h"
|
||||
|
||||
@interface Quaternion : NSObject {
|
||||
Vector4Struct data;
|
||||
}
|
||||
|
||||
- (id) initWithX:(float)x Y:(float)y Z:(float)z W:(float)w;
|
||||
- (id) initWithVectorPart:(Vector3*)vector scalarPart:(float)scalar;
|
||||
- (id) initWithStruct: (Vector4Struct*)quaternionData;
|
||||
- (id) initWithQuaternion: (Quaternion*)quaternion;
|
||||
|
||||
+ (Quaternion*) quaternionWithX:(float)x Y:(float)y Z:(float)z W:(float)w;
|
||||
+ (Quaternion*) quaternionWithVectorPart:(Vector3*)vector scalarPart:(float)scalar;
|
||||
+ (Quaternion*) quaternionWithStruct: (Vector4Struct*)quaternionData;
|
||||
+ (Quaternion*) quaternionWithQuaternion: (Quaternion*)quaternion;
|
||||
|
||||
+ (Quaternion*) axis:(Vector3*)axis angle:(float)angle;
|
||||
+ (Quaternion*) rotationMatrix:(Matrix*)matrix;
|
||||
|
||||
@property (nonatomic) float x;
|
||||
@property (nonatomic) float y;
|
||||
@property (nonatomic) float z;
|
||||
@property (nonatomic) float w;
|
||||
|
||||
@property (nonatomic, readonly) Vector4Struct *data;
|
||||
|
||||
+ (Quaternion*) normalize:(Quaternion*)value;
|
||||
+ (Quaternion*) negate:(Quaternion*)value;
|
||||
+ (Quaternion*) inverse:(Quaternion*)value;
|
||||
+ (Quaternion*) add:(Quaternion*)value1 to:(Quaternion*)value2;
|
||||
+ (Quaternion*) subtract:(Quaternion*)value1 by:(Quaternion*)value2;
|
||||
+ (Quaternion*) multiply:(Quaternion*)value by:(float)scalar;
|
||||
+ (Quaternion*) multiply:(Quaternion*)value1 with:(Quaternion*)value2;
|
||||
|
||||
- (float) length;
|
||||
- (float) lengthSquared;
|
||||
|
||||
- (Quaternion*) normalize;
|
||||
- (Quaternion*) negate;
|
||||
- (Quaternion*) inverse;
|
||||
- (Quaternion*) add:(Quaternion*)value;
|
||||
- (Quaternion*) subtract:(Quaternion*)value;
|
||||
- (Quaternion*) scaleBy:(float)scalar;
|
||||
- (Quaternion*) multiplyWith:(Quaternion*)value;
|
||||
|
||||
// Constants
|
||||
+ (Quaternion*) identity;
|
||||
|
||||
@end
|
14
Classes/Retronator/Xni/Framework/Quaternion.m
Normal file
14
Classes/Retronator/Xni/Framework/Quaternion.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Quaternion.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Quaternion.h"
|
||||
|
||||
|
||||
@implementation Quaternion
|
||||
|
||||
@end
|
@ -14,4 +14,11 @@
|
||||
|
||||
// Game components
|
||||
@protocol IGameComponent, IUpdatable, IDrawable;
|
||||
@class GameComponent, DrawableGameComponent, GameComponentCollection, GameComponentCollectionEventArgs;
|
||||
@class GameComponent, DrawableGameComponent, GameComponentCollection, GameComponentCollectionEventArgs;
|
||||
|
||||
// Linear algebra
|
||||
#import "Vector2Struct.h"
|
||||
#import "Vector3Struct.h"
|
||||
#import "Vector4Struct.h"
|
||||
#import "MatrixStruct.h"
|
||||
@class Vector2, Vector3, Vector4, Quaternion, Matrix;
|
@ -24,4 +24,11 @@
|
||||
//#import "GameComponent.h"
|
||||
//#import "DrawableGameComponent.h"
|
||||
#import "GameComponentCollection.h"
|
||||
#import "GameComponentCollectionEventArgs.h"
|
||||
#import "GameComponentCollectionEventArgs.h"
|
||||
|
||||
// Linear algebra
|
||||
#import "Vector2.h"
|
||||
#import "Vector3.h"
|
||||
#import "Vector4.h"
|
||||
#import "Quaternion.h"
|
||||
#import "Matrix.h"
|
59
Classes/Retronator/Xni/Framework/Vector2.h
Normal file
59
Classes/Retronator/Xni/Framework/Vector2.h
Normal file
@ -0,0 +1,59 @@
|
||||
//
|
||||
// Vector2.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "Retronator.Xni.Framework.classes.h"
|
||||
|
||||
@interface Vector2 : NSObject {
|
||||
Vector2Struct data;
|
||||
}
|
||||
|
||||
- (id) initWithX:(float)x Y:(float)y;
|
||||
- (id) initWithStruct: (Vector2Struct*)vectorData;
|
||||
- (id) initWithVector: (Vector2*)vector;
|
||||
|
||||
+ (Vector2*) vectorWithX:(float)x Y:(float)y;
|
||||
+ (Vector2*) vectorWithStruct: (Vector2Struct*)vectorData;
|
||||
+ (Vector2*) vectorWithVector: (Vector2*)vector;
|
||||
|
||||
@property (nonatomic) float x;
|
||||
@property (nonatomic) float y;
|
||||
|
||||
@property (nonatomic, readonly) Vector2Struct *data;
|
||||
|
||||
+ (Vector2*) normalize:(Vector2*)value;
|
||||
+ (Vector2*) negate:(Vector2*)value;
|
||||
|
||||
+ (Vector2*) add:(Vector2*)value1 to:(Vector2*)value2;
|
||||
+ (Vector2*) subtract:(Vector2*)value1 by:(Vector2*)value2;
|
||||
+ (Vector2*) multiply:(Vector2*)value1 by:(float)scaleFactor;
|
||||
|
||||
+ (float) dotProductOf:(Vector2*)value1 with:(Vector2*)value2;
|
||||
|
||||
+ (Vector2*) transform:(Vector2*)value with:(Matrix*)matrix;
|
||||
+ (Vector2*) transformNormal:(Vector2*)value with:(Matrix*)matrix;
|
||||
|
||||
- (float) length;
|
||||
- (float) lengthSquared;
|
||||
|
||||
- (Vector2*) normalize;
|
||||
- (Vector2*) negate;
|
||||
- (Vector2*) add:(Vector2*)value;
|
||||
- (Vector2*) subtract:(Vector2*)value;
|
||||
- (Vector2*) multiplyBy:(float)scaleFactor;
|
||||
- (Vector2*) transformWith:(Matrix*)matrix;
|
||||
- (Vector2*) transformNormalWith:(Matrix*)matrix;
|
||||
|
||||
// Constants
|
||||
+ (Vector2*) zero;
|
||||
+ (Vector2*) one;
|
||||
+ (Vector2*) unitX;
|
||||
+ (Vector2*) unitY;
|
||||
|
||||
@end
|
14
Classes/Retronator/Xni/Framework/Vector2.m
Normal file
14
Classes/Retronator/Xni/Framework/Vector2.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Vector2.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Vector2.h"
|
||||
|
||||
|
||||
@implementation Vector2
|
||||
|
||||
@end
|
67
Classes/Retronator/Xni/Framework/Vector2Struct.h
Normal file
67
Classes/Retronator/Xni/Framework/Vector2Struct.h
Normal file
@ -0,0 +1,67 @@
|
||||
#import "MatrixStruct.h"
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
} Vector2Struct;
|
||||
|
||||
static inline Vector2Struct Vector2Make(float x, float y)
|
||||
{
|
||||
Vector2Struct vector;
|
||||
vector.x = x;
|
||||
vector.y = y;
|
||||
return vector;
|
||||
}
|
||||
|
||||
static inline void Vector2Set(Vector2Struct *vector, float x, float y)
|
||||
{
|
||||
vector->x = x;
|
||||
vector->y = y;
|
||||
}
|
||||
|
||||
static inline float Vector2LengthSquared(Vector2Struct *value) {
|
||||
return value->x * value->x + value->y * value->y;
|
||||
}
|
||||
|
||||
static inline float Vector2Length(Vector2Struct *value) {
|
||||
return sqrtf(Vector2LengthSquared(value));
|
||||
}
|
||||
|
||||
static inline void Vector2Normalize(Vector2Struct *value) {
|
||||
float scalar = 1.0f / Vector2Length(value);
|
||||
value->x *= scalar;
|
||||
value->y *= scalar;
|
||||
}
|
||||
|
||||
static inline void Vector2Negate(Vector2Struct *value) {
|
||||
value->x = -value->x;
|
||||
value->y = -value->y;
|
||||
}
|
||||
|
||||
static inline void Vector2Add(Vector2Struct *value1, Vector2Struct *value2, Vector2Struct *result) {
|
||||
Vector2Set(result, value1->x + value2->x, value1->y + value2->y);
|
||||
}
|
||||
|
||||
static inline void Vector2Substract(Vector2Struct *value1, Vector2Struct *value2, Vector2Struct *result) {
|
||||
Vector2Set(result, value1->x - value2->x, value1->y - value2->y);
|
||||
}
|
||||
|
||||
static inline void Vector2Multiply(Vector2Struct *value1, float scaleFactor, Vector2Struct *result) {
|
||||
Vector2Set(result, value1->x * scaleFactor, value1->y * scaleFactor);
|
||||
}
|
||||
|
||||
static inline float Vector2DotProduct(Vector2Struct *value1, Vector2Struct *value2) {
|
||||
return value1->x * value2->x + value1->y * value2->y;
|
||||
}
|
||||
|
||||
static inline void Vector2Transform(Vector2Struct *value, MatrixStruct *matrix, Vector2Struct *result) {
|
||||
Vector2Set(result,
|
||||
(value->x * matrix->m11) + (value->y * matrix->m21) + matrix->m41,
|
||||
(value->x * matrix->m12) + (value->y * matrix->m22) + matrix->m42);
|
||||
}
|
||||
|
||||
static inline void Vector2TransformNormal(Vector2Struct *value, MatrixStruct *matrix, Vector2Struct *result) {
|
||||
Vector2Set(result,
|
||||
(value->x * matrix->m11) + (value->y * matrix->m21),
|
||||
(value->x * matrix->m12) + (value->y * matrix->m22));
|
||||
}
|
68
Classes/Retronator/Xni/Framework/Vector3.h
Normal file
68
Classes/Retronator/Xni/Framework/Vector3.h
Normal file
@ -0,0 +1,68 @@
|
||||
//
|
||||
// Vector3.h
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "Retronator.Xni.Framework.classes.h"
|
||||
|
||||
@interface Vector3 : NSObject {
|
||||
Vector3Struct data;
|
||||
}
|
||||
|
||||
- (id) initWithX:(float)x Y:(float)y Z:(float)z;
|
||||
- (id) initWithStruct: (Vector3Struct*)vectorData;
|
||||
- (id) initWithVector: (Vector3*)vector;
|
||||
|
||||
+ (Vector3*) vectorWithX:(float)x Y:(float)y Z:(float)z;
|
||||
+ (Vector3*) vectorWithStruct: (Vector3Struct*)vectorData;
|
||||
+ (Vector3*) vectorWithVector: (Vector3*)vector;
|
||||
|
||||
@property (nonatomic) float x;
|
||||
@property (nonatomic) float y;
|
||||
@property (nonatomic) float z;
|
||||
|
||||
@property (nonatomic, readonly) Vector3Struct *data;
|
||||
|
||||
+ (Vector3*) normalize:(Vector3*)value;
|
||||
+ (Vector3*) negate:(Vector3*)value;
|
||||
|
||||
+ (Vector3*) add:(Vector3*)value1 to:(Vector3*)value2;
|
||||
+ (Vector3*) subtract:(Vector3*)value1 by:(Vector3*)value2;
|
||||
+ (Vector3*) multiply:(Vector3*)value1 by:(float)scaleFactor;
|
||||
|
||||
+ (Vector3*) crossProductOf:(Vector3*)value1 with:(Vector3*)value2;
|
||||
+ (float) dotProductOf:(Vector3*)value1 with:(Vector3*)value2;
|
||||
|
||||
+ (Vector3*) transform:(Vector3*)value with:(Matrix*)matrix;
|
||||
+ (Vector3*) transformNormal:(Vector3*)value with:(Matrix*)matrix;
|
||||
|
||||
- (float) length;
|
||||
- (float) lengthSquared;
|
||||
|
||||
- (Vector3*) normalize;
|
||||
- (Vector3*) negate;
|
||||
- (Vector3*) add:(Vector3*)value;
|
||||
- (Vector3*) subtract:(Vector3*)value;
|
||||
- (Vector3*) multiplyBy:(float)scaleFactor;
|
||||
- (Vector3*) transformWith:(Matrix*)matrix;
|
||||
- (Vector3*) transformNormalWith:(Matrix*)matrix;
|
||||
|
||||
// Constants
|
||||
+ (Vector3*) zero;
|
||||
+ (Vector3*) one;
|
||||
+ (Vector3*) unitX;
|
||||
+ (Vector3*) unitY;
|
||||
+ (Vector3*) unitZ;
|
||||
+ (Vector3*) up;
|
||||
+ (Vector3*) down;
|
||||
+ (Vector3*) left;
|
||||
+ (Vector3*) right;
|
||||
+ (Vector3*) forward;
|
||||
+ (Vector3*) backward;
|
||||
|
||||
@end
|
14
Classes/Retronator/Xni/Framework/Vector3.m
Normal file
14
Classes/Retronator/Xni/Framework/Vector3.m
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Vector3.m
|
||||
// XNI
|
||||
//
|
||||
// Created by Matej Jan on 9.9.10.
|
||||
// Copyright 2010 Retronator. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Vector3.h"
|
||||
|
||||
|
||||
@implementation Vector3
|
||||
|
||||
@end
|
85
Classes/Retronator/Xni/Framework/Vector3Struct.h
Normal file
85
Classes/Retronator/Xni/Framework/Vector3Struct.h
Normal file
@ -0,0 +1,85 @@
|
||||
#import "MatrixStruct.h"
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
} Vector3Struct;
|
||||
|
||||
static inline Vector3Struct Vector3Make(float x, float y, float z)
|
||||
{
|
||||
Vector3Struct vector;
|
||||
vector.x = x;
|
||||
vector.y = y;
|
||||
vector.z = z;
|
||||
return vector;
|
||||
}
|
||||
|
||||
static inline void Vector3Set(Vector3Struct *vector, float x, float y, float z)
|
||||
{
|
||||
vector->x = x;
|
||||
vector->y = y;
|
||||
vector->z = z;
|
||||
}
|
||||
|
||||
static inline float Vector3LengthSquared(Vector3Struct *value) {
|
||||
return value->x * value->x + value->y * value->y + value->z * value->z;
|
||||
}
|
||||
|
||||
static inline float Vector3Length(Vector3Struct *value) {
|
||||
return sqrtf(Vector3LengthSquared(value));
|
||||
}
|
||||
|
||||
static inline void Vector3Normalize(Vector3Struct *value) {
|
||||
float length = Vector3Length(value);
|
||||
if (length == 0) {
|
||||
return;
|
||||
}
|
||||
float scalar = 1.0f / length;
|
||||
value->x *= scalar;
|
||||
value->y *= scalar;
|
||||
value->z *= scalar;
|
||||
}
|
||||
|
||||
static inline void Vector3Negate(Vector3Struct *value) {
|
||||
value->x = -value->x;
|
||||
value->y = -value->y;
|
||||
value->z = -value->z;
|
||||
}
|
||||
|
||||
static inline void Vector3Add(Vector3Struct *value1, Vector3Struct *value2, Vector3Struct *result) {
|
||||
Vector3Set(result, value1->x + value2->x, value1->y + value2->y, value1->z + value2->z);
|
||||
}
|
||||
|
||||
static inline void Vector3Subtract(Vector3Struct *value1, Vector3Struct *value2, Vector3Struct *result) {
|
||||
Vector3Set(result, value1->x - value2->x, value1->y - value2->y, value1->z - value2->z);
|
||||
}
|
||||
|
||||
static inline void Vector3Multiply(Vector3Struct *value1, float scaleFactor, Vector3Struct *result) {
|
||||
Vector3Set(result, value1->x * scaleFactor, value1->y * scaleFactor, value1->z * scaleFactor);
|
||||
}
|
||||
|
||||
static inline void Vector3CrossProduct(Vector3Struct *value1, Vector3Struct *value2, Vector3Struct *result) {
|
||||
Vector3Set(result,
|
||||
value1->y * value2->z - value1->z * value2->y,
|
||||
value1->z * value2->x - value1->x * value2->z,
|
||||
value1->x * value2->y - value1->y * value2->x);
|
||||
}
|
||||
|
||||
static inline float Vector3DotProduct(Vector3Struct *value1, Vector3Struct *value2) {
|
||||
return value1->x * value2->x + value1->y * value2->y + value1->z * value2->z;
|
||||
}
|
||||
|
||||
static inline void Vector3Transform(Vector3Struct *value, MatrixStruct *matrix, Vector3Struct *result) {
|
||||
Vector3Set(result,
|
||||
(value->x * matrix->m11) + (value->y * matrix->m21) + (value->z * matrix->m31) + matrix->m41,
|
||||
(value->x * matrix->m12) + (value->y * matrix->m22) + (value->z * matrix->m32) + matrix->m42,
|
||||
(value->x * matrix->m13) + (value->y * matrix->m23) + (value->z * matrix->m33) + matrix->m43);
|
||||
}
|
||||
|
||||
static inline void Vector3TransformNormal(Vector3Struct *value, MatrixStruct *matrix, Vector3Struct *result) {
|
||||
Vector3Set(result,
|
||||
(value->x * matrix->m11) + (value->y * matrix->m21) + (value->z * matrix->m31),
|
||||
(value->x * matrix->m12) + (value->y * matrix->m22) + (value->z * matrix->m32),
|
||||
(value->x * matrix->m13) + (value->y * matrix->m23) + (value->z * matrix->m33));
|
||||
}
|
88
Classes/Retronator/Xni/Framework/Vector4Struct.h
Normal file
88
Classes/Retronator/Xni/Framework/Vector4Struct.h
Normal file
@ -0,0 +1,88 @@
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float w;
|
||||
} Vector4Struct;
|
||||
|
||||
static inline Vector4Struct Vector4Make(float x, float y, float z, float w)
|
||||
{
|
||||
Vector4Struct vector;
|
||||
vector.x = x;
|
||||
vector.y = y;
|
||||
vector.z = z;
|
||||
vector.w = w;
|
||||
return vector;
|
||||
}
|
||||
|
||||
static inline void Vector4Set(Vector4Struct *vector, float x, float y, float z, float w)
|
||||
{
|
||||
vector->x = x;
|
||||
vector->y = y;
|
||||
vector->z = z;
|
||||
vector->w = w;
|
||||
}
|
||||
|
||||
|
||||
static inline float Vector4LengthSquared(Vector4Struct *value) {
|
||||
return value->x * value->x + value->y * value->y + value->z * value->z + value->w * value->w;
|
||||
}
|
||||
|
||||
static inline float Vector4Length(Vector4Struct *value) {
|
||||
return sqrtf(Vector4LengthSquared(value));
|
||||
}
|
||||
|
||||
static inline void Vector4Normalize(Vector4Struct *value) {
|
||||
float length = Vector4Length(value);
|
||||
if (length == 0) {
|
||||
return;
|
||||
}
|
||||
float scalar = 1.0f / length;
|
||||
value->x *= scalar;
|
||||
value->y *= scalar;
|
||||
value->z *= scalar;
|
||||
value->w *= scalar;
|
||||
}
|
||||
|
||||
static inline void Vector4Negate(Vector4Struct *value) {
|
||||
value->x = -value->x;
|
||||
value->y = -value->y;
|
||||
value->z = -value->z;
|
||||
value->w = -value->w;
|
||||
}
|
||||
|
||||
static inline void QuaternionInverse(Vector4Struct *value) {
|
||||
float m1 = 1.0F / ((value->x * value->x) + (value->y * value->y) + (value->z * value->z) + (value->w * value->w));
|
||||
Vector4Set(value, -value->x * m1, -value->y * m1, -value->z * m1, value->w * m1);
|
||||
}
|
||||
|
||||
static inline void Vector4Add(Vector4Struct *value1, Vector4Struct *value2, Vector4Struct *result) {
|
||||
Vector4Set(result, value1->x + value2->x, value1->y + value2->y, value1->z + value2->z, value1->w + value2->w);
|
||||
}
|
||||
|
||||
static inline void Vector4Subtract(Vector4Struct *value1, Vector4Struct *value2, Vector4Struct *result) {
|
||||
Vector4Set(result, value1->x - value2->x, value1->y - value2->y, value1->z - value2->z, value1->w - value2->w);
|
||||
}
|
||||
|
||||
static inline void Vector4Multiply(Vector4Struct *value1, float scaleFactor, Vector4Struct *result) {
|
||||
Vector4Set(result, value1->x * scaleFactor, value1->y * scaleFactor, value1->z * scaleFactor, value1->w * scaleFactor);
|
||||
}
|
||||
|
||||
static inline void QuaternionProduct(Vector4Struct *value1, Vector4Struct *value2, Vector4Struct *result) {
|
||||
float f12 = (value1->y * value2->z) - (value1->z * value2->y);
|
||||
float f11 = (value1->z * value2->x) - (value1->x * value2->z);
|
||||
float f10 = (value1->x * value2->y) - (value1->y * value2->x);
|
||||
float f9 = (value1->x * value2->x) + (value1->y * value2->y) + (value1->z * value2->z);
|
||||
result->x = (value1->x * value2->w) + (value2->x * value1->w) + f12;
|
||||
result->y = (value1->y * value2->w) + (value2->y * value1->w) + f11;
|
||||
result->z = (value1->z * value2->w) + (value2->z * value1->w) + f10;
|
||||
result->w = (value1->w * value2->w) - f9;
|
||||
}
|
||||
|
||||
static inline void Vector4Transform(Vector4Struct *value, MatrixStruct *matrix, Vector4Struct *result) {
|
||||
Vector4Set(result,
|
||||
(value->x * matrix->m11) + (value->y * matrix->m21) + (value->z * matrix->m31) + (value->w * matrix->m41),
|
||||
(value->x * matrix->m12) + (value->y * matrix->m22) + (value->z * matrix->m32) + (value->w * matrix->m42),
|
||||
(value->x * matrix->m13) + (value->y * matrix->m23) + (value->z * matrix->m33) + (value->w * matrix->m43),
|
||||
(value->x * matrix->m14) + (value->y * matrix->m24) + (value->z * matrix->m34) + (value->w * matrix->m44));
|
||||
}
|
@ -14,11 +14,29 @@
|
||||
B5080704122E4EE900C330E2 /* Texture2D.m in Sources */ = {isa = PBXBuildFile; fileRef = B5080702122E4EE900C330E2 /* Texture2D.m */; };
|
||||
B508070C122E4FBB00C330E2 /* GraphicsResource.h in Headers */ = {isa = PBXBuildFile; fileRef = B508070A122E4FBB00C330E2 /* GraphicsResource.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B508070D122E4FBB00C330E2 /* GraphicsResource.m in Sources */ = {isa = PBXBuildFile; fileRef = B508070B122E4FBB00C330E2 /* GraphicsResource.m */; };
|
||||
B59AD7F01236E07300F99511 /* ContentImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD7EE1236E07300F99511 /* ContentImporter.h */; };
|
||||
B59AD7F01236E07300F99511 /* ContentImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD7EE1236E07300F99511 /* ContentImporter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B59AD7F11236E07300F99511 /* ContentImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = B59AD7EF1236E07300F99511 /* ContentImporter.m */; };
|
||||
B5A1C82F12353F8700DB60CB /* Retronator.Xni.Framework.Content.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A1C82E12353F8700DB60CB /* Retronator.Xni.Framework.Content.h */; };
|
||||
B5A1C83112353F9B00DB60CB /* Retronator.Xni.Framework.Content.classes.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A1C83012353F9B00DB60CB /* Retronator.Xni.Framework.Content.classes.h */; };
|
||||
B5A1C83412353FBB00DB60CB /* ContentManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A1C83212353FBB00DB60CB /* ContentManager.h */; };
|
||||
B59AD80C1236E21900F99511 /* Retronator.Xni.Framework.Content.Pipeline.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD80B1236E21900F99511 /* Retronator.Xni.Framework.Content.Pipeline.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B59AD80E1236E22B00F99511 /* Retronator.Xni.Framework.Content.Pipeline.classes.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD80D1236E22B00F99511 /* Retronator.Xni.Framework.Content.Pipeline.classes.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B59AD8111236E25700F99511 /* TextureImporter.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD80F1236E25700F99511 /* TextureImporter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B59AD8121236E25700F99511 /* TextureImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = B59AD8101236E25700F99511 /* TextureImporter.m */; };
|
||||
B59AD81A1236E55E00F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.classes.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD8191236E55E00F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.classes.h */; };
|
||||
B59AD81C1236E56800F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD81B1236E56800F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.h */; };
|
||||
B59AD81F1236E59A00F99511 /* ContentItem.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD81D1236E59A00F99511 /* ContentItem.h */; };
|
||||
B59AD8201236E59A00F99511 /* ContentItem.m in Sources */ = {isa = PBXBuildFile; fileRef = B59AD81E1236E59A00F99511 /* ContentItem.m */; };
|
||||
B59AD8231236E76E00F99511 /* ContentIdentity.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD8211236E76E00F99511 /* ContentIdentity.h */; };
|
||||
B59AD8241236E76E00F99511 /* ContentIdentity.m in Sources */ = {isa = PBXBuildFile; fileRef = B59AD8221236E76E00F99511 /* ContentIdentity.m */; };
|
||||
B59AD8681236EC2300F99511 /* TextureContent.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD8661236EC2300F99511 /* TextureContent.h */; };
|
||||
B59AD8691236EC2300F99511 /* TextureContent.m in Sources */ = {isa = PBXBuildFile; fileRef = B59AD8671236EC2300F99511 /* TextureContent.m */; };
|
||||
B59AD86E1236ED3900F99511 /* BitmapContent.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD86C1236ED3900F99511 /* BitmapContent.h */; };
|
||||
B59AD86F1236ED3900F99511 /* BitmapContent.m in Sources */ = {isa = PBXBuildFile; fileRef = B59AD86D1236ED3900F99511 /* BitmapContent.m */; };
|
||||
B59AD8821236EFF200F99511 /* PixelBitmapContent.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD8801236EFF200F99511 /* PixelBitmapContent.h */; };
|
||||
B59AD8831236EFF200F99511 /* PixelBitmapContent.m in Sources */ = {isa = PBXBuildFile; fileRef = B59AD8811236EFF200F99511 /* PixelBitmapContent.m */; };
|
||||
B59AD8A01236F1FF00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.classes.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD89F1236F1FF00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.classes.h */; };
|
||||
B59AD8A21236F20B00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.h in Headers */ = {isa = PBXBuildFile; fileRef = B59AD8A11236F20B00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.h */; };
|
||||
B5A1C82F12353F8700DB60CB /* Retronator.Xni.Framework.Content.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A1C82E12353F8700DB60CB /* Retronator.Xni.Framework.Content.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B5A1C83112353F9B00DB60CB /* Retronator.Xni.Framework.Content.classes.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A1C83012353F9B00DB60CB /* Retronator.Xni.Framework.Content.classes.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B5A1C83412353FBB00DB60CB /* ContentManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B5A1C83212353FBB00DB60CB /* ContentManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B5A1C83512353FBB00DB60CB /* ContentManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B5A1C83312353FBB00DB60CB /* ContentManager.m */; };
|
||||
B5DDE7EB11FF04E3000DB38B /* Game.h in Headers */ = {isa = PBXBuildFile; fileRef = B5DDE7E911FF04E3000DB38B /* Game.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B5DDE7EC11FF04E3000DB38B /* Game.m in Sources */ = {isa = PBXBuildFile; fileRef = B5DDE7EA11FF04E3000DB38B /* Game.m */; };
|
||||
@ -73,6 +91,25 @@
|
||||
B5DE194E11F89C1F00BF3275 /* GameView.h in Headers */ = {isa = PBXBuildFile; fileRef = B5DE194C11F89C1F00BF3275 /* GameView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
B5DE194F11F89C1F00BF3275 /* GameView.m in Sources */ = {isa = PBXBuildFile; fileRef = B5DE194D11F89C1F00BF3275 /* GameView.m */; };
|
||||
B5F4E2A912095FAF00B2FC0F /* XNI_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = B5F4E2A812095FAF00B2FC0F /* XNI_Prefix.pch */; };
|
||||
B5F8536E1239206700E6FD71 /* PackedVectorStructs.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F8536D1239206700E6FD71 /* PackedVectorStructs.h */; };
|
||||
B5F85387123929F800E6FD71 /* VectorConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F85385123929F800E6FD71 /* VectorConverter.h */; };
|
||||
B5F85388123929F800E6FD71 /* VectorConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F85386123929F800E6FD71 /* VectorConverter.m */; };
|
||||
B5F8539D12392E2000E6FD71 /* Vector4.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F8539B12392E2000E6FD71 /* Vector4.h */; };
|
||||
B5F8539E12392E2000E6FD71 /* Vector4.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F8539C12392E2000E6FD71 /* Vector4.m */; };
|
||||
B5F853A012392E4500E6FD71 /* Vector4Struct.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F8539F12392E4500E6FD71 /* Vector4Struct.h */; };
|
||||
B5F853A4123931F100E6FD71 /* MatrixStruct.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F853A3123931F100E6FD71 /* MatrixStruct.h */; };
|
||||
B5F853A7123931F900E6FD71 /* Matrix.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F853A5123931F900E6FD71 /* Matrix.h */; };
|
||||
B5F853A8123931F900E6FD71 /* Matrix.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F853A6123931F900E6FD71 /* Matrix.m */; };
|
||||
B5F853B11239331C00E6FD71 /* Vector3.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F853AF1239331C00E6FD71 /* Vector3.h */; };
|
||||
B5F853B21239331C00E6FD71 /* Vector3.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F853B01239331C00E6FD71 /* Vector3.m */; };
|
||||
B5F853B51239334300E6FD71 /* Vector2.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F853B31239334300E6FD71 /* Vector2.h */; };
|
||||
B5F853B61239334300E6FD71 /* Vector2.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F853B41239334300E6FD71 /* Vector2.m */; };
|
||||
B5F853B81239335900E6FD71 /* Vector2Struct.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F853B71239335900E6FD71 /* Vector2Struct.h */; };
|
||||
B5F853BC1239336C00E6FD71 /* Vector3Struct.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F853BB1239336C00E6FD71 /* Vector3Struct.h */; };
|
||||
B5F853CD1239357400E6FD71 /* Quaternion.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F853CB1239357400E6FD71 /* Quaternion.h */; };
|
||||
B5F853CE1239357400E6FD71 /* Quaternion.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F853CC1239357400E6FD71 /* Quaternion.m */; };
|
||||
B5F8546D1239484700E6FD71 /* ColorPixelBitmapContent.h in Headers */ = {isa = PBXBuildFile; fileRef = B5F8546B1239484700E6FD71 /* ColorPixelBitmapContent.h */; };
|
||||
B5F8546E1239484700E6FD71 /* ColorPixelBitmapContent.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F8546C1239484700E6FD71 /* ColorPixelBitmapContent.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -85,6 +122,24 @@
|
||||
B508070B122E4FBB00C330E2 /* GraphicsResource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GraphicsResource.m; sourceTree = "<group>"; };
|
||||
B59AD7EE1236E07300F99511 /* ContentImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentImporter.h; sourceTree = "<group>"; };
|
||||
B59AD7EF1236E07300F99511 /* ContentImporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentImporter.m; sourceTree = "<group>"; };
|
||||
B59AD80B1236E21900F99511 /* Retronator.Xni.Framework.Content.Pipeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retronator.Xni.Framework.Content.Pipeline.h; sourceTree = "<group>"; };
|
||||
B59AD80D1236E22B00F99511 /* Retronator.Xni.Framework.Content.Pipeline.classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retronator.Xni.Framework.Content.Pipeline.classes.h; sourceTree = "<group>"; };
|
||||
B59AD80F1236E25700F99511 /* TextureImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureImporter.h; sourceTree = "<group>"; };
|
||||
B59AD8101236E25700F99511 /* TextureImporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextureImporter.m; sourceTree = "<group>"; };
|
||||
B59AD8191236E55E00F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retronator.Xni.Framework.Content.Pipeline.Graphics.classes.h; sourceTree = "<group>"; };
|
||||
B59AD81B1236E56800F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retronator.Xni.Framework.Content.Pipeline.Graphics.h; sourceTree = "<group>"; };
|
||||
B59AD81D1236E59A00F99511 /* ContentItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentItem.h; sourceTree = "<group>"; };
|
||||
B59AD81E1236E59A00F99511 /* ContentItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentItem.m; sourceTree = "<group>"; };
|
||||
B59AD8211236E76E00F99511 /* ContentIdentity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentIdentity.h; sourceTree = "<group>"; };
|
||||
B59AD8221236E76E00F99511 /* ContentIdentity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentIdentity.m; sourceTree = "<group>"; };
|
||||
B59AD8661236EC2300F99511 /* TextureContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureContent.h; sourceTree = "<group>"; };
|
||||
B59AD8671236EC2300F99511 /* TextureContent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextureContent.m; sourceTree = "<group>"; };
|
||||
B59AD86C1236ED3900F99511 /* BitmapContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitmapContent.h; sourceTree = "<group>"; };
|
||||
B59AD86D1236ED3900F99511 /* BitmapContent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BitmapContent.m; sourceTree = "<group>"; };
|
||||
B59AD8801236EFF200F99511 /* PixelBitmapContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PixelBitmapContent.h; sourceTree = "<group>"; };
|
||||
B59AD8811236EFF200F99511 /* PixelBitmapContent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PixelBitmapContent.m; sourceTree = "<group>"; };
|
||||
B59AD89F1236F1FF00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retronator.Xni.Framework.Graphics.PackedVector.classes.h; sourceTree = "<group>"; };
|
||||
B59AD8A11236F20B00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retronator.Xni.Framework.Graphics.PackedVector.h; sourceTree = "<group>"; };
|
||||
B5A1C82E12353F8700DB60CB /* Retronator.Xni.Framework.Content.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retronator.Xni.Framework.Content.h; sourceTree = "<group>"; };
|
||||
B5A1C83012353F9B00DB60CB /* Retronator.Xni.Framework.Content.classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Retronator.Xni.Framework.Content.classes.h; sourceTree = "<group>"; };
|
||||
B5A1C83212353FBB00DB60CB /* ContentManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentManager.h; sourceTree = "<group>"; };
|
||||
@ -142,6 +197,25 @@
|
||||
B5DE194C11F89C1F00BF3275 /* GameView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameView.h; sourceTree = "<group>"; };
|
||||
B5DE194D11F89C1F00BF3275 /* GameView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameView.m; sourceTree = "<group>"; };
|
||||
B5F4E2A812095FAF00B2FC0F /* XNI_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XNI_Prefix.pch; sourceTree = "<group>"; };
|
||||
B5F8536D1239206700E6FD71 /* PackedVectorStructs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PackedVectorStructs.h; sourceTree = "<group>"; };
|
||||
B5F85385123929F800E6FD71 /* VectorConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VectorConverter.h; sourceTree = "<group>"; };
|
||||
B5F85386123929F800E6FD71 /* VectorConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VectorConverter.m; sourceTree = "<group>"; };
|
||||
B5F8539B12392E2000E6FD71 /* Vector4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vector4.h; path = Graphics/Vector4.h; sourceTree = "<group>"; };
|
||||
B5F8539C12392E2000E6FD71 /* Vector4.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Vector4.m; path = Graphics/Vector4.m; sourceTree = "<group>"; };
|
||||
B5F8539F12392E4500E6FD71 /* Vector4Struct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector4Struct.h; sourceTree = "<group>"; };
|
||||
B5F853A3123931F100E6FD71 /* MatrixStruct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MatrixStruct.h; sourceTree = "<group>"; };
|
||||
B5F853A5123931F900E6FD71 /* Matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Matrix.h; sourceTree = "<group>"; };
|
||||
B5F853A6123931F900E6FD71 /* Matrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Matrix.m; sourceTree = "<group>"; };
|
||||
B5F853AF1239331C00E6FD71 /* Vector3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector3.h; sourceTree = "<group>"; };
|
||||
B5F853B01239331C00E6FD71 /* Vector3.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Vector3.m; sourceTree = "<group>"; };
|
||||
B5F853B31239334300E6FD71 /* Vector2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector2.h; sourceTree = "<group>"; };
|
||||
B5F853B41239334300E6FD71 /* Vector2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Vector2.m; sourceTree = "<group>"; };
|
||||
B5F853B71239335900E6FD71 /* Vector2Struct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector2Struct.h; sourceTree = "<group>"; };
|
||||
B5F853BB1239336C00E6FD71 /* Vector3Struct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector3Struct.h; sourceTree = "<group>"; };
|
||||
B5F853CB1239357400E6FD71 /* Quaternion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Quaternion.h; sourceTree = "<group>"; };
|
||||
B5F853CC1239357400E6FD71 /* Quaternion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Quaternion.m; sourceTree = "<group>"; };
|
||||
B5F8546B1239484700E6FD71 /* ColorPixelBitmapContent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorPixelBitmapContent.h; sourceTree = "<group>"; };
|
||||
B5F8546C1239484700E6FD71 /* ColorPixelBitmapContent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorPixelBitmapContent.m; sourceTree = "<group>"; };
|
||||
D2AAC07E0554694100DB518D /* libXNI.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libXNI.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@ -204,12 +278,50 @@
|
||||
B59AD7E81236E02500F99511 /* Pipeline */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B59AD8181236E53600F99511 /* Graphics */,
|
||||
B59AD80D1236E22B00F99511 /* Retronator.Xni.Framework.Content.Pipeline.classes.h */,
|
||||
B59AD80B1236E21900F99511 /* Retronator.Xni.Framework.Content.Pipeline.h */,
|
||||
B59AD7EE1236E07300F99511 /* ContentImporter.h */,
|
||||
B59AD7EF1236E07300F99511 /* ContentImporter.m */,
|
||||
B59AD80F1236E25700F99511 /* TextureImporter.h */,
|
||||
B59AD8101236E25700F99511 /* TextureImporter.m */,
|
||||
B59AD81D1236E59A00F99511 /* ContentItem.h */,
|
||||
B59AD81E1236E59A00F99511 /* ContentItem.m */,
|
||||
B59AD8211236E76E00F99511 /* ContentIdentity.h */,
|
||||
B59AD8221236E76E00F99511 /* ContentIdentity.m */,
|
||||
);
|
||||
path = Pipeline;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B59AD8181236E53600F99511 /* Graphics */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B59AD8191236E55E00F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.classes.h */,
|
||||
B59AD81B1236E56800F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.h */,
|
||||
B59AD86C1236ED3900F99511 /* BitmapContent.h */,
|
||||
B59AD86D1236ED3900F99511 /* BitmapContent.m */,
|
||||
B59AD8801236EFF200F99511 /* PixelBitmapContent.h */,
|
||||
B59AD8811236EFF200F99511 /* PixelBitmapContent.m */,
|
||||
B5F8546B1239484700E6FD71 /* ColorPixelBitmapContent.h */,
|
||||
B5F8546C1239484700E6FD71 /* ColorPixelBitmapContent.m */,
|
||||
B59AD8661236EC2300F99511 /* TextureContent.h */,
|
||||
B59AD8671236EC2300F99511 /* TextureContent.m */,
|
||||
B5F85385123929F800E6FD71 /* VectorConverter.h */,
|
||||
B5F85386123929F800E6FD71 /* VectorConverter.m */,
|
||||
);
|
||||
path = Graphics;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B59AD8951236F1A800F99511 /* PackedVector */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B59AD89F1236F1FF00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.classes.h */,
|
||||
B59AD8A11236F20B00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.h */,
|
||||
B5F8536D1239206700E6FD71 /* PackedVectorStructs.h */,
|
||||
);
|
||||
path = PackedVector;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B5A1C82B12353EFB00DB60CB /* Content */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -225,6 +337,7 @@
|
||||
B5DDE82911FF10D0000DB38B /* Graphics */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B59AD8951236F1A800F99511 /* PackedVector */,
|
||||
B5DDE82E11FF1213000DB38B /* Retronator.Xni.Framework.Graphics.classes.h */,
|
||||
B5DDE83011FF1222000DB38B /* Retronator.Xni.Framework.Graphics.h */,
|
||||
B5DDE8C911FF2AD6000DB38B /* Enums.h */,
|
||||
@ -300,6 +413,20 @@
|
||||
B5DDE80911FF0C24000DB38B /* GameComponentCollectionEventArgs.m */,
|
||||
B5DDE82011FF0D4F000DB38B /* GameTime.h */,
|
||||
B5DDE82111FF0D4F000DB38B /* GameTime.m */,
|
||||
B5F853B71239335900E6FD71 /* Vector2Struct.h */,
|
||||
B5F853B31239334300E6FD71 /* Vector2.h */,
|
||||
B5F853B41239334300E6FD71 /* Vector2.m */,
|
||||
B5F853BB1239336C00E6FD71 /* Vector3Struct.h */,
|
||||
B5F853AF1239331C00E6FD71 /* Vector3.h */,
|
||||
B5F853B01239331C00E6FD71 /* Vector3.m */,
|
||||
B5F8539F12392E4500E6FD71 /* Vector4Struct.h */,
|
||||
B5F8539B12392E2000E6FD71 /* Vector4.h */,
|
||||
B5F8539C12392E2000E6FD71 /* Vector4.m */,
|
||||
B5F853CB1239357400E6FD71 /* Quaternion.h */,
|
||||
B5F853CC1239357400E6FD71 /* Quaternion.m */,
|
||||
B5F853A3123931F100E6FD71 /* MatrixStruct.h */,
|
||||
B5F853A5123931F900E6FD71 /* Matrix.h */,
|
||||
B5F853A6123931F900E6FD71 /* Matrix.m */,
|
||||
);
|
||||
path = Framework;
|
||||
sourceTree = "<group>";
|
||||
@ -367,6 +494,30 @@
|
||||
B5A1C83112353F9B00DB60CB /* Retronator.Xni.Framework.Content.classes.h in Headers */,
|
||||
B5A1C83412353FBB00DB60CB /* ContentManager.h in Headers */,
|
||||
B59AD7F01236E07300F99511 /* ContentImporter.h in Headers */,
|
||||
B59AD80C1236E21900F99511 /* Retronator.Xni.Framework.Content.Pipeline.h in Headers */,
|
||||
B59AD80E1236E22B00F99511 /* Retronator.Xni.Framework.Content.Pipeline.classes.h in Headers */,
|
||||
B59AD8111236E25700F99511 /* TextureImporter.h in Headers */,
|
||||
B59AD81A1236E55E00F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.classes.h in Headers */,
|
||||
B59AD81C1236E56800F99511 /* Retronator.Xni.Framework.Content.Pipeline.Graphics.h in Headers */,
|
||||
B59AD81F1236E59A00F99511 /* ContentItem.h in Headers */,
|
||||
B59AD8231236E76E00F99511 /* ContentIdentity.h in Headers */,
|
||||
B59AD8681236EC2300F99511 /* TextureContent.h in Headers */,
|
||||
B59AD86E1236ED3900F99511 /* BitmapContent.h in Headers */,
|
||||
B59AD8821236EFF200F99511 /* PixelBitmapContent.h in Headers */,
|
||||
B59AD8A01236F1FF00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.classes.h in Headers */,
|
||||
B59AD8A21236F20B00F99511 /* Retronator.Xni.Framework.Graphics.PackedVector.h in Headers */,
|
||||
B5F8536E1239206700E6FD71 /* PackedVectorStructs.h in Headers */,
|
||||
B5F85387123929F800E6FD71 /* VectorConverter.h in Headers */,
|
||||
B5F8539D12392E2000E6FD71 /* Vector4.h in Headers */,
|
||||
B5F853A012392E4500E6FD71 /* Vector4Struct.h in Headers */,
|
||||
B5F853A4123931F100E6FD71 /* MatrixStruct.h in Headers */,
|
||||
B5F853A7123931F900E6FD71 /* Matrix.h in Headers */,
|
||||
B5F853B11239331C00E6FD71 /* Vector3.h in Headers */,
|
||||
B5F853B51239334300E6FD71 /* Vector2.h in Headers */,
|
||||
B5F853B81239335900E6FD71 /* Vector2Struct.h in Headers */,
|
||||
B5F853BC1239336C00E6FD71 /* Vector3Struct.h in Headers */,
|
||||
B5F853CD1239357400E6FD71 /* Quaternion.h in Headers */,
|
||||
B5F8546D1239484700E6FD71 /* ColorPixelBitmapContent.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -440,6 +591,19 @@
|
||||
B508070D122E4FBB00C330E2 /* GraphicsResource.m in Sources */,
|
||||
B5A1C83512353FBB00DB60CB /* ContentManager.m in Sources */,
|
||||
B59AD7F11236E07300F99511 /* ContentImporter.m in Sources */,
|
||||
B59AD8121236E25700F99511 /* TextureImporter.m in Sources */,
|
||||
B59AD8201236E59A00F99511 /* ContentItem.m in Sources */,
|
||||
B59AD8241236E76E00F99511 /* ContentIdentity.m in Sources */,
|
||||
B59AD8691236EC2300F99511 /* TextureContent.m in Sources */,
|
||||
B59AD86F1236ED3900F99511 /* BitmapContent.m in Sources */,
|
||||
B59AD8831236EFF200F99511 /* PixelBitmapContent.m in Sources */,
|
||||
B5F85388123929F800E6FD71 /* VectorConverter.m in Sources */,
|
||||
B5F8539E12392E2000E6FD71 /* Vector4.m in Sources */,
|
||||
B5F853A8123931F900E6FD71 /* Matrix.m in Sources */,
|
||||
B5F853B21239331C00E6FD71 /* Vector3.m in Sources */,
|
||||
B5F853B61239334300E6FD71 /* Vector2.m in Sources */,
|
||||
B5F853CE1239357400E6FD71 /* Quaternion.m in Sources */,
|
||||
B5F8546E1239484700E6FD71 /* ColorPixelBitmapContent.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user