Still need to make sure it compiles and whatnot on OSX, and also add the proper proprocessor defines.
--- /dev/null
+# ignore built files
+build/*
--- /dev/null
+//
+// EAGLView.h
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <OpenGLES/ES1/gl.h>
+#import <OpenGLES/ES1/glext.h>
+#import <OpenGLES/ES2/gl.h>
+#import <OpenGLES/ES2/glext.h>
+
+// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
+// The view content is basically an EAGL surface you render your OpenGL scene into.
+// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
+@interface EAGLView : UIView
+{
+@private
+ EAGLContext *context;
+
+ // The pixel dimensions of the CAEAGLLayer.
+ GLint framebufferWidth;
+ GLint framebufferHeight;
+
+ // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view.
+ GLuint defaultFramebuffer, colorRenderbuffer;
+}
+
+@property (nonatomic, retain) EAGLContext *context;
+
+- (void)setFramebuffer;
+- (BOOL)presentFramebuffer;
+
+@end
--- /dev/null
+//
+// EAGLView.m
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <QuartzCore/QuartzCore.h>
+
+#import "EAGLView.h"
+
+//-----------------------------------------------------------------------------------------------------------
+@interface EAGLView (PrivateMethods)
+- (void)createFrameBuffer;
+- (void)deleteFramebuffer;
+@end
+
+//-----------------------------------------------------------------------------------------------------------
+@implementation EAGLView
+
+@dynamic context;
+
+//-----------------------------------------------------------------------------------------------------------
+// You must implement this method
++ (Class)layerClass
+{
+ return [CAEAGLLayer class];
+}
+
+//-----------------------------------------------------------------------------------------------------------
+//The EAGL view is stored in the nib file. When it's unarchived it's sent -initWithCoder:.
+- (id)initWithCoder:(NSCoder*)coder
+{
+ self = [super initWithCoder:coder];
+ if (self)
+ {
+ CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
+
+ eaglLayer.opaque = TRUE;
+ eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
+ [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking,
+ kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,
+ nil];
+ }
+
+ return self;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)dealloc
+{
+ [self deleteFramebuffer];
+ [context release];
+
+ [super dealloc];
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (EAGLContext *)context
+{
+ return context;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)setContext:(EAGLContext *)newContext
+{
+ if (context != newContext)
+ {
+ [self deleteFramebuffer];
+ [context release];
+
+ context = [newContext retain];
+ }
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)createFrameBuffer
+{
+ if (context && !defaultFramebuffer)
+ {
+ [EAGLContext setCurrentContext:context];
+
+ // Create default framebuffer object.
+ glGenFramebuffers(1, &defaultFramebuffer);
+ glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
+
+ // Create color render buffer and allocate backing store.
+ glGenRenderbuffers(1, &colorRenderbuffer);
+ glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
+ [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer];
+ glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferWidth);
+ glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &framebufferHeight);
+
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer);
+
+ if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
+ NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
+ }
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)deleteFramebuffer
+{
+ if (context)
+ {
+ [EAGLContext setCurrentContext:context];
+
+ if (defaultFramebuffer)
+ {
+ glDeleteFramebuffers(1, &defaultFramebuffer);
+ defaultFramebuffer = 0;
+ }
+
+ if (colorRenderbuffer)
+ {
+ glDeleteRenderbuffers(1, &colorRenderbuffer);
+ colorRenderbuffer = 0;
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)setFramebuffer
+{
+ if (context)
+ {
+ [EAGLContext setCurrentContext:context];
+
+ if (!defaultFramebuffer)
+ [self createFrameBuffer];
+
+ glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
+
+ glViewport(0, 0, framebufferWidth, framebufferHeight);
+ }
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (BOOL)presentFramebuffer
+{
+ BOOL success = FALSE;
+
+ if (context)
+ {
+ [EAGLContext setCurrentContext:context];
+
+ glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
+
+ success = [context presentRenderbuffer:GL_RENDERBUFFER];
+ }
+
+ return success;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)layoutSubviews
+{
+ // The framebuffer will be re-created at the beginning of the next setFramebuffer method call.
+ [self deleteFramebuffer];
+}
+
+@end
--- /dev/null
+#pragma once\r
+\r
+#ifdef DEBUG\r
+\r
+#include <assert.h>\r
+\r
+#define Assert(expression) if (!(expression)) __debugbreak();\r
+\r
+#define AssertMessage(expression, message, ...) \\r
+ if (!(expression)) Printf(message, ##__VA_ARGS__)\r
+\r
+#else\r
+\r
+slInline void Assert(bool expression) {}\r
+slInline void AssertMsg(bool expression, char* msg, ...) {}\r
+\r
+#endif
\ No newline at end of file
--- /dev/null
+#pragma once\r
+\r
+namespace Foundation\r
+{\r
+ class CBase\r
+ {\r
+ public:\r
+ CBase() {}\r
+ ~CBase() {}\r
+ };\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalTypes.h"\r
+\r
+#ifdef _WINDOWS\r
+#define __WINDOWS__\r
+#endif\r
+\r
+#ifdef _DEBUG\r
+#define DEBUG\r
+#endif\r
+\r
+#ifdef _NDEBUG\r
+#define RELEASE\r
+#endif\r
+\r
+#ifndef NULL\r
+#define NULL 0\r
+#endif\r
+\r
+#ifndef FALSE\r
+#define FALSE 0\r
+#endif\r
+\r
+#ifndef TRUE\r
+#define TRUE 1\r
+#endif\r
+\r
+//----------------------------------------------------------------------------------------\r
+// cache information\r
+#ifndef CACHE_LINE_SIZE\r
+#define CACHE_LINE_SIZE 128 //equal to 2 line for intel normally\r
+#endif\r
+\r
+//----------------------------------------------------------------------------------------\r
+//force inline on non-debug, might make code explode\r
+#ifdef _DEBUG\r
+ #define slInline inline\r
+#else\r
+ #define slInline __forceinline\r
+#endif\r
+\r
+//compiler determined inline\r
+#define clInline inline\r
+\r
+#define slRestrict __restrict\r
+\r
+//----------------------------------------------------------------------------------------\r
+// alignment macros\r
+#if defined(__WINDOWS__)\r
+#define ALIGN(N) __declspec(align(N))\r
+#endif\r
+\r
+#define IS_POWER_OF_TWO(x) ( ((x) & -(x)) == (x) )\r
+\r
+#pragma warning(disable:4146) // =(\r
+#define ALIGN_UP(x, ALIGNMENT) ( ((x) + (ALIGNMENT) - 1) & -(ALIGNMENT) )\r
+#define ALIGN_DOWN(x, ALIGNMENT) ( (x) & -(ALIGNMENT) )\r
+\r
+#define POWER_OF_TWO_MOD(x, N) ( (x) & ((N) - 1) )\r
+\r
+#define ALIGN_CACHE ( ALIGN( CACHE_LINE_SIZE ) )\r
+\r
+//----------------------------------------------------------------------------------------\r
+// cache macros\r
+#if defined(__WINDOWS__)\r
+// uhh, nothing?\r
+#elif defined(__ARM__)\r
+#define DCBT(x) __asm__("pld" #(x))\r
+#else\r
+#error Not implemented yet!\r
+#endif\r
+\r
+//----------------------------------------------------------------------------------------\r
+// string and memory functions\r
+#if defined(__WINDOWS__)\r
+ #include <string.h>\r
+\r
+ #pragma intrinsic(memcpy)\r
+ #pragma intrinsic(memset)\r
+ #pragma intrinsic(strcmp)\r
+ #pragma intrinsic(strcpy)\r
+ #pragma intrinsic(strlen)\r
+ #pragma intrinsic(strcat)\r
+#endif\r
+\r
+//----------------------------------------------------------------------------------------\r
+// color constants\r
+#define NULL_COLOR 0x00000000\r
+#define BLACK_COLOR 0x000000ff\r
+#define RED_COLOR 0xff0000ff\r
+#define GREEN_COLOR 0x00ff00ff\r
+#define BLUE_COLOR 0x0000ffff\r
+#define WHITE_COLOR 0xffffffff\r
+\r
+//----------------------------------------------------------------------------------------\r
+#if defined(__WINDOWS__)\r
+slInline uint8_t LZCount(uint64_t x)\r
+{\r
+ uint8_t leading_zero_count = 0;\r
+ uint8_t next_shift = 32;\r
+ uint64_t copy = x;\r
+ while (next_shift != 0)\r
+ {\r
+ bool non_zero = copy >= (0x1ULL << next_shift);\r
+ uint8_t actual_shift = (uint8_t)non_zero * next_shift;\r
+ leading_zero_count += actual_shift;\r
+ copy >>= actual_shift;\r
+ next_shift >>= 1;\r
+ }\r
+ leading_zero_count += (copy == 0x1ULL);\r
+\r
+ return leading_zero_count;\r
+}\r
+#else\r
+#error // use lzcnt!\r
+#endif\r
+\r
+//----------------------------------------------------------------------------------------\r
+#define RightMostEnabledBit(x) ((x) & -(x))
\ No newline at end of file
--- /dev/null
+#pragma once\r
+\r
+#include "GlobalDefines.h"\r
+#include "GlobalTypes.h"\r
+#include "Assert.h"\r
--- /dev/null
+#pragma once\r
+\r
+#ifdef uint32_t\r
+#undef uint32_t\r
+#endif\r
+\r
+typedef signed char int8_t;\r
+typedef unsigned char uint8_t;\r
+typedef short int16_t;\r
+typedef unsigned short uint16_t;\r
+typedef int int32_t;\r
+typedef unsigned int uint32_t;\r
+typedef long long int64_t;\r
+typedef unsigned long long uint64_t;\r
+typedef uint32_t color32_t;\r
+\r
+union IntFloat\r
+{\r
+ int8_t m_Int8[4];\r
+ uint8_t m_UInt8[4];\r
+ int16_t m_Int16[2];\r
+ uint16_t m_UInt16[2];\r
+ int32_t m_Int32;\r
+ uint32_t m_UInt32;\r
+ float m_Float;\r
+};\r
+\r
+union LongDouble\r
+{\r
+ int8_t m_Int8[8];\r
+ uint8_t m_UInt8[8];\r
+ int16_t m_Int16[4];\r
+ uint16_t m_UInt16[4];\r
+ int32_t m_Int32[2];\r
+ uint32_t m_UInt32[2];\r
+ int64_t m_Int64;\r
+ uint64_t m_UInt64;\r
+ float m_Float[2];\r
+ double m_Double;\r
+};\r
--- /dev/null
+#pragma once\r
+\r
+#include <stdio.h>\r
+\r
+#define Printf(message, ...) printf(message, ##__VA_ARGS__)\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+\r
+/*\r
+Statically allocates for faster access\r
+*/\r
+\r
+namespace Foundation\r
+{\r
+\r
+template <typename T> \r
+class Singleton\r
+{\r
+private:\r
+ static T* m_Instance; \r
+\r
+protected:\r
+ Singleton(){m_Instance = 0;}\r
+\r
+public:\r
+ static T* Create()\r
+ {\r
+ Assert( m_Instance == 0);\r
+ if(m_Instance)\r
+ {\r
+ return m_Instance;\r
+ }\r
+ m_Instance = new(16) T();\r
+ return m_Instance;\r
+ }\r
+\r
+ slInline static T* GetInstance()\r
+ {\r
+ //Assert( m_Instance == 0);\r
+ return m_Instance;\r
+ }\r
+\r
+ static void DestroyInstance()\r
+ {\r
+ if(m_Instance)\r
+ {\r
+ delete m_Instance;\r
+ }\r
+ }\r
+};\r
+\r
+template<typename T> T* Singleton<T>::m_Instance = 0;\r
+\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+\r
+#define SET_BITS(x, new_val, shift, mask) ((x) = (((x) & ~(mask)) | (((new_val) << (shift)) & (mask))))\r
+#define ZERO_BITS(x, mask) ((x) &= ~(mask))\r
+#define OR_BITS (x, new_val, shift, mask) ((x) |= (((new_val) << (shift)) & (mask)))\r
+#define AND_BITS(x, new_val, shift, mask) ((x) &= (((new_val) << (shift)) & (mask)))\r
+#define GET_BITS(x, mask) ((x) & (mask))\r
+#define GET_BITS_RIGHT(x, shift, mask) (((x) & (mask)) >> (shift))\r
--- /dev/null
+#pragma once\r
+\r
+#include "LocklessRingBuffer.h"\r
+#include "Foundation/Synchronization/MemorySync.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+void LocklessRingBuffer::Init(void* buffer, uint32_t buffer_size)\r
+{\r
+ m_Base = (uint8_t*)buffer;\r
+ m_BufferSize = buffer_size;\r
+ m_WriteOffset = 0;\r
+ m_ReadOffset = 0;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void LocklessRingBuffer::Destroy()\r
+{\r
+ m_Base = NULL;\r
+ m_BufferSize = 0;\r
+ m_WriteOffset = 0;\r
+ m_ReadOffset = 0;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+bool LocklessRingBuffer::Write(void* entry, uint32_t entry_size)\r
+{\r
+ Assert(entry_size < m_BufferSize);\r
+\r
+ uint32_t new_write_offset = m_WriteOffset;\r
+ uint32_t remaining_space = m_WriteOffset < m_ReadOffset ? m_ReadOffset - m_WriteOffset - 1 : m_ReadOffset + m_BufferSize - m_WriteOffset;\r
+ if (remaining_space < entry_size)\r
+ {\r
+ return false;\r
+ }\r
+\r
+ bool write_will_end_lower = new_write_offset + entry_size >= m_BufferSize;\r
+\r
+ uint32_t distance_to_top = (entry_size > m_BufferSize - new_write_offset) ? (m_BufferSize - new_write_offset) : entry_size;\r
+ memcpy(m_Base + new_write_offset, entry, distance_to_top);\r
+ new_write_offset += distance_to_top;\r
+\r
+ if (write_will_end_lower)\r
+ {\r
+ uint32_t remainder = entry_size - distance_to_top;\r
+ memcpy(m_Base, (uint8_t*)entry + distance_to_top, remainder);\r
+ new_write_offset = remainder;\r
+ }\r
+\r
+ ReadWriteSync();\r
+\r
+ m_WriteOffset = new_write_offset;\r
+ return true;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+bool LocklessRingBuffer::Write(void* entries[], uint32_t entry_sizes[], uint32_t entry_count)\r
+{\r
+ uint32_t total_size = 0;\r
+ for (uint32_t i = 0; i < entry_count; i++)\r
+ {\r
+ total_size += entry_sizes[i];\r
+ }\r
+\r
+ Assert(total_size < m_BufferSize);\r
+\r
+ uint32_t new_write_offset = m_WriteOffset;\r
+ uint32_t remaining_space = m_WriteOffset < m_ReadOffset ? m_ReadOffset - m_WriteOffset - 1 : m_ReadOffset + m_BufferSize - m_WriteOffset;\r
+ if (remaining_space < total_size)\r
+ {\r
+ return false;\r
+ }\r
+\r
+ for (uint32_t i = 0; i < entry_count; i++)\r
+ {\r
+ bool write_will_end_lower = new_write_offset + entry_sizes[i] >= m_BufferSize;\r
+ uint32_t distance_to_top = (entry_sizes[i] > m_BufferSize - new_write_offset) ? (m_BufferSize - new_write_offset) : entry_sizes[i];\r
+ memcpy(m_Base + new_write_offset, entries[i], distance_to_top);\r
+ new_write_offset += distance_to_top;\r
+\r
+ if (write_will_end_lower)\r
+ {\r
+ uint32_t remainder = entry_sizes[i] - distance_to_top;\r
+ memcpy(m_Base, (uint8_t*)entries[i] + distance_to_top, remainder);\r
+ new_write_offset = remainder;\r
+ }\r
+ }\r
+\r
+ ReadWriteSync();\r
+\r
+ m_WriteOffset = new_write_offset;\r
+ return true;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+bool LocklessRingBuffer::Peek(void* read_buffer, uint32_t read_size)\r
+{\r
+ uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset;\r
+ if (read_remaining < read_size)\r
+ {\r
+ return false;\r
+ }\r
+\r
+ uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size;\r
+ memcpy(read_buffer, m_Base + m_ReadOffset, read_to_top);\r
+ if (m_BufferSize - m_ReadOffset <= read_size)\r
+ {\r
+ memcpy((uint8_t*)read_buffer + read_to_top, m_Base, read_remaining - read_to_top);\r
+ }\r
+\r
+ return true;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+bool LocklessRingBuffer::Read(void* read_buffer, uint32_t read_size)\r
+{\r
+ uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset;\r
+ if (read_remaining < read_size)\r
+ {\r
+ return false;\r
+ }\r
+\r
+ uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size;\r
+ memcpy(read_buffer, m_Base + m_ReadOffset, read_to_top);\r
+ uint32_t new_read_offset = m_ReadOffset + read_to_top;\r
+\r
+ if (m_BufferSize - m_ReadOffset <= read_size)\r
+ {\r
+ memcpy((uint8_t*)read_buffer + read_to_top, m_Base, read_remaining - read_to_top);\r
+ new_read_offset = read_remaining - read_to_top;\r
+ }\r
+\r
+ ReadWriteSync();\r
+\r
+ m_ReadOffset = new_read_offset;\r
+\r
+ return true;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+bool LocklessRingBuffer::ReadDiscard(uint32_t read_size)\r
+{\r
+ uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset;\r
+ if (read_remaining < read_size)\r
+ {\r
+ return false;\r
+ }\r
+\r
+ uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size;\r
+ uint32_t new_read_offset = m_ReadOffset + read_to_top;\r
+\r
+ if (m_BufferSize - m_ReadOffset <= read_size)\r
+ {\r
+ new_read_offset = read_remaining - read_to_top;\r
+ }\r
+\r
+ ReadWriteSync();\r
+\r
+ m_ReadOffset = new_read_offset;\r
+\r
+ return true;\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+\r
+class LocklessRingBuffer\r
+{\r
+private:\r
+ uint8_t* m_Base;\r
+ uint32_t m_BufferSize;\r
+ uint32_t m_WriteOffset;\r
+ uint32_t m_ReadOffset;\r
+\r
+public:\r
+ void Init(void* buffer, uint32_t buffer_size);\r
+ void Destroy();\r
+\r
+ bool Write(void* entry, uint32_t entry_size);\r
+ bool Write(void* entries[], uint32_t entry_sizes[], uint32_t entry_count);\r
+\r
+ bool Peek(void* read_buffer, uint32_t read_size);\r
+ bool Read(void* read_buffer, uint32_t read_size);\r
+ bool ReadDiscard(uint32_t read_size);\r
+};\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+\r
+//==========================\r
+// djb2 string hash function\r
+//--------------------------\r
+static slInline uint32 StrHash(const char *str)\r
+{\r
+ uint32 hash = 5381;\r
+ int32 c = *str;\r
+\r
+ if(!str)\r
+ {\r
+ Assert(false);\r
+ return 0;\r
+ }\r
+\r
+ while ( (*str != 0) ){\r
+ hash = ((hash << 5) + hash) + c; /* hash * 33 + c */\r
+ c = (*str++);\r
+ }\r
+\r
+ return hash; \r
+}
\ No newline at end of file
--- /dev/null
+#pragma once\r
+\r
+#define kEpsilon 1e-6\r
+#define kSqrtEpsilon 1e-3\r
+\r
+#define kPi 3.1415926535897932384626433832795\r
+#define kPi_2 1.5707963267948966192313216916398\r
+#define kPi_3 1.0471975511965977461542144610932\r
+#define kPi_4 0.78539816339744830961566084581988\r
+#define k2Pi_3 2.0943951023931954923084289221863\r
+#define k3Pi_4 2.3561944901923449288469825374596\r
+#define k2Pi 6.283185307179586476925286766559\r
+\r
+#define kE 2.7182818284590452353602874713527
\ No newline at end of file
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Math/MathDefines.h"\r
+#include "Foundation/Math/MathOperations.h"\r
+#include "Foundation/Math/MathTypes.h"\r
+#include "Foundation/Math/Vector.h"\r
+#include "Foundation/Math/Quaternion.h"\r
+#include "Foundation/Math/Matrix.h"\r
--- /dev/null
+#pragma once\r
+\r
+#include <math.h>\r
+#include "Foundation/Common/GlobalInclude.h"\r
+\r
+#if defined(__WINDOWS__)\r
+\r
+#pragma intrinsic(sin)\r
+#pragma intrinsic(cos)\r
+#pragma intrinsic(tan)\r
+#pragma intrinsic(abs)\r
+#pragma intrinsic(fabs)\r
+#pragma intrinsic(asin)\r
+#pragma intrinsic(acos)\r
+#pragma intrinsic(atan)\r
+#pragma intrinsic(atan2)\r
+#pragma intrinsic(exp)\r
+#pragma intrinsic(sqrt)\r
+#pragma intrinsic(log)\r
+#pragma intrinsic(log10)\r
+\r
+#endif\r
+\r
+#define Sinf(x) sin(x)\r
+#define Cosf(x) cos(x)\r
+#define Tanf(x) tan(x)\r
+#define Sqrtf(x) sqrt(x)\r
+\r
+//----------------------------------------------------------------------------------------\r
+#define Min2(x, y) ( (x) <= (y) ? (x) : (y) )\r
+#define Max2(x, y) ( (x) >= (y) ? (x) : (y) )\r
+#define Min3(x, y, z) ( (x) <= (y) ? ((x) <= (z) ? (x) : (z)) : ((y) <= (z) ? (y) : (z)) )\r
+#define Max3(x, y, z) ( (x) >= (y) ? ((x) >= (z) ? (x) : (z)) : ((y) >= (z) ? (y) : (z)) )\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float Absf(const float& f)\r
+{\r
+ IntFloat int_float;\r
+ int_float.m_Float = f;\r
+ int_float.m_Int32 &= 0x7fffffff;\r
+ return int_float.m_Float;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline bool EpsilonEquals(const float& a, const float& b, const float& epsilon)\r
+{\r
+ return Absf(a - b) <= epsilon;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline uint16_t ConvertFloatToHalf( unsigned int f )\r
+{\r
+ unsigned int s = f & 0x80000000;\r
+ signed int e = ((f & 0x7f800000) >> 23) - (127 - 15);\r
+ if (e < 0) return 0;\r
+ else if (e > 31)\r
+ {\r
+ e = 31;\r
+ }\r
+ unsigned int fo = f & 0x7fffff;\r
+ return (uint16_t)((s >> 16) | ((e << 10) & 0x7c00) | (fo >> 13));\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float ConvertHalfToFloat( unsigned short h )\r
+{\r
+ unsigned int s = h & 0x8000;\r
+ unsigned int e = ((h & 0x7c00) >> 10) - 15 + 127;\r
+ unsigned int f = h & 0x3ff;\r
+\r
+ IntFloat int_float;\r
+ int_float.m_UInt32 = ((s << 16) | ((e << 23) & 0x7f800000) | (f << 13));\r
+\r
+ return int_float.m_Float;\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+#include "Foundation/Math/MathOperations.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+struct Vector2\r
+{\r
+ float x;\r
+ float y;\r
+\r
+ slInline explicit Vector2() {}\r
+ slInline explicit Vector2(const float xy) {x = xy; y = xy;}\r
+ slInline explicit Vector2(const float ix, const float iy) {x = ix; y = iy;}\r
+\r
+ slInline Vector2(const Vector2& v) {x = v.x; y = v.y;} // copy constructor\r
+\r
+ slInline float* AsFloatArray() {return &x;}\r
+ slInline const float* AsFloatArray() const {return &x;}\r
+\r
+ slInline float GetComponent(int index) const {return AsFloatArray()[index];}\r
+};\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+struct Vector3\r
+{\r
+ float x;\r
+ float y;\r
+ float z;\r
+\r
+ slInline explicit Vector3() {}\r
+ slInline explicit Vector3(const float xyz) {x = xyz; y = xyz; z = xyz;}\r
+ slInline explicit Vector3(const float ix, const float iy, const float iz) {x = ix; y = iy; z = iz;}\r
+\r
+ slInline explicit Vector3(const Vector2& v, const float iz) {x = v.x; y = v.y; z = iz;}\r
+\r
+ slInline Vector3(const Vector3& v) {x = v.x; y = v.y; z = v.z;} // copy constructor\r
+\r
+ slInline Vector2 AsVector2() const {return Vector2(x, y);}\r
+\r
+ slInline float* AsFloatArray() {return &x;}\r
+ slInline const float* AsFloatArray() const {return &x;}\r
+\r
+ slInline float GetComponent(int index) const {return AsFloatArray()[index];}\r
+};\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+struct Vector4\r
+{\r
+ float x;\r
+ float y;\r
+ float z;\r
+ float w;\r
+\r
+ slInline explicit Vector4() {}\r
+ slInline explicit Vector4(const float xyzw) {x = xyzw; y = xyzw; z = xyzw; w = xyzw;}\r
+ slInline explicit Vector4(const float xyz, const float iw) {x = xyz; y = xyz; z = xyz; w = iw;}\r
+ slInline explicit Vector4(const float ix, const float iy, const float iz, const float iw) {x = ix; y = iy; z = iz; w = iw;}\r
+\r
+ slInline explicit Vector4(const Vector2& u, const Vector2& v) {x = u.x; y = u.y; z = v.x; w = v.y;}\r
+ slInline explicit Vector4(const Vector2& v, const float iz, const float iw) {x = v.x; y = v.y; z = iz; w = iw;}\r
+\r
+ slInline explicit Vector4(const Vector3& v, const float iw) {x = v.x; y = v.y; z = v.z; w = iw;}\r
+\r
+ slInline Vector4(const Vector4& v) {x = v.x; y = v.y; z = v.z; w = v.w;} // copy constructor\r
+\r
+ slInline Vector2 AsVector2() const {return Vector2(x, y);}\r
+ slInline Vector3 AsVector3() const {return Vector3(x, y, z);}\r
+\r
+ slInline float* AsFloatArray() {return &x;}\r
+ slInline const float* AsFloatArray() const {return &x;}\r
+\r
+ slInline float GetComponent(int index) const {return AsFloatArray()[index];}\r
+};\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+struct Quaternion\r
+{\r
+ float i;\r
+ float j;\r
+ float k;\r
+ float s;\r
+\r
+ slInline explicit Quaternion() {}\r
+ explicit Quaternion(const float angle, const Vector3& normalized_axis);\r
+ explicit Quaternion(const float angle, const float x, const float y, const float z);\r
+\r
+ slInline Quaternion(const Quaternion& q) {i = q.i; j = q.j; k = q.k; s = q.s;}\r
+\r
+ Vector4 AsVector4();\r
+ slInline float* AsFloatArray() {return &i;}\r
+\r
+ Vector3 GetImaginary();\r
+ slInline float GetReal() {return s;}\r
+};\r
+\r
+slInline Quaternion::Quaternion(const float angle, const Vector3& normalized_axis)\r
+{\r
+ Assert( EpsilonEquals(LengthVector3(normalized_axis), 1.0f, kEpsilon) );\r
+ float half_angle = angle * 0.5f;\r
+ float sin_half_angle = Sinf(half_angle);\r
+ i = normalized_axis.x * sin_half_angle;\r
+ j = normalized_axis.y * sin_half_angle;\r
+ k = normalized_axis.z * sin_half_angle;\r
+ s = Cosf(half_angle);\r
+}\r
+\r
+slInline Quaternion::Quaternion(const float angle, const float x, const float y, const float z)\r
+{\r
+ Assert( EpsilonEquals(x * x + y * y + z * z, 1.0f, kSqrtEpsilon) );\r
+ float half_angle = angle * 0.5f;\r
+ float sin_half_angle = Sinf(half_angle);\r
+ i = x * sin_half_angle;\r
+ j = y * sin_half_angle;\r
+ k = z * sin_half_angle;\r
+ s = Cosf(half_angle);\r
+}\r
+\r
+Vector4 Quaternion::AsVector4()\r
+{\r
+ Vector4 r;\r
+ r.x = i;\r
+ r.y = j;\r
+ r.z = k;\r
+ r.w = s;\r
+ return r;\r
+}\r
+\r
+Vector3 Quaternion::GetImaginary()\r
+{\r
+ Vector3 r;\r
+ r.x = i;\r
+ r.y = j;\r
+ r.z = k;\r
+ return r;\r
+}\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+struct Matrix3\r
+{\r
+ Vector3 v[3];\r
+\r
+ slInline explicit Matrix3() {}\r
+ explicit Matrix3(const Vector3& v0, const Vector3& v1, const Vector3& v2);\r
+ explicit Matrix3(const float v00, const float v01, const float v02,\r
+ const float v10, const float v11, const float v12,\r
+ const float v20, const float v21, const float v22);\r
+ Matrix3(Matrix3& m); // copy constructor\r
+\r
+ float* AsFloatArray() {return &v[0].x;}\r
+};\r
+\r
+slInline Matrix3::Matrix3(const Vector3& v0, const Vector3& v1, const Vector3& v2)\r
+{\r
+ v[0] = v0;\r
+ v[1] = v1;\r
+ v[2] = v2;\r
+}\r
+\r
+slInline Matrix3::Matrix3(const float v00, const float v01, const float v02, const float v10, const float v11, const float v12, const float v20, const float v21, const float v22)\r
+{\r
+ v[0].x = v00; v[0].y = v01; v[0].z = v02;\r
+ v[1].x = v10; v[1].y = v11; v[1].z = v12;\r
+ v[2].x = v20; v[2].y = v21; v[2].z = v22;\r
+}\r
+\r
+slInline Matrix3::Matrix3(Matrix3& m)\r
+{\r
+ v[0] = m.v[0];\r
+ v[1] = m.v[1];\r
+ v[2] = m.v[2];\r
+}\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+struct Matrix4\r
+{\r
+ Vector4 v[4];\r
+\r
+ slInline explicit Matrix4() {}\r
+ explicit Matrix4(const Vector4& v0, const Vector4& v1, const Vector4& v2, const Vector4& v3);\r
+ explicit Matrix4(const float v00, const float v01, const float v02, const float v03,\r
+ const float v10, const float v11, const float v12, const float v13,\r
+ const float v20, const float v21, const float v22, const float v23,\r
+ const float v30, const float v31, const float v32, const float v33);\r
+ explicit Matrix4(const Matrix3& m);\r
+ Matrix4(const Matrix4& m); // copy constructor\r
+\r
+ float* AsFloatArray() {return &v[0].x;}\r
+};\r
+\r
+slInline Matrix4::Matrix4(const Vector4& v0, const Vector4& v1, const Vector4& v2, const Vector4& v3)\r
+{\r
+ v[0] = v0;\r
+ v[1] = v1;\r
+ v[2] = v2;\r
+ v[3] = v3;\r
+}\r
+\r
+slInline Matrix4::Matrix4(const float v00, const float v01, const float v02, const float v03, const float v10, const float v11, const float v12, const float v13, const float v20, const float v21, const float v22, const float v23, const float v30, const float v31, const float v32, const float v33)\r
+{\r
+ v[0].x = v00; v[0].y = v01; v[0].z = v02; v[0].w = v03;\r
+ v[1].x = v10; v[1].y = v11; v[1].z = v12; v[1].w = v13;\r
+ v[2].x = v20; v[2].y = v21; v[2].z = v22; v[2].w = v23;\r
+ v[3].x = v30; v[3].y = v31; v[3].z = v32; v[3].w = v33;\r
+}\r
+\r
+slInline Matrix4::Matrix4(const Matrix3& m)\r
+{\r
+ v[0].x = m.v[0].x; v[0].y = m.v[0].y; v[0].z = m.v[0].z; v[0].w = 0.0f;\r
+ v[1].x = m.v[1].x; v[1].y = m.v[1].y; v[1].z = m.v[1].z; v[1].w = 0.0f;\r
+ v[2].x = m.v[2].x; v[2].y = m.v[2].y; v[2].z = m.v[2].z; v[2].w = 0.0f;\r
+ v[3].x = 0.0f; v[3].y = 0.0f; v[3].z = 0.0f; v[3].w = 1.0f;\r
+}\r
+\r
+slInline Matrix4::Matrix4(const Matrix4& m)\r
+{\r
+ v[0] = m.v[0];\r
+ v[1] = m.v[1];\r
+ v[2] = m.v[2];\r
+ v[3] = m.v[3];\r
+}\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+typedef ALIGN(8) Vector2 AlignedVector2;\r
+typedef ALIGN(16) Vector3 AlignedVector3;\r
+typedef ALIGN(16) Vector4 AlignedVector4;\r
+\r
+typedef ALIGN(64) Matrix3 AlignedMatrix3;\r
+typedef ALIGN(64) Matrix4 AlignedMatrix4;\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+// SIMD Structures\r
+//----------------------------------------------------------------------------------------\r
+struct Vector2SOA\r
+{\r
+ uint32_t m_Count;\r
+ uint32_t m_MaxCount;\r
+\r
+ float* m_X;\r
+ float* m_Y;\r
+\r
+ slInline explicit Vector2SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL;}\r
+ bool InitVector2SOA(float* buffer, uint32_t buffer_size);\r
+\r
+ void GetVector2AtIndex(Vector2& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index];}\r
+};\r
+\r
+slInline bool Vector2SOA::InitVector2SOA(float* buffer, uint32_t max_count)\r
+{\r
+ m_Count = 0;\r
+\r
+ uint64_t buffer_addr = (uint64_t)buffer;\r
+ uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16);\r
+ uint64_t buffer_end = (uint64_t)(buffer + max_count);\r
+\r
+ if (buffer_end - buffer_addr_aligned < 20)\r
+ {\r
+ m_MaxCount = 0;\r
+ m_X = NULL;\r
+ m_Y = NULL;\r
+\r
+ return false;\r
+ }\r
+\r
+ uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4;\r
+ uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 32;\r
+\r
+ m_MaxCount = slot_count * 4 + (uint32_t)(remainder * (slot_count & 0x1));\r
+\r
+ m_X = (float*)buffer_addr_aligned;\r
+ m_Y = m_X + ALIGN_UP(m_MaxCount, 4);\r
+}\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+struct Vector3SOA : public Vector2SOA\r
+{\r
+ float* m_Z;\r
+\r
+ slInline explicit Vector3SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL; m_Z = NULL;}\r
+ bool InitVector3SOA(float* buffer, uint32_t buffer_size);\r
+\r
+ void GetVector3AtIndex(Vector3& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index]; v.z = m_Z[index];}\r
+};\r
+\r
+slInline bool Vector3SOA::InitVector3SOA(float* buffer, uint32_t max_count)\r
+{\r
+ m_Count = 0;\r
+\r
+ uint64_t buffer_addr = (uint64_t)buffer;\r
+ uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16);\r
+ uint64_t buffer_end = (uint64_t)(buffer + max_count);\r
+\r
+ if (buffer_end - buffer_addr_aligned < 36)\r
+ {\r
+ m_MaxCount = 0;\r
+ m_X = NULL;\r
+ m_Y = NULL;\r
+ m_Z = NULL;\r
+\r
+ return false;\r
+ }\r
+\r
+ uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4;\r
+ uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 48;\r
+\r
+ m_MaxCount = slot_count * 4 + (uint32_t)(remainder * (slot_count % 3 == 2));\r
+\r
+ m_X = (float*)buffer_addr_aligned;\r
+ uint32_t aligned_count = ALIGN_UP(m_MaxCount, 4);\r
+ m_Y = m_X + aligned_count;\r
+ m_Z = m_Y + aligned_count;\r
+}\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+struct Vector4SOA : public Vector3SOA\r
+{\r
+ float* m_W;\r
+\r
+ slInline explicit Vector4SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL; m_Z = NULL; m_W = NULL;}\r
+ bool InitVector4SOA(float* buffer, uint32_t buffer_size);\r
+\r
+ void GetVector4AtIndex(Vector4& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index]; v.z = m_Z[index]; v.w = m_W[index];}\r
+};\r
+\r
+slInline bool Vector4SOA::InitVector4SOA(float* buffer, uint32_t max_count)\r
+{\r
+ m_Count = 0;\r
+\r
+ uint64_t buffer_addr = (uint64_t)buffer;\r
+ uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16);\r
+ uint64_t buffer_end = (uint64_t)(buffer + max_count);\r
+\r
+ if (buffer_end - buffer_addr_aligned < 52)\r
+ {\r
+ m_MaxCount = 0;\r
+ m_X = NULL;\r
+ m_Y = NULL;\r
+ m_Z = NULL;\r
+ m_W = NULL;\r
+\r
+ return false;\r
+ }\r
+\r
+ uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4;\r
+ uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 64;\r
+\r
+ m_MaxCount = slot_count * 4 + (uint32_t)(remainder * ((slot_count & 0x3) == 4));\r
+\r
+ m_X = (float*)buffer_addr_aligned;\r
+ uint32_t aligned_count = ALIGN_UP(m_MaxCount, 4);\r
+ m_Y = m_X + aligned_count;\r
+ m_Z = m_Y + aligned_count;\r
+ m_W = m_Z + aligned_count;\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+#include "Foundation/Math/MathOperations.h"\r
+#include "Foundation/Math/MathTypes.h"\r
+#include "Foundation/Math/Vector.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+// Matrix are expressed in post-multiply row-major format.\r
+// That is, matrix multiplication follows the form v = x * A.\r
+// A local-to-world transform with basis a, b, c, expressed in world space, will result\r
+// in a matrix that looks like:\r
+// _ _\r
+// | a |\r
+// | b |\r
+// | c |\r
+// - -\r
+//\r
+// Therefore, translate t will naturally follow below c, in the illustration above.\r
+// With this, we can stuff the matrix directly into OpenGL and not have to do swizzling.\r
+//----------------------------------------------------------------------------------------\r
+\r
+//----------------------------------------------------------------------------------------\r
+// Matrix3\r
+//----------------------------------------------------------------------------------------\r
+void SetMatrix3(Matrix3& r, const Matrix3& a);\r
+void SetMatrix3(Matrix3& r, const Vector3& v0, const Vector3& v1, const Vector3& v2);\r
+\r
+void ScaleMatrix3(Matrix3& r, const float s, const Matrix3& a);\r
+Matrix3 ScaleMatrix3(const float s, const Matrix3& a);\r
+\r
+float DeterminantOfMatrix3(const Matrix3& a);\r
+\r
+void TransposeMatrix3(Matrix3& r, const Matrix3& a);\r
+Matrix3 TransposeMatrix3(const Matrix3& a);\r
+\r
+void InvertAffineMatrix3(Matrix3& r, const Matrix3& a);\r
+Matrix3 InvertAffineMatrix3(const Matrix3& a);\r
+\r
+void InvertGeneralMatrix3(Matrix3& r, const Matrix3& a);\r
+Matrix3 InvertGeneralMatrix3(const Matrix3& a);\r
+\r
+void MulMatrix3(Matrix3& r, const Matrix3& a, const Matrix3& b);\r
+Matrix3 MulMatrix3(const Matrix3& a, const Matrix3& b);\r
+\r
+void MulMatrix3ByTransposedMatrix3(Matrix3& r, const Matrix3& a, const Matrix3& b);\r
+Matrix3 MulMatrix3ByTransposedMatrix3(const Matrix3& a, const Matrix3& b);\r
+\r
+void MulVector3ByMatrix3(Vector3& r, const Vector3& v, const Matrix3& a);\r
+Vector3 MulVector3ByMatrix3(const Vector3& v, const Matrix3& a);\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetMatrix3(Matrix3& r, const Matrix3& a)\r
+{\r
+ r.v[0] = a.v[0];\r
+ r.v[1] = a.v[1];\r
+ r.v[2] = a.v[2];\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetMatrix3(Matrix3& r, const Vector3& v0, const Vector3& v1, const Vector3& v2)\r
+{\r
+ r.v[0] = v0;\r
+ r.v[1] = v1;\r
+ r.v[2] = v2;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void ScaleMatrix3(Matrix3& r, const float s, const Matrix3& a)\r
+{\r
+ ScaleVector3(r.v[0], s, a.v[0]);\r
+ ScaleVector3(r.v[1], s, a.v[1]);\r
+ ScaleVector3(r.v[2], s, a.v[2]);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix3 ScaleMatrix3(const float s, const Matrix3& a)\r
+{\r
+ Matrix3 r;\r
+ ScaleVector3(r.v[0], s, a.v[0]);\r
+ ScaleVector3(r.v[1], s, a.v[1]);\r
+ ScaleVector3(r.v[2], s, a.v[2]);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float DeterminantOfMatrix3(const Matrix3& a)\r
+{\r
+ return a.v[0].x * (a.v[1].y * a.v[2].z - a.v[1].z * a.v[2].y)\r
+ + a.v[0].y * (a.v[1].z * a.v[2].x - a.v[1].x * a.v[2].z)\r
+ + a.v[0].z * (a.v[1].x * a.v[2].y - a.v[1].y * a.v[2].x);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void TransposeMatrix3(Matrix3& r, const Matrix3& a)\r
+{\r
+ // a might be the same as r\r
+ r.v[0].x = a.v[0].x;\r
+ r.v[1].y = a.v[1].y;\r
+ r.v[2].z = a.v[2].z;\r
+\r
+ float temp;\r
+ temp = r.v[0].y;\r
+ r.v[0].y = r.v[1].x;\r
+ r.v[1].x = temp;\r
+\r
+ temp = r.v[0].z;\r
+ r.v[0].z = r.v[2].x;\r
+ r.v[2].x = temp;\r
+\r
+ temp = r.v[1].z;\r
+ r.v[1].z = r.v[2].y;\r
+ r.v[2].y = temp;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix3 TransposeMatrix3(const Matrix3& a)\r
+{\r
+ Matrix3 r;\r
+ r.v[0].x = a.v[0].x; r.v[0].y = a.v[1].x; r.v[0].z = a.v[2].x;\r
+ r.v[1].x = a.v[0].y; r.v[1].y = a.v[1].y; r.v[1].z = a.v[2].y;\r
+ r.v[2].x = a.v[0].z; r.v[2].y = a.v[1].z; r.v[2].z = a.v[2].z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void InvertAffineMatrix3(Matrix3& r, const Matrix3& a)\r
+{\r
+ TransposeMatrix3(r, a);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix3 InvertAffineMatrix3(const Matrix3& a)\r
+{\r
+ return TransposeMatrix3(a);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void InvertGeneralMatrix3(Matrix3& r, const Matrix3& a)\r
+{\r
+ float inv_determinant = 1.0f / DeterminantOfMatrix3(a);\r
+\r
+ Matrix3 a_T;\r
+ TransposeMatrix3(a_T, a);\r
+ CrossVector3(r.v[0], a_T.v[1], a_T.v[2]);\r
+ CrossVector3(r.v[1], a_T.v[2], a_T.v[0]);\r
+ CrossVector3(r.v[2], a_T.v[0], a_T.v[1]);\r
+\r
+ ScaleMatrix3(r, inv_determinant, r);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix3 InvertGeneralMatrix3(const Matrix3& a)\r
+{\r
+ float inv_determinant = 1.0f / DeterminantOfMatrix3(a);\r
+\r
+ Matrix3 r;\r
+ Matrix3 a_T = TransposeMatrix3(a);\r
+ CrossVector3(r.v[0], a_T.v[1], a_T.v[2]);\r
+ CrossVector3(r.v[1], a_T.v[2], a_T.v[0]);\r
+ CrossVector3(r.v[2], a_T.v[0], a_T.v[1]);\r
+\r
+ return ScaleMatrix3(inv_determinant, r);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulMatrix3(Matrix3& r, const Matrix3& a, const Matrix3& b)\r
+{\r
+ Matrix3 temp;\r
+\r
+ temp.v[0].x = DotVector3(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x);\r
+ temp.v[0].y = DotVector3(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y);\r
+ temp.v[0].z = DotVector3(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z);\r
+\r
+ temp.v[1].x = DotVector3(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x);\r
+ temp.v[1].y = DotVector3(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y);\r
+ temp.v[1].z = DotVector3(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z);\r
+\r
+ temp.v[2].x = DotVector3(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x);\r
+ temp.v[2].y = DotVector3(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y);\r
+ temp.v[2].z = DotVector3(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z);\r
+\r
+ SetMatrix3(r, temp);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix3 MulMatrix3(const Matrix3& a, const Matrix3& b)\r
+{\r
+ Matrix3 r;\r
+\r
+ r.v[0].x = DotVector3(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x);\r
+ r.v[0].y = DotVector3(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y);\r
+ r.v[0].z = DotVector3(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z);\r
+\r
+ r.v[1].x = DotVector3(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x);\r
+ r.v[1].y = DotVector3(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y);\r
+ r.v[1].z = DotVector3(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z);\r
+\r
+ r.v[2].x = DotVector3(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x);\r
+ r.v[2].y = DotVector3(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y);\r
+ r.v[2].z = DotVector3(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z);\r
+\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulMatrix3ByTransposedMatrix3(Matrix3& r, const Matrix3& a, const Matrix3& b)\r
+{\r
+ Matrix3 temp;\r
+\r
+ temp.v[0].x = DotVector3(a.v[0], b.v[0]);\r
+ temp.v[0].y = DotVector3(a.v[0], b.v[1]);\r
+ temp.v[0].z = DotVector3(a.v[0], b.v[2]);\r
+\r
+ temp.v[1].x = DotVector3(a.v[1], b.v[0]);\r
+ temp.v[1].y = DotVector3(a.v[1], b.v[1]);\r
+ temp.v[1].z = DotVector3(a.v[1], b.v[2]);\r
+\r
+ temp.v[2].x = DotVector3(a.v[2], b.v[0]);\r
+ temp.v[2].y = DotVector3(a.v[2], b.v[1]);\r
+ temp.v[2].z = DotVector3(a.v[2], b.v[2]);\r
+\r
+ SetMatrix3(r, temp);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix3 MulMatrix3ByTransposedMatrix3(const Matrix3& a, const Matrix3& b)\r
+{\r
+ Matrix3 r;\r
+\r
+ r.v[0].x = DotVector3(a.v[0], b.v[0]);\r
+ r.v[0].y = DotVector3(a.v[0], b.v[1]);\r
+ r.v[0].z = DotVector3(a.v[0], b.v[2]);\r
+\r
+ r.v[1].x = DotVector3(a.v[1], b.v[0]);\r
+ r.v[1].y = DotVector3(a.v[1], b.v[1]);\r
+ r.v[1].z = DotVector3(a.v[1], b.v[2]);\r
+\r
+ r.v[2].x = DotVector3(a.v[2], b.v[0]);\r
+ r.v[2].y = DotVector3(a.v[2], b.v[1]);\r
+ r.v[2].z = DotVector3(a.v[2], b.v[2]);\r
+\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+// do NOT pass in components of a as the r vector\r
+slInline void MulVector3ByMatrix3(Vector3& r, const Vector3& v, const Matrix3& a)\r
+{\r
+ float x = v.x * a.v[0].x + v.y * a.v[1].x + v.z * a.v[2].x;\r
+ float y = v.x * a.v[0].y + v.y * a.v[1].y + v.z * a.v[2].y;\r
+ float z = v.x * a.v[0].z + v.y * a.v[1].z + v.z * a.v[2].z;\r
+ SetVector3(r, x, y, z);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 MulVector3ByMatrix3(const Vector3& v, const Matrix3& a)\r
+{\r
+ Vector3 r;\r
+ r.x = v.x * a.v[0].x + v.y * a.v[1].x + v.z * a.v[2].x;\r
+ r.y = v.x * a.v[0].y + v.y * a.v[1].y + v.z * a.v[2].y;\r
+ r.z = v.x * a.v[0].z + v.y * a.v[1].z + v.z * a.v[2].z;\r
+ return r;\r
+}\r
+\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+// Matrix4\r
+//----------------------------------------------------------------------------------------\r
+void SetMatrix4(Matrix4& r, const Matrix4& a);\r
+void SetMatrix4(Matrix4& r, const Matrix3& a);\r
+void SetMatrix4(Matrix4& r, const Matrix3& a, const Vector3& position);\r
+\r
+void ScaleMatrix4(Matrix4& r, const float s, const Matrix4& a);\r
+Matrix4 ScaleMatrix4(const float s, const Matrix4& a);\r
+\r
+float DeterminantOfMatrix4(const Matrix4& a);\r
+\r
+void TransposeMatrix4(Matrix4& r, const Matrix4& a);\r
+Matrix4 TransposeMatrix4(const Matrix4& a);\r
+\r
+void InvertAffineMatrix4(Matrix4& r, const Matrix4& a);\r
+Matrix4 InvertAffineMatrix4(const Matrix4& a);\r
+\r
+void InvertGeneralMatrix4(Matrix4& r, const Matrix4& a);\r
+Matrix4 InvertGeneralMatrix4(const Matrix4& a);\r
+\r
+void MulMatrix4(Matrix4& r, const Matrix4& a, const Matrix4& b);\r
+Matrix4 MulMatrix4(const Matrix4& a, const Matrix4& b);\r
+\r
+void MulMatrix4ByTransposedMatrix4(Matrix4& r, const Matrix4& a, const Matrix4& t);\r
+Matrix4 MulMatrix4ByTransposedMatrix4(const Matrix4& a, Matrix4& t);\r
+\r
+void MulVector4ByMatrix4(Vector4& r, const Vector4& v, const Matrix4& a);\r
+Vector4 MulVector4ByMatrix4(const Vector4& v, const Matrix4& a);\r
+\r
+void MulVector3ByMatrix4(Vector4& r, const Vector3& v, const float w, const Matrix4& a);\r
+Vector4 MulVector3ByMatrix4(const Vector3& v, const float w, const Matrix4& a);\r
+\r
+void MulVector4ByTransposedMatrix4(Vector4& r, const Vector4& v, const Matrix4& t);\r
+Vector4 MulVector4ByTransposedMatrix4(const Vector4& v, const Matrix4& t);\r
+\r
+void MulVector3ByTransposedMatrix4(Vector4& r, const Vector3& v, const float w, const Matrix4& t);\r
+Vector4 MulVector3ByTransposedMatrix4(const Vector3& v, const float w, const Matrix4& t);\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetMatrix4(Matrix4& r, const Matrix4& a)\r
+{\r
+ r.v[0] = a.v[0];\r
+ r.v[1] = a.v[1];\r
+ r.v[2] = a.v[2];\r
+ r.v[3] = a.v[3];\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetMatrix4(Matrix4& r, const Matrix3& a)\r
+{\r
+ SetVector4(r.v[0], a.v[0], 0.0f);\r
+ SetVector4(r.v[1], a.v[1], 0.0f);\r
+ SetVector4(r.v[2], a.v[2], 0.0f);\r
+ SetVector4(r.v[3], 0.0f, 0.0f, 0.0f, 1.0f);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetMatrix4(Matrix4& r, const Matrix3& a, const Vector3& position)\r
+{\r
+ SetVector4(r.v[0], a.v[0], 0.0f);\r
+ SetVector4(r.v[1], a.v[1], 0.0f);\r
+ SetVector4(r.v[2], a.v[2], 0.0f);\r
+ SetVector4(r.v[3], position, 1.0f);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void ScaleMatrix4(Matrix4& r, const float s, const Matrix4& a)\r
+{\r
+ ScaleVector4(r.v[0], s, a.v[0]);\r
+ ScaleVector4(r.v[1], s, a.v[1]);\r
+ ScaleVector4(r.v[2], s, a.v[2]);\r
+ ScaleVector4(r.v[3], s, a.v[3]);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix4 ScaleMatrix4(const float s, const Matrix4& a)\r
+{\r
+ Matrix4 r;\r
+ ScaleVector4(r.v[0], s, a.v[0]);\r
+ ScaleVector4(r.v[1], s, a.v[1]);\r
+ ScaleVector4(r.v[2], s, a.v[2]);\r
+ ScaleVector4(r.v[3], s, a.v[3]);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float DeterminantOfMatrix4(const Matrix4& a)\r
+{\r
+ // is this correct?\r
+ Vector4 cross_product;\r
+ CrossVector4(cross_product, a.v[1], a.v[2], a.v[3]);\r
+ return DotVector4(a.v[0], cross_product);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void TransposeMatrix4(Matrix4& r, const Matrix4& a)\r
+{\r
+ // a might be the same as r\r
+ r.v[0].x = a.v[0].x;\r
+ r.v[1].y = a.v[1].y;\r
+ r.v[2].z = a.v[2].z;\r
+ r.v[3].w = a.v[3].w;\r
+\r
+ float temp;\r
+ temp = r.v[0].y;\r
+ r.v[0].y = r.v[1].x;\r
+ r.v[1].x = temp;\r
+\r
+ temp = r.v[0].z;\r
+ r.v[0].z = r.v[2].x;\r
+ r.v[2].x = temp;\r
+\r
+ temp = r.v[0].w;\r
+ r.v[0].w = r.v[3].x;\r
+ r.v[3].x = temp;\r
+\r
+ temp = r.v[1].z;\r
+ r.v[1].z = r.v[2].y;\r
+ r.v[2].y = temp;\r
+\r
+ temp = r.v[1].w;\r
+ r.v[1].w = r.v[3].y;\r
+ r.v[3].y = temp;\r
+\r
+ temp = r.v[2].w;\r
+ r.v[2].w = r.v[3].z;\r
+ r.v[3].z = temp;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix4 TransposeMatrix4(const Matrix4& a)\r
+{\r
+ Matrix4 r;\r
+ r.v[0].x = a.v[0].x; r.v[0].y = a.v[1].x; r.v[0].z = a.v[2].x; r.v[0].w = a.v[3].x;\r
+ r.v[1].x = a.v[0].y; r.v[1].y = a.v[1].y; r.v[1].z = a.v[2].y; r.v[1].w = a.v[3].y;\r
+ r.v[2].x = a.v[0].z; r.v[2].y = a.v[1].z; r.v[2].z = a.v[2].z; r.v[2].w = a.v[3].z;\r
+ r.v[3].x = a.v[0].w; r.v[3].y = a.v[1].w; r.v[3].z = a.v[2].w; r.v[3].w = a.v[3].w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void InvertAffineMatrix4(Matrix4& r, const Matrix4& a)\r
+{\r
+ // this may not be correct...\r
+ Matrix3 a3_T(a.v[0].AsVector3(), a.v[1].AsVector3(), a.v[2].AsVector3());\r
+ InvertAffineMatrix3(a3_T, a3_T);\r
+\r
+ Vector3 transpose;\r
+ MulVector3ByMatrix3(transpose, a.v[3].AsVector3(), a3_T);\r
+\r
+ SetMatrix4(r, a3_T, transpose);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix4 InvertAffineMatrix4(const Matrix4& a)\r
+{\r
+ Matrix4 r;\r
+\r
+ // this may not be correct...\r
+ Matrix3 a3_T(a.v[0].AsVector3(), a.v[1].AsVector3(), a.v[2].AsVector3());\r
+ InvertAffineMatrix3(a3_T, a3_T);\r
+\r
+ Vector3 transpose;\r
+ MulVector3ByMatrix3(transpose, a.v[3].AsVector3(), a3_T);\r
+\r
+ SetMatrix4(r, a3_T, transpose);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void InvertGeneralMatrix4(Matrix4& r, const Matrix4& a)\r
+{\r
+ // does this work?\r
+ float inv_determinant = 1.0f / DeterminantOfMatrix4(a);\r
+\r
+ Matrix4 a_T;\r
+ TransposeMatrix4(a_T, a);\r
+ CrossVector4(r.v[0], a_T.v[1], a_T.v[2], a_T.v[3]);\r
+ CrossVector4(r.v[1], a_T.v[2], a_T.v[3], a_T.v[0]);\r
+ CrossVector4(r.v[2], a_T.v[3], a_T.v[0], a_T.v[1]);\r
+ CrossVector4(r.v[3], a_T.v[0], a_T.v[1], a_T.v[2]);\r
+\r
+ ScaleMatrix4(r, inv_determinant, r);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix4 InvertGeneralMatrix4(const Matrix4& a)\r
+{\r
+ // does this work?\r
+ Matrix4 r;\r
+ float inv_determinant = 1.0f / DeterminantOfMatrix4(a);\r
+\r
+ Matrix4 a_T;\r
+ TransposeMatrix4(a_T, a);\r
+ r.v[0] = CrossVector4(a_T.v[1], a_T.v[2], a_T.v[3]);\r
+ r.v[1] = CrossVector4(a_T.v[2], a_T.v[3], a_T.v[0]);\r
+ r.v[2] = CrossVector4(a_T.v[3], a_T.v[0], a_T.v[1]);\r
+ r.v[3] = CrossVector4(a_T.v[0], a_T.v[1], a_T.v[2]);\r
+\r
+ return ScaleMatrix4(inv_determinant, r);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulMatrix4(Matrix4& r, const Matrix4& a, const Matrix4& b)\r
+{\r
+ Matrix4 temp;\r
+\r
+ temp.v[0].x = DotVector4(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
+ temp.v[0].y = DotVector4(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
+ temp.v[0].z = DotVector4(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
+ temp.v[0].w = DotVector4(a.v[0], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
+\r
+ temp.v[1].x = DotVector4(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
+ temp.v[1].y = DotVector4(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
+ temp.v[1].z = DotVector4(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
+ temp.v[1].w = DotVector4(a.v[1], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
+\r
+ temp.v[2].x = DotVector4(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
+ temp.v[2].y = DotVector4(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
+ temp.v[2].z = DotVector4(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
+ temp.v[2].w = DotVector4(a.v[2], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
+\r
+ temp.v[3].x = DotVector4(a.v[3], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
+ temp.v[3].y = DotVector4(a.v[3], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
+ temp.v[3].z = DotVector4(a.v[3], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
+ temp.v[3].w = DotVector4(a.v[3], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
+\r
+ SetMatrix4(r, temp);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix4 MulMatrix4(const Matrix4& a, const Matrix4& b)\r
+{\r
+ Matrix4 r;\r
+\r
+ r.v[0].x = DotVector4(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
+ r.v[0].y = DotVector4(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
+ r.v[0].z = DotVector4(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
+ r.v[0].w = DotVector4(a.v[0], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
+\r
+ r.v[1].x = DotVector4(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
+ r.v[1].y = DotVector4(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
+ r.v[1].z = DotVector4(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
+ r.v[1].w = DotVector4(a.v[1], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
+\r
+ r.v[2].x = DotVector4(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
+ r.v[2].y = DotVector4(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
+ r.v[2].z = DotVector4(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
+ r.v[2].w = DotVector4(a.v[2], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
+\r
+ r.v[3].x = DotVector4(a.v[3], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x);\r
+ r.v[3].y = DotVector4(a.v[3], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y);\r
+ r.v[3].z = DotVector4(a.v[3], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z);\r
+ r.v[3].w = DotVector4(a.v[3], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w);\r
+\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulMatrix4ByTransposedMatrix4(Matrix4& r, const Matrix4& a, const Matrix4& t)\r
+{\r
+ Matrix4 temp;\r
+\r
+ temp.v[0].x = DotVector4(a.v[0], b.v[0]);\r
+ temp.v[0].y = DotVector4(a.v[0], b.v[1]);\r
+ temp.v[0].z = DotVector4(a.v[0], b.v[2]);\r
+ temp.v[0].w = DotVector4(a.v[0], b.v[3]);\r
+\r
+ temp.v[1].x = DotVector4(a.v[1], b.v[0]);\r
+ temp.v[1].y = DotVector4(a.v[1], b.v[1]);\r
+ temp.v[1].z = DotVector4(a.v[1], b.v[2]);\r
+ temp.v[1].w = DotVector4(a.v[1], b.v[3]);\r
+\r
+ temp.v[2].x = DotVector4(a.v[2], b.v[0]);\r
+ temp.v[2].y = DotVector4(a.v[2], b.v[1]);\r
+ temp.v[2].z = DotVector4(a.v[2], b.v[2]);\r
+ temp.v[2].w = DotVector4(a.v[2], b.v[3]);\r
+\r
+ temp.v[3].x = DotVector4(a.v[3], b.v[0]);\r
+ temp.v[3].y = DotVector4(a.v[3], b.v[1]);\r
+ temp.v[3].z = DotVector4(a.v[3], b.v[2]);\r
+ temp.v[3].w = DotVector4(a.v[3], b.v[3]);\r
+\r
+ SetMatrix4(r, temp);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Matrix4 MulMatrix4ByTransposedMatrix4(const Matrix4& a, const Matrix4& t)\r
+{\r
+ Matrix4 r;\r
+\r
+ r.v[0].x = DotVector4(a.v[0], b.v[0]);\r
+ r.v[0].y = DotVector4(a.v[0], b.v[1]);\r
+ r.v[0].z = DotVector4(a.v[0], b.v[2]);\r
+ r.v[0].w = DotVector4(a.v[0], b.v[3]);\r
+\r
+ r.v[1].x = DotVector4(a.v[1], b.v[0]);\r
+ r.v[1].y = DotVector4(a.v[1], b.v[1]);\r
+ r.v[1].z = DotVector4(a.v[1], b.v[2]);\r
+ r.v[1].w = DotVector4(a.v[1], b.v[3]);\r
+\r
+ r.v[2].x = DotVector4(a.v[2], b.v[0]);\r
+ r.v[2].y = DotVector4(a.v[2], b.v[1]);\r
+ r.v[2].z = DotVector4(a.v[2], b.v[2]);\r
+ r.v[2].w = DotVector4(a.v[2], b.v[3]);\r
+\r
+ r.v[3].x = DotVector4(a.v[3], b.v[0]);\r
+ r.v[3].y = DotVector4(a.v[3], b.v[1]);\r
+ r.v[3].z = DotVector4(a.v[3], b.v[2]);\r
+ r.v[3].w = DotVector4(a.v[3], b.v[3]);\r
+\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector4ByMatrix4(Vector4& r, const Vector4& v, const Matrix4& a)\r
+{\r
+ Vector4 result;\r
+ ScaleVector4(result, v.x, a.v[0]);\r
+ ScaleAddVector4(result, v.y, a.v[1], result);\r
+ ScaleAddVector4(result, v.z, a.v[2], result);\r
+ ScaleAddVector4(result, v.w, a.v[3], result);\r
+ SetVector4(r, result);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 MulVector4ByMatrix4(const Vector4& v, const Matrix4& a)\r
+{\r
+ Vector4 r;\r
+ ScaleVector4(r, v.x, a.v[0]);\r
+ ScaleAddVector4(r, v.y, a.v[1], r);\r
+ ScaleAddVector4(r, v.z, a.v[2], r);\r
+ ScaleAddVector4(r, v.w, a.v[3], r);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector3ByMatrix4(Vector4& r, const Vector3& v, const float iw, const Matrix4& a)\r
+{\r
+ Vector4 result;\r
+ ScaleVector4(result, v.x, a.v[0]);\r
+ ScaleAddVector4(result, v.y, a.v[1], result);\r
+ ScaleAddVector4(result, v.z, a.v[2], result);\r
+ ScaleAddVector4(result, iw, a.v[3], result);\r
+ SetVector4(r, result);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 MulVector3ByMatrix4(const Vector3& v, const float iw, const Matrix4& a)\r
+{\r
+ Vector4 r;\r
+ ScaleVector4(r, v.x, a.v[0]);\r
+ ScaleAddVector4(r, v.y, a.v[1], r);\r
+ ScaleAddVector4(r, v.z, a.v[2], r);\r
+ ScaleAddVector4(r, iw, a.v[3], r);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector4ByTransposedMatrix4(Vector4& r, const Vector4& v, const Matrix4& t)\r
+{\r
+ float x = DotVector4(v, t.v[0]);\r
+ float y = DotVector4(v, t.v[1]);\r
+ float z = DotVector4(v, t.v[2]);\r
+ float w = DotVector4(v, t.v[3]);\r
+ SetVector4(r, x, y, z, w);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 MulVector4ByTransposedMatrix4(const Vector4& v, const Matrix4& t)\r
+{\r
+ Vector4 r;\r
+ r.x = DotVector4(v, t.v[0]);\r
+ r.y = DotVector4(v, t.v[1]);\r
+ r.z = DotVector4(v, t.v[2]);\r
+ r.w = DotVector4(v, t.v[3]);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector3ByTransposedMatrix4(Vector4& r, const Vector3& v, const float w, const Matrix4& t)\r
+{\r
+ Vector4 v_new(v, w);\r
+ MulVector4ByTransposedMatrix4(r, v_new, a);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 MulVector3ByTransposedMatrix4(const Vector3& v, const float w, const Matrix4& t)\r
+{\r
+ Vector4 v_as_v4(v, w);\r
+ return MulVector4ByTransposedMatrix4(v_as_v4, t);\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+#include "Foundation/Common/MathTypes.h"\r
+#include "Foundation/Math/Vector.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+// Quaternion\r
+//----------------------------------------------------------------------------------------\r
+void SetQuaternion(Quaternion& r, const float angle, const float x, const float y, const float z);\r
+void SetQuaternion(Quaternion& r, const float angle, const Vector3& rotation_axis);\r
+void ScaleQuaternion(Quaternion& r, const float s, const Quaternion& q);\r
+void MulQuaternion(Quaternion& r, const Quaternion& p, const Quaternion& q);\r
+void ConjugateOfQuaternion(Quaternion& r, const Quaternion& q);\r
+float NormOfQuaternion(const Quaternion& q);\r
+float NormSquaredOfQuaternion(const Quaternion& q);\r
+void NormalizeQuaternion(Quaternion& r, Quaternion& q);\r
+void InverseQuaterion(Quaternion& r, const Quaternion& q);\r
+\r
+//----------------------------------------------------------------------------------------\r
+void SetQuaternion(Quaternion& r, const float angle, const float x, const float y, const float z)\r
+{\r
+ Assert( EpsilonEquals(LengthVector3(rotation_axis), 0.0f, kEpsilon) );\r
+\r
+ float half_angle = angle * 0.5f;\r
+ float sin_half_angle = Sinf(half_angle);\r
+\r
+ r.i = x * sin_half_angle;\r
+ r.j = y * sin_half_angle;\r
+ r.k = z * sin_half_angle;\r
+ r.s = Cosf(half_angle);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void SetQuaternion(Quaternion& r, const float angle, const Vector3& rotation_axis)\r
+{\r
+ Assert( EpsilonEquals(LengthVector3(rotation_axis), 0.0f, kEpsilon) );\r
+\r
+ float half_angle = angle * 0.5f;\r
+ float sin_half_angle = Sinf(half_angle);\r
+\r
+ r.i = rotation_axis.x * sin_half_angle;\r
+ r.j = rotation_axis.y * sin_half_angle;\r
+ r.k = rotation_axis.z * sin_half_angle;\r
+ r.s = Cosf(half_angle);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void ScaleQuaternion(Quaternion& r, const float s, const Quaternion& q)\r
+{\r
+ r.i = q.i * s;\r
+ r.j = q.j * s;\r
+ r.k = q.k * s;\r
+ r.s = q.s * s;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void MulQuaternion(Quaternion& r, const Quaternion& p, const Quaternion& q)\r
+{\r
+ r.i = p.s * q.i + p.i * q.s + p.j * q.k - p.k * q.j;\r
+ r.j = p.s * q.j + p.j * q.s + p.k * q.i - p.i * q.k;\r
+ r.k = p.s * q.k + p.k * q.s + p.i * q.j - p.j * q.i;\r
+ r.s = p.s * q.s - p.i * q.i - p.j * q.j - p.k * q.k;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void ConjugateOfQuaternion(Quaternion& r, const Quaternion& q)\r
+{\r
+ r.i = -q.i;\r
+ r.j = -q.j;\r
+ r.k = -q.k;\r
+ r.s = q.s;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+float NormOfQuaternion(const Quaternion& q)\r
+{\r
+ return Sqrtf( q.i * q.i + q.j * q.j + q.k * q.k + q.s * q.s);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+float NormSquaredOfQuaternion(const Quaternion& q)\r
+{\r
+ return q.i * q.i + q.j * q.j + q.k * q.k + q.s * q.s;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void NormalizeQuaternion(Quaternion& r, Quaternion& q)\r
+{\r
+ float norm_scale = 1.0f / NormQuaternion( q );\r
+ ScaleQuaternion( r, norm_scale, q );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void InverseQuaterion(Quaternion& r, const Quaternion& q)\r
+{\r
+ ConjugateOfQuaternion( r, q );\r
+ float inv_norm_squared = 1.0f / NormSquaredOfQuaternion( q );\r
+ ScaleQuaternion( r, inv_norm_squared, q );\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+#include "Foundation/Math/MathTypes.h"\r
+#include "Foundation/Math/MathOperations.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+// Vector2\r
+//----------------------------------------------------------------------------------------\r
+void SetVector2(Vector2& r, const Vector2& v);\r
+void SetVector2(Vector2& r, const float x, const float y);\r
+void SetVector2(Vector2& r, const float xy);\r
+void AbsVector2(Vector2& r, const Vector2& v);\r
+float MinComponentVector2(const Vector2& v);\r
+float MaxComponentVector2(const Vector2& v);\r
+uint32_t MinIndexVector2(const Vector2& v);\r
+uint32_t MaxIndexVector2(const Vector2& v);\r
+float DotVector2(const Vector2& a, const Vector2& b);\r
+float DotVector2(const Vector2& a, const float x, const float y);\r
+\r
+void PerpendicularVector2(Vector2& r, const Vector2& v);\r
+Vector2 PerpendicularVector2(const Vector2& v);\r
+\r
+void AddVector2ByScalar(Vector2& r, const float s, const Vector2& v);\r
+Vector2 AddVector2ByScalar(const float s, const Vector2& v);\r
+\r
+void AddVector2(Vector2& r, const Vector2& a, const Vector2& b);\r
+Vector2 AddVector2(const Vector2& a, const Vector2& b);\r
+\r
+void AddVector2(Vector2& r, const Vector2& a, const float x, const float y);\r
+Vector2 AddVector2(const Vector2& a, const float x, const float y);\r
+\r
+void SubVector2(Vector2& r, const Vector2& a, const Vector2& b);\r
+Vector2 SubVector2(const Vector2& a, const Vector2& b);\r
+\r
+void SubVector2(Vector2& r, const Vector2& a, const float x, const float y);\r
+Vector2 SubVector2(const Vector2& a, const float x, const float y);\r
+\r
+void ScaleVector2(Vector2& r, const float s, const Vector2& v);\r
+Vector2 ScaleVector2(const float s, const Vector2& v);\r
+\r
+void MulVector2(Vector2& r, const Vector2& a, const Vector2& b);\r
+Vector2 MulVector2(const Vector2& a, const Vector2& b);\r
+\r
+void MulVector2(Vector2& r, const Vector2& a, const float x, const float y);\r
+Vector2 MulVector2(const Vector2& a, const float x, const float y);\r
+\r
+void DivVector2(Vector2& r, const Vector2& a, const Vector2& b);\r
+Vector2 DivVector2(const Vector2& a, const Vector2& b);\r
+\r
+void DivVector2(Vector2& r, const Vector2& a, const float x, const float y);\r
+Vector2 DivVector2(const Vector2& a, const float x, const float y);\r
+\r
+void ScaleAddVector2(Vector2& r, const float s, const Vector2& v_scale, const Vector2& v_add);\r
+Vector2 ScaleAddVector2(const float s, const Vector2& v_scale, const Vector2& v_add);\r
+\r
+void NormalizeVector2(Vector2& r, const Vector2& a);\r
+Vector2 NormalizeVector2(const Vector2& a);\r
+\r
+float LengthOfVector2(const Vector2& a);\r
+float LengthSquaredOfVector2(const Vector2& a);\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector2(Vector2& r, const Vector2& v)\r
+{\r
+ r.x = v.x;\r
+ r.y = v.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector2(Vector2& r, const float x, const float y)\r
+{\r
+ r.x = x;\r
+ r.y = y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector2(Vector2& r, const float xy)\r
+{\r
+ r.x = xy;\r
+ r.y = xy;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void AbsVector2(Vector2& r, const Vector2& v)\r
+{\r
+ r.x = Absf(v.x);\r
+ r.y = Absf(v.y);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+float MinComponentVector2(const Vector2& v)\r
+{\r
+ return v.x <= v.y ? v.x : v.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+float MaxComponentVector2(const Vector2& v)\r
+{\r
+ return v.x >= v.y ? v.x : v.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+uint32_t MinIndexVector2(const Vector2& v)\r
+{\r
+ return v.x <= v.y ? 0 : 1;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+uint32_t MaxIndexVector2(const Vector2& v)\r
+{\r
+ return v.x >= v.y ? 0 : 1;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float DotVector2(const Vector2& a, const Vector2& b)\r
+{\r
+ return a.x * b.x + a.y * b.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float DotVector2(const Vector2& a, const float x, const float y)\r
+{\r
+ return a.x * x + a.y * y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void PerpendicularVector2(Vector2& r, const Vector2& v)\r
+{\r
+ r.x = -v.y;\r
+ r.y = v.x;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 PerpendicularVector2(const Vector2& v)\r
+{\r
+ Vector2 r;\r
+ r.x = -v.y;\r
+ r.y = v.x;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector2ByScalar(Vector2& r, const float s, Vector2& v)\r
+{\r
+ r.x = s + v.x;\r
+ r.y = s + v.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 AddVector2ByScalar(const float s, const Vector2& v)\r
+{\r
+ Vector2 r;\r
+ r.x = s + v.x;\r
+ r.y = s + v.y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector2(Vector2& r, const Vector2& a, const Vector2& b)\r
+{\r
+ r.x = a.x + b.x;\r
+ r.y = a.y + b.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 AddVector2(const Vector2& a, const Vector2& b)\r
+{\r
+ Vector2 r;\r
+ r.x = a.x + b.x;\r
+ r.y = a.y + b.y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector2(Vector2& r, const Vector2& a, const float x, const float y)\r
+{\r
+ r.x = a.x + x;\r
+ r.y = a.y + y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 AddVector2(const Vector2& a, const float x, const float y)\r
+{\r
+ Vector2 r;\r
+ r.x = a.x + x;\r
+ r.y = a.y + y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SubVector2(Vector2& r, const Vector2& a, const Vector2& b)\r
+{\r
+ r.x = a.x - b.x;\r
+ r.y = a.y - b.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 SubVector2(const Vector2& a, const Vector2& b)\r
+{\r
+ Vector2 r;\r
+ r.x = a.x - b.x;\r
+ r.y = a.y - b.y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SubVector2(Vector2& r, const Vector2& a, const float x, const float y)\r
+{\r
+ r.x = a.x - x;\r
+ r.y = a.y - y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 SubVector2(const Vector2& a, const float x, const float y)\r
+{\r
+ Vector2 r;\r
+ r.x = a.x - x;\r
+ r.y = a.y - y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void ScaleVector2(Vector2& r, const float s, const Vector2& v)\r
+{\r
+ r.x = s * v.x;\r
+ r.y = s * v.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 ScaleVector2(const float s, const Vector2& v)\r
+{\r
+ Vector2 r;\r
+ r.x = s * v.x;\r
+ r.y = s * v.y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector2(Vector2& r, const Vector2& a, const Vector2& b)\r
+{\r
+ r.x = a.x * b.x;\r
+ r.y = a.y * b.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 MulVector2(const Vector2& a, const Vector2& b)\r
+{\r
+ Vector2 r;\r
+ r.x = a.x * b.x;\r
+ r.y = a.y * b.y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector2(Vector2& r, const Vector2& a, const float x, const float y)\r
+{\r
+ r.x = a.x * x;\r
+ r.y = a.y * y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 MulVector2(const Vector2& a, const float x, const float y)\r
+{\r
+ Vector2 r;\r
+ r.x = a.x * x;\r
+ r.y = a.y * y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void DivVector2(Vector2& r, const Vector2& a, const Vector2& b)\r
+{\r
+ r.x = a.x / b.x;\r
+ r.y = a.y / b.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 DivVector2(const Vector2& a, const Vector2& b)\r
+{\r
+ Vector2 r;\r
+ r.x = a.x / b.x;\r
+ r.y = a.y / b.y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void DivVector2(Vector2& r, const Vector2& a, const float x, const float y)\r
+{\r
+ r.x = a.x / x;\r
+ r.y = a.y / y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 DivVector2(const Vector2& a, const float x, const float y)\r
+{\r
+ Vector2 r;\r
+ r.x = a.x / x;\r
+ r.y = a.y / y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void ScaleAddVector2(Vector2& r, const float s, const Vector2& v_scale, const Vector2& v_add)\r
+{\r
+ r.x = v_scale.x * s + v_add.x;\r
+ r.y = v_scale.y * s + v_add.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 ScaleAddVector2(const float s, const Vector2& v_scale, const Vector2& v_add)\r
+{\r
+ Vector2 r;\r
+ r.x = v_scale.x * s + v_add.x;\r
+ r.y = v_scale.y * s + v_add.y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void NormalizeVector2(Vector2& r, const Vector2& a)\r
+{\r
+ float scale = 1.0f / LengthOfVector2(a);\r
+ ScaleVector2( r, scale, a );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector2 NormalizeVector2(const Vector2& a)\r
+{\r
+ float scale = 1.0f / LengthOfVector2(a);\r
+ return ScaleVector2( scale, a );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float LengthOfVector2(const Vector2& a)\r
+{\r
+ return Sqrtf( DotVector2(a, a) );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float LengthSquaredOfVector2(const Vector2& a)\r
+{\r
+ return DotVector2(a, a);\r
+}\r
+\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+// Vector3\r
+//----------------------------------------------------------------------------------------\r
+void SetVector3(Vector3& r, const Vector3& v);\r
+void SetVector3(Vector3& r, const Vector2& v, const float z);\r
+void SetVector3(Vector3& r, const float xyz);\r
+void SetVector3(Vector3& r, const float x, const float y, const float z);\r
+\r
+void AbsVector3(Vector3& r, const Vector3& v);\r
+Vector3 AbsVector3(const Vector3& v);\r
+\r
+float MinComponentVector3(const Vector3& v);\r
+float MaxComponentVector3(const Vector3& v);\r
+uint32_t MinIndexVector3(const Vector3& v);\r
+uint32_t MaxIndexVector3(const Vector3& v);\r
+float DotVector3(const Vector3& a, const Vector3& b);\r
+float DotVector3(const Vector3& a, const float x, const float y, const float z);\r
+\r
+void CrossVector3(Vector3& r, const Vector3& a, const Vector3& b);\r
+Vector3 CrossVector3(const Vector3& a, const Vector3& b);\r
+\r
+void AddVector3ByScalar(Vector3& r, const float s, Vector3& v);\r
+Vector3 AddVector3ByScalar(const float s, Vector3& v);\r
+\r
+void AddVector3(Vector3& r, const Vector3& a, const Vector3& b);\r
+Vector3 AddVector3(const Vector3& a, const Vector3& b);\r
+\r
+void AddVector3(Vector3& r, const Vector3& a, const float x, const float y, const float z);\r
+Vector3 AddVector3(const Vector3& a, const float x, const float y, const float z);\r
+\r
+void SubVector3(Vector3& r, const Vector3& a, const Vector3& b);\r
+Vector3 SubVector3(const Vector3& a, const Vector3& b);\r
+\r
+void SubVector3(Vector3& r, const Vector3& a, const float x, const float y, const float z);\r
+Vector3 SubVector3(const Vector3& a, const float x, const float y, const float z);\r
+\r
+void ScaleVector3(Vector3& r, const float s, const Vector3& v);\r
+Vector3 ScaleVector3(const float s, const Vector3& v);\r
+\r
+void MulVector3(Vector3& r, const Vector3& a, const Vector3& b);\r
+Vector3 MulVector3(const Vector3& a, const Vector3& b);\r
+\r
+void MulVector3(Vector3& r, const Vector3& a, const float x, const float y, const float z);\r
+Vector3 MulVector3(const Vector3& a, const float x, const float y, const float z);\r
+\r
+void DivVector3(Vector3& r, const Vector3& a, const Vector3& b);\r
+Vector3 DivVector3(const Vector3& a, const Vector3& b);\r
+\r
+void DivVector3(Vector3& r, const Vector3& a, const float x, const float y, const float z);\r
+Vector3 DivVector3(const Vector3& a, const float x, const float y, const float z);\r
+\r
+void ScaleAddVector3(Vector3& r, const float s, const Vector3& v_scale, const Vector3& v_add);\r
+Vector3 ScaleAddVector3(const float s, const Vector3& v_scale, const Vector3& v_add);\r
+\r
+void NormalizeVector3(Vector3& r, const Vector3& a);\r
+Vector3 NormalizeVector3(const Vector3& a);\r
+\r
+float LengthVector3(const Vector3& a);\r
+float LengthSquaredVector3(const Vector3& a);\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector3(Vector3& r, const Vector3& v)\r
+{\r
+ r.x = v.x;\r
+ r.y = v.y;\r
+ r.z = v.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector3(Vector3& r, const Vector2& v, const float z)\r
+{\r
+ r.x = v.x;\r
+ r.y = v.y;\r
+ r.z = z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector3(Vector3& r, const float xyz)\r
+{\r
+ r.x = xyz;\r
+ r.y = xyz;\r
+ r.z = xyz;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector3(Vector3& r, const float x, const float y, const float z)\r
+{\r
+ r.x = x;\r
+ r.y = y;\r
+ r.z = z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AbsVector3(Vector3& r, const Vector3& v)\r
+{\r
+ r.x = Absf(v.x);\r
+ r.y = Absf(v.y);\r
+ r.z = Absf(v.z);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 AbsVector3(const Vector3& v)\r
+{\r
+ Vector3 r;\r
+ r.x = Absf(v.x);\r
+ r.y = Absf(v.y);\r
+ r.z = Absf(v.z);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float MinComponentVector3(const Vector3& v)\r
+{\r
+ float xy = v.x <= v.y ? v.x : v.y;\r
+ return xy <= v.z ? xy : v.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float MaxComponentVector3(const Vector3& v)\r
+{\r
+ float xy = v.x >= v.y ? v.x : v.y;\r
+ return xy >= v.z ? xy : v.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline uint32_t MinIndexVector3(const Vector3& v)\r
+{\r
+ const float* v_array = &v.x;\r
+ uint32_t xy = v.x <= v.y ? 0 : 1;\r
+ return v_array[xy] <= v.z ? xy : 2;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline uint32_t MaxIndexVector3(const Vector3& v)\r
+{\r
+ const float* v_array = &v.x;\r
+ uint32_t xy = v.x >= v.y ? 0 : 1;\r
+ return v_array[xy] >= v.z ? xy : 2;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float DotVector3(const Vector3& a, const Vector3& b)\r
+{\r
+ return a.x * b.x + a.y * b.y + a.z * b.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float DotVector3(const Vector3& a, const float x, const float y, const float z)\r
+{\r
+ return a.x * x + a.y * y + a.z * z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void CrossVector3(Vector3& r, const Vector3& a, const Vector3& b)\r
+{\r
+ float x = a.y * b.z - b.y * a.z;\r
+ float y = a.z * b.x - b.z * a.x;\r
+ float z = a.x * b.y - b.x * a.y;\r
+ r.x = x;\r
+ r.y = y;\r
+ r.z = z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 CrossVector3(const Vector3& a, const Vector3& b)\r
+{\r
+ Vector3 r;\r
+ r.x = a.y * b.z - b.y * a.z;\r
+ r.y = a.z * b.x - b.z * a.x;\r
+ r.z = a.x * b.y - b.x * a.y;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector3ByScalar(Vector3& r, const float s, Vector3& v)\r
+{\r
+ r.x = s + v.x;\r
+ r.y = s + v.y;\r
+ r.z = s + v.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 AddVector3ByScalar(const float s, Vector3& v)\r
+{\r
+ Vector3 r;\r
+ r.x = s + v.x;\r
+ r.y = s + v.y;\r
+ r.z = s + v.z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector3(Vector3& r, const Vector3& a, const Vector3& b)\r
+{\r
+ r.x = a.x + b.x;\r
+ r.y = a.y + b.y;\r
+ r.z = a.z + b.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 AddVector3(const Vector3& a, const Vector3& b)\r
+{\r
+ Vector3 r;\r
+ r.x = a.x + b.x;\r
+ r.y = a.y + b.y;\r
+ r.z = a.z + b.z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector3(Vector3& r, const Vector3& a, const float x, const float y, const float z)\r
+{\r
+ r.x = a.x + x;\r
+ r.y = a.y + y;\r
+ r.z = a.z + z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 AddVector3(const Vector3& a, const float x, const float y, const float z)\r
+{\r
+ Vector3 r;\r
+ r.x = a.x + x;\r
+ r.y = a.y + y;\r
+ r.z = a.z + z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SubVector3(Vector3& r, const Vector3& a, const Vector3& b)\r
+{\r
+ r.x = a.x - b.x;\r
+ r.y = a.y - b.y;\r
+ r.z = a.z - b.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 SubVector3(const Vector3& a, const Vector3& b)\r
+{\r
+ Vector3 r;\r
+ r.x = a.x - b.x;\r
+ r.y = a.y - b.y;\r
+ r.z = a.z - b.z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 SubVector3(const Vector3& a, const float x, const float y, const float z)\r
+{\r
+ Vector3 r;\r
+ r.x = a.x - x;\r
+ r.y = a.y - y;\r
+ r.z = a.z - z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void ScaleVector3(Vector3& r, const float s, const Vector3& v)\r
+{\r
+ r.x = s * v.x;\r
+ r.y = s * v.y;\r
+ r.z = s * v.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 ScaleVector3(const float s, const Vector3& v)\r
+{\r
+ Vector3 r;\r
+ r.x = s * v.x;\r
+ r.y = s * v.y;\r
+ r.z = s * v.z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector3(Vector3& r, const Vector3& a, const Vector3& b)\r
+{\r
+ r.x = a.x * b.x;\r
+ r.y = a.y * b.y;\r
+ r.z = a.z * b.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 MulVector3(const Vector3& a, const Vector3& b)\r
+{\r
+ Vector3 r;\r
+ r.x = a.x * b.x;\r
+ r.y = a.y * b.y;\r
+ r.z = a.z * b.z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector3(Vector3& r, const Vector3& a, const float x, const float y, const float z)\r
+{\r
+ r.x = a.x * x;\r
+ r.y = a.y * y;\r
+ r.z = a.z * z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 MulVector3(const Vector3& a, const float x, const float y, const float z)\r
+{\r
+ Vector3 r;\r
+ r.x = a.x * x;\r
+ r.y = a.y * y;\r
+ r.z = a.z * z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void DivVector3(Vector3& r, const Vector3& a, const Vector3& b)\r
+{\r
+ r.x = a.x / b.x;\r
+ r.y = a.y / b.y;\r
+ r.z = a.z / b.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 DivVector3(const Vector3& a, const Vector3& b)\r
+{\r
+ Vector3 r;\r
+ r.x = a.x / b.x;\r
+ r.y = a.y / b.y;\r
+ r.z = a.z / b.z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void DivVector3(Vector3& r, const Vector3& a, const float x, const float y, const float z)\r
+{\r
+ r.x = a.x / x;\r
+ r.y = a.y / y;\r
+ r.z = a.z / z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 DivVector3(const Vector3& a, const float x, const float y, const float z)\r
+{\r
+ Vector3 r;\r
+ r.x = a.x / x;\r
+ r.y = a.y / y;\r
+ r.z = a.z / z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void ScaleAddVector3(Vector3& r, const float s, const Vector3& v_scale, const Vector3& v_add)\r
+{\r
+ r.x = s * v_scale.x + v_add.x;\r
+ r.y = s * v_scale.y + v_add.y;\r
+ r.z = s * v_scale.z + v_add.z;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 ScaleAddVector3(const float s, const Vector3& v_scale, const Vector3& v_add)\r
+{\r
+ Vector3 r;\r
+ r.x = s * v_scale.x + v_add.x;\r
+ r.y = s * v_scale.y + v_add.y;\r
+ r.z = s * v_scale.z + v_add.z;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void NormalizeVector3(Vector3& r, const Vector3& a)\r
+{\r
+ float scale = 1.0f / LengthOfVector3( a );\r
+ ScaleVector3( r, scale, a );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector3 NormalizeVector3(const Vector3& a)\r
+{\r
+ float scale = 1.0f / LengthOfVector3( a );\r
+ return ScaleVector3( scale, a );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float LengthOfVector3(const Vector3& a)\r
+{\r
+ return Sqrtf( DotVector3(a, a) );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float LengthSquaredOfVector3(const Vector3& a)\r
+{\r
+ return DotVector3( a, a );\r
+}\r
+\r
+\r
+\r
+//----------------------------------------------------------------------------------------\r
+// Vector4\r
+//----------------------------------------------------------------------------------------\r
+void SetVector4(Vector4& r, const Vector4& v);\r
+void SetVector4(Vector4& r, const Vector2& a, const Vector2& b);\r
+void SetVector4(Vector4& r, const Vector3& v, const float w);\r
+void SetVector4(Vector4& r, const float xyzw);\r
+void SetVector4(Vector4& r, const float x, const float y, const float z, const float w);\r
+\r
+void AbsVector4(Vector4& r, const Vector4& v);\r
+Vector4 AbsVector4(const Vector4& v);\r
+\r
+float MinComponentVector4(const Vector4& v);\r
+float MaxComponentVector4(const Vector4& v);\r
+uint32_t MinIndexVector4(const Vector4& v);\r
+uint32_t MaxIndexVector4(const Vector4& v);\r
+float DotVector4(const Vector4& a, const Vector4& b);\r
+float DotVector4(const Vector4& a, const float x, const float y, const float z, const float w);\r
+\r
+void CrossVector4(Vector4& r, const Vector4& a, const Vector4& b, const Vector4& c);\r
+Vector4 CrossVector4(const Vector4& a, const Vector4& b, const Vector4& c);\r
+\r
+void AddVector4ByScalar(Vector4& r, const float s, Vector4& v);\r
+Vector4 AddVector4ByScalar(const float s, Vector4& v);\r
+\r
+void AddVector4(Vector4& r, const Vector4& a, const Vector4& b);\r
+Vector4 AddVector4(const Vector4& a, const Vector4& b);\r
+\r
+void AddVector4(Vector4& r, const Vector4& a, const float x, const float y, const float z, const float w);\r
+Vector4 AddVector4(const Vector4& a, const float x, const float y, const float z, const float w);\r
+\r
+void SubVector4(Vector4& r, const Vector4& a, const Vector4& b);\r
+Vector4 SubVector4(const Vector4& a, const Vector4& b);\r
+\r
+void SubVector4(Vector4& r, const Vector4& a, const float x, const float y, const float z, const float w);\r
+Vector4 SubVector4(const Vector4& a, const float x, const float y, const float z, const float w);\r
+\r
+void ScaleVector4(Vector4& r, const float s, const Vector4& v);\r
+Vector4 ScaleVector4(const float s, const Vector4& v);\r
+\r
+void MulVector4(Vector4& r, const Vector4& a, const Vector4& b);\r
+Vector4 MulVector4(const Vector4& a, const Vector4& b);\r
+\r
+void MulVector4(Vector4& r, const Vector4& a, const float x, const float y, const float z, const float w);\r
+Vector4 MulVector4(const Vector4& a, const float x, const float y, const float z, const float w);\r
+\r
+void DivVector4(Vector4& r, const Vector4& a, const Vector4& b);\r
+Vector4 DivVector4(const Vector4& a, const Vector4& b);\r
+\r
+void DivVector4(Vector4& r, const Vector4& a, const float x, const float y, const float z, const float w);\r
+Vector4 DivVector4(const Vector4& a, const float x, const float y, const float z, const float w);\r
+\r
+void ScaleAddVector4(Vector4& r, const float s, const Vector4& v_scale, const Vector4& v_add);\r
+Vector4 ScaleAddVector4(const float s, const Vector4& v_scale, const Vector4& v_add);\r
+\r
+void NormalizeVector4(Vector4& r, const Vector4& a);\r
+Vector4 NormalizeVector4(const Vector4& a);\r
+\r
+float LengthVector4(const Vector4& a);\r
+float LengthSquaredVector4(const Vector4& a);\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector4(Vector4& r, const Vector4& v)\r
+{\r
+ r.x = v.x;\r
+ r.y = v.y;\r
+ r.z = v.z;\r
+ r.w = v.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector4(Vector4& r, const Vector2& a, const Vector2& b)\r
+{\r
+ r.x = a.x;\r
+ r.y = a.y;\r
+ r.z = b.x;\r
+ r.w = b.y;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector4(Vector4& r, const Vector3& v, const float w)\r
+{\r
+ r.x = v.x;\r
+ r.y = v.y;\r
+ r.z = v.z;\r
+ r.w = w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector4(Vector4& r, const float xyzw)\r
+{\r
+ r.x = xyzw;\r
+ r.y = xyzw;\r
+ r.z = xyzw;\r
+ r.w = xyzw;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SetVector4(Vector4& r, const float x, const float y, const float z, const float w)\r
+{\r
+ r.x = x;\r
+ r.y = y;\r
+ r.z = z;\r
+ r.w = w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AbsVector4(Vector4& r, const Vector4& v)\r
+{\r
+ r.x = Absf(v.x);\r
+ r.y = Absf(v.y);\r
+ r.z = Absf(v.z);\r
+ r.w = Absf(v.w);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 AbsVector4(const Vector4& v)\r
+{\r
+ Vector4 r;\r
+ r.x = Absf(v.x);\r
+ r.y = Absf(v.y);\r
+ r.z = Absf(v.z);\r
+ r.w = Absf(v.w);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float MinComponentVector4(const Vector4& v)\r
+{\r
+ float xy = v.x <= v.y ? v.x : v.y;\r
+ float zw = v.z <= v.w ? v.z : v.w;\r
+ return xy <= zw ? xy : zw;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float MaxComponentVector4(const Vector4& v)\r
+{\r
+ float xy = v.x >= v.y ? v.x : v.y;\r
+ float zw = v.z >= v.w ? v.z : v.w;\r
+ return xy >= zw ? xy : zw;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline uint32_t MinIndexVector4(const Vector4& v)\r
+{\r
+ const float* v_array = &v.x;\r
+ uint32_t xy = v.x <= v.y ? 0 : 1;\r
+ uint32_t zw = v.x <= v.y ? 2 : 3;\r
+ return v_array[xy] <= v_array[zw] ? xy : zw;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline uint32_t MaxIndexVector4(const Vector4& v)\r
+{\r
+ const float* v_array = &v.x;\r
+ uint32_t xy = v.x >= v.y ? 0 : 1;\r
+ uint32_t zw = v.x >= v.y ? 2 : 3;\r
+ return v_array[xy] >= v_array[zw] ? xy : zw;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float DotVector4(const Vector4& a, const Vector4& b)\r
+{\r
+ return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float DotVector4(const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ return a.x * x + a.y * y + a.z * z + a.w * w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void CrossVector4(Vector4& r, const Vector4& a, const Vector4& b, const Vector4& c)\r
+{\r
+ // is this right?\r
+ r.x = a.y * (b.z * c.w - b.w * c.z) - a.z * (b.y * c.w - c.y * b.w) + a.w * (b.y * c.z - b.z * c.y);\r
+ r.y = -a.x * (b.z * c.w - b.w * c.z) + a.z * (b.x * c.w - c.x * b.w) - a.w * (b.x * c.z - b.z * c.x);\r
+ r.z = a.x * (b.y * c.w - b.w * c.y) - a.y * (b.x * c.w - c.x * b.w) + a.w * (b.x * c.y - b.y * c.x);\r
+ r.w = -a.x * (b.y * c.z - b.z * c.y) + a.y * (b.x * c.z - b.z * c.x) - a.z * (b.x * c.y - b.y * c.x);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 CrossVector4(const Vector4& a, const Vector4& b, const Vector4& c)\r
+{\r
+ Vector4 r;\r
+ // is this right?\r
+ r.x = a.y * (b.z * c.w - b.w * c.z) - a.z * (b.y * c.w - c.y * b.w) + a.w * (b.y * c.z - b.z * c.y);\r
+ r.y = -a.x * (b.z * c.w - b.w * c.z) + a.z * (b.x * c.w - c.x * b.w) - a.w * (b.x * c.z - b.z * c.x);\r
+ r.z = a.x * (b.y * c.w - b.w * c.y) - a.y * (b.x * c.w - c.x * b.w) + a.w * (b.x * c.y - b.y * c.x);\r
+ r.w = -a.x * (b.y * c.z - b.z * c.y) + a.y * (b.x * c.z - b.z * c.x) - a.z * (b.x * c.y - b.y * c.x);\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector4ByScalar(Vector4& r, const float s, Vector4& v)\r
+{\r
+ r.x = s * v.x;\r
+ r.y = s * v.y;\r
+ r.z = s * v.z;\r
+ r.w = s * v.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 AddVector4ByScalar(const float s, Vector4& v)\r
+{\r
+ Vector4 r;\r
+ r.x = s * v.x;\r
+ r.y = s * v.y;\r
+ r.z = s * v.z;\r
+ r.w = s * v.w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector4(Vector4& r, const Vector4& a, const Vector4& b)\r
+{\r
+ r.x = a.x + b.x;\r
+ r.y = a.y + b.y;\r
+ r.z = a.z + b.z;\r
+ r.w = a.w + b.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 AddVector4(const Vector4& a, const Vector4& b)\r
+{\r
+ Vector4 r;\r
+ r.x = a.x + b.x;\r
+ r.y = a.y + b.y;\r
+ r.z = a.z + b.z;\r
+ r.w = a.w + b.w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void AddVector4(Vector4& r, const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ r.x = a.x + x;\r
+ r.y = a.y + y;\r
+ r.z = a.z + z;\r
+ r.w = a.w + w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 AddVector4(const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ Vector4 r;\r
+ r.x = a.x + x;\r
+ r.y = a.y + y;\r
+ r.z = a.z + z;\r
+ r.w = a.w + w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SubVector4(Vector4& r, const Vector4& a, const Vector4& b)\r
+{\r
+ r.x = a.x - b.x;\r
+ r.y = a.y - b.y;\r
+ r.z = a.z - b.z;\r
+ r.w = a.w - b.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 SubVector4(const Vector4& a, const Vector4& b)\r
+{\r
+ Vector4 r;\r
+ r.x = a.x - b.x;\r
+ r.y = a.y - b.y;\r
+ r.z = a.z - b.z;\r
+ r.w = a.w - b.w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void SubVector4(Vector4& r, const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ r.x = a.x - x;\r
+ r.y = a.y - y;\r
+ r.z = a.z - z;\r
+ r.w = a.w - w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 SubVector4(const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ Vector4 r;\r
+ r.x = a.x - x;\r
+ r.y = a.y - y;\r
+ r.z = a.z - z;\r
+ r.w = a.w - w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void ScaleVector4(Vector4& r, const float s, const Vector4& v)\r
+{\r
+ r.x = s * v.x;\r
+ r.y = s * v.y;\r
+ r.z = s * v.z;\r
+ r.w = s * v.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 ScaleVector4(const float s, const Vector4& v)\r
+{\r
+ Vector4 r;\r
+ r.x = s * v.x;\r
+ r.y = s * v.y;\r
+ r.z = s * v.z;\r
+ r.w = s * v.w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector4(Vector4& r, const Vector4& a, const Vector4& b)\r
+{\r
+ r.x = a.x * b.x;\r
+ r.y = a.y * b.y;\r
+ r.z = a.z * b.z;\r
+ r.w = a.w * b.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 MulVector4(const Vector4& a, const Vector4& b)\r
+{\r
+ Vector4 r;\r
+ r.x = a.x * b.x;\r
+ r.y = a.y * b.y;\r
+ r.z = a.z * b.z;\r
+ r.w = a.w * b.w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MulVector4(Vector4& r, const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ r.x = a.x * x;\r
+ r.y = a.y * y;\r
+ r.z = a.z * z;\r
+ r.w = a.w * w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 MulVector4(const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ Vector4 r;\r
+ r.x = a.x * x;\r
+ r.y = a.y * y;\r
+ r.z = a.z * z;\r
+ r.w = a.w * w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void DivVector4(Vector4& r, const Vector4& a, const Vector4& b)\r
+{\r
+ r.x = a.x / b.x;\r
+ r.y = a.y / b.y;\r
+ r.z = a.z / b.z;\r
+ r.w = a.w / b.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 DivVector4(const Vector4& a, const Vector4& b)\r
+{\r
+ Vector4 r;\r
+ r.x = a.x / b.x;\r
+ r.y = a.y / b.y;\r
+ r.z = a.z / b.z;\r
+ r.w = a.w / b.w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void DivVector4(Vector4& r, const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ r.x = a.x / x;\r
+ r.y = a.y / y;\r
+ r.z = a.z / z;\r
+ r.w = a.w / w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 DivVector4(const Vector4& a, const float x, const float y, const float z, const float w)\r
+{\r
+ Vector4 r;\r
+ r.x = a.x / x;\r
+ r.y = a.y / y;\r
+ r.z = a.z / z;\r
+ r.w = a.w / w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void ScaleAddVector4(Vector4& r, const float s, const Vector4& v_scale, const Vector4& v_add)\r
+{\r
+ r.x = s * v_scale.x + v_add.x;\r
+ r.y = s * v_scale.y + v_add.y;\r
+ r.z = s * v_scale.z + v_add.z;\r
+ r.w = s * v_scale.w + v_add.w;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 ScaleAddVector4(const float s, const Vector4& v_scale, const Vector4& v_add)\r
+{\r
+ Vector4 r;\r
+ r.x = s * v_scale.x + v_add.x;\r
+ r.y = s * v_scale.y + v_add.y;\r
+ r.z = s * v_scale.z + v_add.z;\r
+ r.w = s * v_scale.w + v_add.w;\r
+ return r;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void NormalizeVector4(Vector4& r, const Vector4& a)\r
+{\r
+ float scale = 1.0f / LengthOfVector4( a );\r
+ ScaleVector4( r, scale, a );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline Vector4 NormalizeVector4(const Vector4& a)\r
+{\r
+ float scale = 1.0f / LengthOfVector4( a );\r
+ return ScaleVector4( scale, a );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float LengthOfVector4(const Vector4& a)\r
+{\r
+ return Sqrtf( DotVector4(a, a) );\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline float LengthSquaredOfVector4(const Vector4& a)\r
+{\r
+ return DotVector4( a, a );\r
+}\r
--- /dev/null
+#include "MemoryBitset.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+int32_t MemoryBitset::FindLowestUnused(int32_t start_search_index)\r
+{\r
+ int32_t top_index = start_search_index / 4096;\r
+ uint64_t* top_pointer = m_TopBits + top_index;\r
+ int32_t top_offset = (start_search_index - top_index * 4096) / 64;\r
+ uint64_t first_top_mask = ~(0xffffffffffffffffULL << top_offset);\r
+\r
+ // handling the starting case\r
+ if ((*top_pointer | first_top_mask) != 0xffffffffffffffffULL)\r
+ {\r
+ uint64_t valid_top_bits = (*top_pointer | first_top_mask);\r
+ uint64_t top_unused_bits = ~valid_top_bits;\r
+ uint64_t right_most_top_bit = RightMostEnabledBit(top_unused_bits);\r
+ int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_bit);\r
+ uint64_t bottom_bits = m_BottomBits[bottom_index];\r
+\r
+ if (start_search_index > bottom_index * 64)\r
+ {\r
+ // construct the mask for the valid bits\r
+ int32_t bottom_offset = start_search_index - bottom_index * 64;\r
+ uint64_t first_bottom_mask = ~(0xffffffffffffffffULL << bottom_offset);\r
+ bottom_bits |= first_bottom_mask;\r
+ }\r
+\r
+ uint64_t bottom_unused_bits = ~bottom_bits;\r
+ uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(bottom_unused_bits);\r
+ int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit);\r
+ return final_index < m_MaxCount ? final_index : INVALID_INDEX;\r
+ }\r
+\r
+ // guess the first dereference didn't get us anything\r
+ top_pointer++;\r
+ top_index++;\r
+\r
+ // skip over all top bits that're fully allocated\r
+ while (*top_pointer == 0xffffffffffffffffULL && top_pointer <= m_MaxTopPointer)\r
+ {\r
+ top_pointer++;\r
+ top_index++;\r
+ }\r
+\r
+ if (top_pointer > m_MaxTopPointer)\r
+ {\r
+ return INVALID_INDEX;\r
+ }\r
+\r
+ uint64_t right_most_top_unused_bit = RightMostEnabledBit(~*top_pointer);\r
+ int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_unused_bit);\r
+ uint64_t* bottom_pointer = m_BottomBits + bottom_index;\r
+ int32_t bottom_offset = start_search_index - top_index * 4096;\r
+ uint64_t first_bottom_mask = ~(0xffffffffffffffffULL << bottom_offset);\r
+\r
+ // skip over all bottom bits that're fully allocated\r
+ while (*bottom_pointer == 0xffffffffffffffffULL && bottom_pointer <= m_MaxBottomPointer)\r
+ {\r
+ bottom_pointer++;\r
+ bottom_index++;\r
+ }\r
+\r
+ // make sure we didn't overflow\r
+ if (bottom_pointer > m_MaxBottomPointer)\r
+ {\r
+ return INVALID_INDEX;\r
+ }\r
+\r
+ uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(~*bottom_pointer);\r
+ int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit);\r
+\r
+ // make sure we didn't overflow\r
+ if (final_index >= m_MaxCount)\r
+ {\r
+ return INVALID_INDEX;\r
+ }\r
+\r
+ return final_index;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+int32_t MemoryBitset::FindLowestUnused()\r
+{\r
+ int32_t top_index = 0;\r
+ uint64_t* top_pointer = m_TopBits;\r
+\r
+ // skip over all top bits that're fully allocated\r
+ while (*top_pointer == 0xffffffffffffffffULL && top_pointer <= m_MaxTopPointer)\r
+ {\r
+ top_pointer++;\r
+ top_index++;\r
+ }\r
+\r
+ uint64_t right_most_top_unused_bit = RightMostEnabledBit(~*top_pointer);\r
+ int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_unused_bit);\r
+ uint64_t* bottom_pointer = m_BottomBits + bottom_index;\r
+\r
+ // skip over all bottom bits that're fully allocated\r
+ while (*bottom_pointer == 0xffffffffffffffffULL && bottom_pointer <= m_MaxBottomPointer)\r
+ {\r
+ bottom_pointer++;\r
+ bottom_index++;\r
+ }\r
+\r
+ uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(~*bottom_pointer);\r
+ int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit);\r
+\r
+ return final_index;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+int32_t MemoryBitset::FindHighestInUse(int32_t start_search_index)\r
+{\r
+ if (start_search_index < 0 || start_search_index >= m_MaxCount)\r
+ {\r
+ return INVALID_INDEX;\r
+ }\r
+\r
+ int32_t bottom_index = start_search_index / 64;\r
+ uint64_t* bottom_pointer = m_BottomBits + bottom_index;\r
+ int32_t bottom_offset = start_search_index - bottom_index * 64;\r
+ uint64_t bottom_used_bits = *bottom_pointer & (0x1ULL << bottom_offset);\r
+\r
+ while (bottom_used_bits == 0ULL && bottom_pointer >= m_BottomBits)\r
+ {\r
+ bottom_index--;\r
+ bottom_pointer--;\r
+ bottom_used_bits = *bottom_pointer;\r
+ }\r
+\r
+ if (bottom_pointer < m_BottomBits)\r
+ {\r
+ return INVALID_INDEX;\r
+ }\r
+\r
+ return bottom_index * 64 + 63 - LZCount(RightMostEnabledBit(*bottom_pointer));\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+int32_t MemoryBitset::FindHighestInUse()\r
+{\r
+ int32_t bottom_index = m_MaxCount / 64;\r
+ uint64_t* bottom_pointer = m_BottomBits + bottom_index;\r
+ int32_t bottom_offset = m_MaxCount - bottom_index * 64;\r
+ uint64_t bottom_used_bits = *bottom_pointer & (0x1ULL << bottom_offset);\r
+\r
+ while (bottom_used_bits == 0ULL && bottom_pointer >= m_BottomBits)\r
+ {\r
+ bottom_index--;\r
+ bottom_pointer--;\r
+ bottom_used_bits = *bottom_pointer;\r
+ }\r
+\r
+ if (bottom_pointer < m_BottomBits)\r
+ {\r
+ return INVALID_INDEX;\r
+ }\r
+\r
+ return bottom_index * 64 + 63 - LZCount(RightMostEnabledBit(*bottom_pointer));\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void MemoryBitset::GetSizesNeeded(uint32_t& top_size, uint32_t& bottom_size, int32_t entry_count)\r
+{\r
+ Assert(entry_count > 0);\r
+\r
+ uint32_t aligned_4096_count = ALIGN_UP(entry_count, 4096);\r
+ top_size = aligned_4096_count / 512;\r
+\r
+ uint32_t aligned_64_count = ALIGN_UP(entry_count, 64);\r
+ bottom_size = aligned_64_count / 8;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+bool MemoryBitset::Init(uint64_t* top_bits, uint64_t* bottom_bits, int32_t entry_count)\r
+{\r
+ Assert(entry_count > 0);\r
+\r
+ m_TopBits = top_bits;\r
+ m_BottomBits = bottom_bits;\r
+ m_MaxCount = entry_count;\r
+ m_MaxTopPointer = m_TopBits + ALIGN_UP(m_MaxCount, 4096) / 4096;\r
+ m_MaxBottomPointer = m_BottomBits + ALIGN_UP(m_MaxCount, 64) / 64;\r
+ m_IndicesInUse = 0;\r
+ m_LowestUnused = 0;\r
+ m_HighestInUse = INVALID_INDEX;\r
+\r
+ memset(m_BottomBits, 0, ALIGN_UP(m_MaxCount, 64) / 8);\r
+ memset(m_TopBits, 0, ALIGN_UP(m_MaxCount, 4096) / 512);\r
+\r
+ return true;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void MemoryBitset::Reset()\r
+{\r
+ m_IndicesInUse = 0;\r
+ m_LowestUnused = 0;\r
+ m_HighestInUse = -1;\r
+\r
+ memset(m_BottomBits, 0, ALIGN_UP(m_MaxCount, 64) / 8);\r
+ memset(m_TopBits, 0, ALIGN_UP(m_MaxCount, 4096) / 512);\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void MemoryBitset::Destroy()\r
+{\r
+ m_TopBits = NULL;\r
+ m_BottomBits = NULL;\r
+ m_MaxTopPointer = NULL;\r
+ m_MaxBottomPointer = NULL;\r
+ m_MaxCount = 0;\r
+ m_IndicesInUse = 0;\r
+ m_LowestUnused = 0;\r
+ m_HighestInUse = -1;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+int32_t MemoryBitset::AllocateIndex()\r
+{\r
+ if (m_IndicesInUse == m_MaxCount)\r
+ {\r
+ return -1;\r
+ }\r
+\r
+ int32_t return_index = m_LowestUnused;\r
+\r
+ int32_t bottom_index = m_LowestUnused / 64;\r
+ int32_t bottom_offset = m_LowestUnused - bottom_index;\r
+ m_BottomBits[bottom_index] |= (0x1ULL << bottom_offset);\r
+\r
+ if (m_BottomBits[bottom_index] = 0xffffffffffffffffULL)\r
+ {\r
+ int32_t top_index = m_LowestUnused / 4096;\r
+ int32_t top_offset = m_LowestUnused - top_index;\r
+ m_TopBits[top_index] |= (0x1ULL << top_offset);\r
+ }\r
+\r
+ if ((uint32_t)(m_HighestInUse + 1) == m_IndicesInUse)\r
+ {\r
+ m_HighestInUse++;\r
+ m_LowestUnused++;\r
+ m_IndicesInUse++;\r
+ }\r
+ else\r
+ {\r
+ m_IndicesInUse++;\r
+ m_LowestUnused = m_IndicesInUse == m_MaxCount ? m_MaxCount : FindLowestUnused(m_LowestUnused);\r
+ }\r
+\r
+ return return_index;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+bool MemoryBitset::AllocateSpecificIndex(int32_t index)\r
+{\r
+ uint32_t bottom_index = index / 64;\r
+ uint32_t bottom_offset = index - bottom_index;\r
+ uint64_t bottom_mask = (0x1ULL << bottom_offset);\r
+\r
+ if (m_IndicesInUse == m_MaxCount || index >= m_MaxCount || (m_BottomBits[bottom_index] & bottom_mask))\r
+ {\r
+ return false;\r
+ }\r
+\r
+ m_BottomBits[bottom_index] |= bottom_mask;\r
+\r
+ if (m_BottomBits[bottom_index] == 0xffffffffffffffffULL)\r
+ {\r
+ uint32_t top_index = index / 4096;\r
+ uint32_t top_offset = index - top_index;\r
+ uint64_t top_mask = (0x1ULL << top_offset);\r
+ m_TopBits[top_index] |= top_mask;\r
+ }\r
+\r
+ m_IndicesInUse++;\r
+\r
+ if (index > m_HighestInUse)\r
+ {\r
+ m_HighestInUse = index;\r
+ }\r
+\r
+ if (index == m_LowestUnused)\r
+ {\r
+ m_LowestUnused = (m_IndicesInUse == m_MaxCount) ? m_MaxCount : FindLowestUnused(m_LowestUnused + 1);\r
+ }\r
+\r
+ return true;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void MemoryBitset::FreeIndex(int32_t index)\r
+{\r
+ uint32_t bottom_index = index / 64;\r
+ uint32_t bottom_offset = index - bottom_index;\r
+ uint64_t bottom_mask = (0x1ULL << bottom_offset);\r
+\r
+ if (m_IndicesInUse == 0 || index >= m_MaxCount || !(m_BottomBits[bottom_index] & bottom_mask))\r
+ {\r
+ return;\r
+ }\r
+\r
+ if (m_BottomBits[bottom_index] == 0xffffffffffffffffULL)\r
+ {\r
+ uint32_t top_index = index / 4096;\r
+ uint32_t top_offset = index - top_index;\r
+ uint64_t top_mask = (0x1ULL << top_offset);\r
+ m_TopBits[top_index] &= ~top_mask;\r
+ }\r
+\r
+ m_BottomBits[bottom_index] &= ~bottom_mask;\r
+ m_IndicesInUse--;\r
+ m_LowestUnused = index < m_LowestUnused ? index : m_LowestUnused;\r
+ if (m_HighestInUse == index)\r
+ {\r
+ m_HighestInUse = FindHighestInUse(index - 1);\r
+ }\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+class MemoryBitset\r
+{\r
+private:\r
+ uint64_t* m_TopBits;\r
+ uint64_t* m_BottomBits;\r
+\r
+ uint64_t* m_MaxTopPointer;\r
+ uint64_t* m_MaxBottomPointer;\r
+\r
+ int32_t m_MaxCount;\r
+ int32_t m_IndicesInUse;\r
+ int32_t m_LowestUnused;\r
+ int32_t m_HighestInUse;\r
+\r
+ int32_t FindLowestUnused(int32_t start_search_index); // finds upwards to m_MaxCount\r
+ int32_t FindLowestUnused(); // finds upwards to m_MaxCount\r
+ int32_t FindHighestInUse(int32_t start_search_index); // finds downwards to 0\r
+ int32_t FindHighestInUse(); // finds downwards to 0\r
+\r
+public:\r
+ static const int32_t INVALID_INDEX = -1;\r
+\r
+ static void GetSizesNeeded(uint32_t& top_size, uint32_t& bottom_size, int32_t entry_count);\r
+\r
+ bool Init(uint64_t* top_bits, uint64_t* bottom_bits, int32_t entry_count);\r
+ void Reset();\r
+ void Destroy();\r
+\r
+ int32_t AllocateIndex();\r
+ bool AllocateSpecificIndex(int32_t index);\r
+ void FreeIndex(int32_t index);\r
+\r
+ bool IsIndexAllocated(int32_t index);\r
+ int32_t GetAllocatedCount() {return m_IndicesInUse;}\r
+ int32_t GetHighestIndexInUse() {return m_HighestInUse;}\r
+};\r
+\r
+//----------------------------------------------------------------------------------------\r
+inline bool MemoryBitset::IsIndexAllocated(int32_t index)\r
+{\r
+ uint32_t bottom_index = index / 64;\r
+ uint32_t bottom_offset = index - bottom_index;\r
+ return (m_BottomBits[bottom_index] & (0x1ULL << bottom_offset)) > 0;\r
+}\r
--- /dev/null
+#include "MemoryHeap.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+bool MemoryHeap::Init(void* base, size_t size)\r
+{\r
+ if (size <= sizeof(FreeRecordInPage))\r
+ {\r
+ return false;\r
+ }\r
+\r
+ uint64_t base_address = ALIGN_UP( (uint64_t)base, sizeof(FreeRecordInPage) );\r
+ m_Base = (uint8_t*)base_address;\r
+ m_Size = size;\r
+\r
+ return true;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void MemoryHeap::Destroy()\r
+{\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void* MemoryHeap::Allocate(uint32_t size, uint32_t alignment)\r
+{\r
+ return NULL;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+void MemoryHeap::Free(void* address)\r
+{\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+\r
+class MemoryHeap\r
+{\r
+private:\r
+ class MemoryBlock\r
+ {\r
+ static const uint32_t s_Sentinel = 0xdeadbeef;\r
+\r
+ uint32_t m_BlockSize;\r
+ };\r
+\r
+#if defined(__WINDOWS__)\r
+ static const uint32_t s_PageSize = 4096;\r
+#else\r
+#error NEED TO SPECIFY THIS!\r
+#endif\r
+\r
+ struct FreeRecordInPage\r
+ {\r
+ uint32_t m_FreeBlockSize;\r
+ uint32_t m_NextFreeOffset;\r
+ };\r
+\r
+ size_t m_Size;\r
+ uint8_t* m_Base;\r
+\r
+ uint32_t m_PageCount;\r
+\r
+ bool Init(void* base, size_t size);\r
+ void Destroy();\r
+\r
+ void* Allocate(uint32_t size, uint32_t alignment);\r
+ void Free(void* address);\r
+};\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+#include "MemoryHeap.h"\r
+\r
+//----------------------------------------------------------------------------------------\r
+class MemoryLinear\r
+{\r
+private:\r
+ MemoryHeap* m_Heap;\r
+ uint8_t* m_Base;\r
+ uint32_t m_Size;\r
+ uint32_t m_Offset;\r
+ uint32_t m_OffsetTop;\r
+\r
+public:\r
+ bool Init(MemoryHeap* heap, uint32_t size, uint32_t alignment = 1);\r
+ void Destroy();\r
+\r
+ void* Allocate(uint32_t size, uint32_t alignment = 1);\r
+ void* AllocateTop(uint32_t size, uint32_t alignment = 1);\r
+\r
+ uint32_t GetCurrentOffset();\r
+ void RollBackOffset(uint32_t offset);\r
+\r
+ uint32_t GetCurrentOffsetTop();\r
+ void RollBackOffsetTop(uint32_t offset);\r
+\r
+ void Reset();\r
+};\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline bool MemoryLinear::Init(MemoryHeap* heap, uint32_t size, uint32_t alignment = 1)\r
+{\r
+ m_Heap = heap;\r
+ m_Base = (uint8_t*)m_Heap->Allocate(size, "MemoryLinear", alignment);\r
+ m_Size = size;\r
+ m_Offset = 0;\r
+ m_OffsetTop = 0;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MemoryLinear::Destroy()\r
+{\r
+ m_Heap->Free(m_Base);\r
+ m_Heap = NULL;\r
+ m_Base = NULL;\r
+ m_Size = 0;\r
+ m_Offset = 0;\r
+ m_OffsetTop = 0;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void* MemoryLinear::Allocate(uint32_t size, uint32_t alignment)\r
+{\r
+ int64_t aligned_address = ALIGN_UP((int64_t)m_Base + m_Offset, alignment);\r
+ if (aligned_address + size > (int64_t)m_Base + m_Size - m_OffsetTop)\r
+ {\r
+ return NULL;\r
+ }\r
+\r
+ m_Offset = aligned_address - (int64_t)m_Base;\r
+ return (void*)aligned_address;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void* MemoryLinear::AllocateTop(uint32_t size, uint32_t alignment)\r
+{\r
+ int64_t aligned_address = ALIGN_DOWN((int64_t)m_Base + m_Size - m_OffsetTop - size, alignment);\r
+ if (aligned_address < (int64_t)m_Base + m_Offset)\r
+ {\r
+ return NULL;\r
+ }\r
+\r
+ m_OffsetTop = (int64_t)m_Base + m_Size - aligned_address);\r
+ return (void*)aligned_address;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline uint32_t MemoryLinear::GetCurrentOffset()\r
+{\r
+ return m_Offset;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MemoryLinear::RollBackOffset(uint32_t offset)\r
+{\r
+ Assert(offset <= m_Offset);\r
+ m_Offset = offset;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline uint32_t MemoryLinear::GetCurrentOffsetTop()\r
+{\r
+ return m_OffsetTop;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MemoryLinear::RollBackOffsetTop(uint32_t offset_top)\r
+{\r
+ Assert(offset_top >= m_OffsetTop);\r
+ m_OffsetTop = offset_top;\r
+}\r
+\r
+//----------------------------------------------------------------------------------------\r
+slInline void MemoryLinear::Reset()\r
+{\r
+ m_Offset = 0;\r
+ m_OffsetTop = 0;\r
+}\r
--- /dev/null
+#pragma once\r
+\r
+#include "Foundation/Common/GlobalInclude.h"\r
+\r
+#if defined(__WINDOWS__)\r
+\r
+#include <Windows.h>\r
+\r
+#pragma intrinsic(InterlockedIncrement)\r
+#pragma intrinsic(InterlockedDecrement)\r
+#pragma intrinsic(InterlockedExchange)\r
+#pragma intrinsic(InterlockedExchangeAdd)\r
+#pragma intrinsic(InterlockedExchangeSubtract)\r
+#pragma intrinsic(InterlockedCompareExchange)\r
+#pragma intrinsic(InterlockedAnd)\r
+#pragma intrinsic(InterlockedOr)\r
+#pragma intrinsic(InterlockedXor)\r
+\r
+class Atomic32Bit\r
+{\r
+private:\r
+ __declspec(align(16)) uint32_t m_LockValue;\r
+\r
+public:\r
+ Atomic32Bit()\r
+ {\r
+ m_LockValue = 0;\r
+ }\r
+\r
+ ~Atomic32Bit()\r
+ {\r
+ m_LockValue = 0;\r
+ }\r
+\r
+ // use intrinsics instead since they r automatically defined for x64 and x86 structs\r
+ uint32_t Increment(const uint32_t lock_value) //returns current value\r
+ {\r
+ return InterlockedIncrement(&m_LockValue);\r
+\r
+ /*\r
+ volatile unsigned int* p_temp = &m_Locker;\r
+ __asm\r
+ {\r
+ mov eax, 1\r
+ mov edx, [p_temp]\r
+ lock xadd [edx],eax\r
+ }\r
+ */\r
+ }\r
+\r
+ uint32_t SetValue(const uint32_t value)\r
+ {\r
+ return InterlockedExchange(&m_LockValue, value);\r
+\r
+ /*\r
+ volatile unsigned int* p_temp = &m_Locker;\r
+ __asm\r
+ {\r
+ mov eax, Value\r
+ mov edx, [p_temp]\r
+ lock xchg [edx],eax\r
+ }\r
+ */\r
+ }\r
+\r
+ uint32_t Decrement(const uint32_t lock_value) //returns current value\r
+ {\r
+ return InterlockedDecrement(&m_LockValue);\r
+\r
+ /*\r
+ volatile unsigned int* p_temp = &m_Locker;\r
+ __asm\r
+ {\r
+ mov eax, -1\r
+ mov edx, [p_temp]\r
+ lock xadd [edx],eax\r
+ }\r
+ */\r
+ }\r
+\r
+ void And(uint32_t& lock_value)\r
+ {\r
+ InterlockedAnd(&m_LockValue, lock_value);\r
+ lock_value = m_LockValue;\r
+ }\r
+\r
+ // this function can be inlined as long as the volatile is here\r
+ slInline uint32_t GetValue()\r
+ {\r
+ volatile uint32_t* p_temp = &m_LockValue;\r
+ return (unsigned int)*p_temp;\r
+ }\r
+};\r
+\r
+#else\r
+\r
+#error Not yet implemented!\r
+\r
+#endif\r
--- /dev/null
+#pragma once\r
+\r
+#if defined(__WINDOWS__)\r
+\r
+#include <Windows.h>\r
+\r
+#define ReadWriteSync() MemoryBarrier()\r
+\r
+#elif defined(__PS3__)\r
+\r
+#define ReadWriteSync() __asm__("lwsync")\r
+\r
+#elif defined(__ARM__)\r
+\r
+#define ReadWriteSync() __asm__("dsb")\r
+\r
+#else\r
+\r
+#error MemorySync not yet implemented for this build!\r
+\r
+#endif
\ No newline at end of file
--- /dev/null
+//
+// OpenGLServices.h
+// Littlest
+//
+// Created by Doris Chen on 12/11/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#pragma once
+
+#include <OpenGLES/ES1/gl.h>
+#include <OpenGLES/ES1/glext.h>
+#include <OpenGLES/ES2/gl.h>
+#include <OpenGLES/ES2/glext.h>
+
+class OpenGLServices
+{
+public:
+ bool Init();
+
+private:
+
+};
--- /dev/null
+//
+// LittlestAppDelegate.h
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class LittlestViewController;
+
+@interface LittlestAppDelegate : NSObject <UIApplicationDelegate> {
+ UIWindow *window;
+ LittlestViewController *viewController;
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet LittlestViewController *viewController;
+
+@end
+
--- /dev/null
+//
+// LittlestAppDelegate.m
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "LittlestAppDelegate.h"
+#import "LittlestViewController.h"
+
+@implementation LittlestAppDelegate
+
+@synthesize window;
+@synthesize viewController;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ [self.window addSubview:self.viewController.view];
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ [self.viewController stopAnimation];
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ [self.viewController startAnimation];
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ [self.viewController stopAnimation];
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Handle any background procedures not related to animation here.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Handle any foreground procedures not related to animation here.
+}
+
+- (void)dealloc
+{
+ [viewController release];
+ [window release];
+
+ [super dealloc];
+}
+
+@end
--- /dev/null
+//
+// LittlestViewController.h
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import <OpenGLES/EAGL.h>
+
+#import <OpenGLES/ES1/gl.h>
+#import <OpenGLES/ES1/glext.h>
+#import <OpenGLES/ES2/gl.h>
+#import <OpenGLES/ES2/glext.h>
+
+@interface LittlestViewController : UIViewController
+{
+ EAGLContext *context;
+ GLuint program;
+
+ BOOL animating;
+ NSInteger animationFrameInterval;
+ CADisplayLink *displayLink;
+}
+
+@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
+@property (nonatomic) NSInteger animationFrameInterval;
+
+- (void)startAnimation;
+- (void)stopAnimation;
+
+@end
--- /dev/null
+//
+// LittlestViewController.m
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <QuartzCore/QuartzCore.h>
+
+#import "LittlestViewController.h"
+#import "EAGLView.h"
+
+//-----------------------------------------------------------------------------------------------------------
+// Uniform index.
+enum {
+ UNIFORM_TRANSLATE,
+ NUM_UNIFORMS
+};
+GLint uniforms[NUM_UNIFORMS];
+
+// Attribute index.
+enum {
+ ATTRIB_VERTEX,
+ ATTRIB_COLOR,
+ NUM_ATTRIBUTES
+};
+
+//-----------------------------------------------------------------------------------------------------------
+@interface LittlestViewController ()
+@property (nonatomic, retain) EAGLContext *context;
+@property (nonatomic, assign) CADisplayLink *displayLink;
+- (BOOL)loadShaders;
+- (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file;
+- (BOOL)linkProgram:(GLuint)prog;
+- (BOOL)validateProgram:(GLuint)prog;
+@end
+
+//-----------------------------------------------------------------------------------------------------------
+@implementation LittlestViewController
+
+@synthesize animating, context, displayLink;
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)awakeFromNib
+{
+ EAGLContext *aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
+
+ if (!aContext)
+ {
+ aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];
+ }
+
+ if (!aContext)
+ NSLog(@"Failed to create ES context");
+ else if (![EAGLContext setCurrentContext:aContext])
+ NSLog(@"Failed to set ES context current");
+
+ self.context = aContext;
+ [aContext release];
+
+ [(EAGLView *)self.view setContext:context];
+ [(EAGLView *)self.view setFramebuffer];
+
+ if ([context API] == kEAGLRenderingAPIOpenGLES2)
+ [self loadShaders];
+
+ animating = FALSE;
+ animationFrameInterval = 1;
+ self.displayLink = nil;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)dealloc
+{
+ if (program)
+ {
+ glDeleteProgram(program);
+ program = 0;
+ }
+
+ // Tear down context.
+ if ([EAGLContext currentContext] == context)
+ [EAGLContext setCurrentContext:nil];
+
+ [context release];
+
+ [super dealloc];
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)viewWillAppear:(BOOL)animated
+{
+ [self startAnimation];
+
+ [super viewWillAppear:animated];
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)viewWillDisappear:(BOOL)animated
+{
+ [self stopAnimation];
+
+ [super viewWillDisappear:animated];
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+
+ if (program)
+ {
+ glDeleteProgram(program);
+ program = 0;
+ }
+
+ // Tear down context.
+ if ([EAGLContext currentContext] == context)
+ [EAGLContext setCurrentContext:nil];
+ self.context = nil;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (NSInteger)animationFrameInterval
+{
+ return animationFrameInterval;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)setAnimationFrameInterval:(NSInteger)frameInterval
+{
+ /*
+ Frame interval defines how many display frames must pass between each time the display link fires.
+ The display link will only fire 30 times a second when the frame internal is two on a display that refreshes 60 times a second. The default frame interval setting of one will fire 60 times a second when the display refreshes at 60 times a second. A frame interval setting of less than one results in undefined behavior.
+ */
+ if (frameInterval >= 1)
+ {
+ animationFrameInterval = frameInterval;
+
+ if (animating)
+ {
+ [self stopAnimation];
+ [self startAnimation];
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)startAnimation
+{
+ if (!animating)
+ {
+ CADisplayLink *aDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawFrame)];
+ [aDisplayLink setFrameInterval:animationFrameInterval];
+ [aDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+ self.displayLink = aDisplayLink;
+
+ animating = TRUE;
+ }
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)stopAnimation
+{
+ if (animating)
+ {
+ [self.displayLink invalidate];
+ self.displayLink = nil;
+ animating = FALSE;
+ }
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)drawFrame
+{
+ [(EAGLView *)self.view setFramebuffer];
+
+ // Replace the implementation of this method to do your own custom drawing.
+ static const GLfloat squareVertices[] = {
+ -0.5f, -0.33f,
+ 0.5f, -0.33f,
+ -0.5f, 0.33f,
+ 0.5f, 0.33f,
+ };
+
+ static const GLubyte squareColors[] = {
+ 255, 255, 0, 255,
+ 0, 255, 255, 255,
+ 0, 0, 0, 0,
+ 255, 0, 255, 255,
+ };
+
+ static float transY = 0.0f;
+
+ glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ if ([context API] == kEAGLRenderingAPIOpenGLES2)
+ {
+ // Use shader program.
+ glUseProgram(program);
+
+ // Update uniform value.
+ glUniform1f(uniforms[UNIFORM_TRANSLATE], (GLfloat)transY);
+ transY += 0.075f;
+
+ // Update attribute values.
+ glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, squareVertices);
+ glEnableVertexAttribArray(ATTRIB_VERTEX);
+ glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, 1, 0, squareColors);
+ glEnableVertexAttribArray(ATTRIB_COLOR);
+
+ // Validate program before drawing. This is a good check, but only really necessary in a debug build.
+ // DEBUG macro must be defined in your debug configurations if that's not already the case.
+#if defined(DEBUG)
+ if (![self validateProgram:program])
+ {
+ NSLog(@"Failed to validate program: %d", program);
+ return;
+ }
+#endif
+ }
+ else
+ {
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glTranslatef(0.0f, (GLfloat)(sinf(transY)/2.0f), 0.0f);
+ transY += 0.075f;
+
+ glVertexPointer(2, GL_FLOAT, 0, squareVertices);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glColorPointer(4, GL_UNSIGNED_BYTE, 0, squareColors);
+ glEnableClientState(GL_COLOR_ARRAY);
+ }
+
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+
+ [(EAGLView *)self.view presentFramebuffer];
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (void)didReceiveMemoryWarning
+{
+ // Releases the view if it doesn't have a superview.
+ [super didReceiveMemoryWarning];
+
+ // Release any cached data, images, etc. that aren't in use.
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file
+{
+ GLint status;
+ const GLchar *source;
+
+ source = (GLchar *)[[NSString stringWithContentsOfFile:file encoding:NSUTF8StringEncoding error:nil] UTF8String];
+ if (!source)
+ {
+ NSLog(@"Failed to load vertex shader");
+ return FALSE;
+ }
+
+ *shader = glCreateShader(type);
+ glShaderSource(*shader, 1, &source, NULL);
+ glCompileShader(*shader);
+
+#if defined(DEBUG)
+ GLint logLength;
+ glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength);
+ if (logLength > 0)
+ {
+ GLchar *log = (GLchar *)malloc(logLength);
+ glGetShaderInfoLog(*shader, logLength, &logLength, log);
+ NSLog(@"Shader compile log:\n%s", log);
+ free(log);
+ }
+#endif
+
+ glGetShaderiv(*shader, GL_COMPILE_STATUS, &status);
+ if (status == 0)
+ {
+ glDeleteShader(*shader);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (BOOL)linkProgram:(GLuint)prog
+{
+ GLint status;
+
+ glLinkProgram(prog);
+
+#if defined(DEBUG)
+ GLint logLength;
+ glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength);
+ if (logLength > 0)
+ {
+ GLchar *log = (GLchar *)malloc(logLength);
+ glGetProgramInfoLog(prog, logLength, &logLength, log);
+ NSLog(@"Program link log:\n%s", log);
+ free(log);
+ }
+#endif
+
+ glGetProgramiv(prog, GL_LINK_STATUS, &status);
+ if (status == 0)
+ return FALSE;
+
+ return TRUE;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (BOOL)validateProgram:(GLuint)prog
+{
+ GLint logLength, status;
+
+ glValidateProgram(prog);
+ glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength);
+ if (logLength > 0)
+ {
+ GLchar *log = (GLchar *)malloc(logLength);
+ glGetProgramInfoLog(prog, logLength, &logLength, log);
+ NSLog(@"Program validate log:\n%s", log);
+ free(log);
+ }
+
+ glGetProgramiv(prog, GL_VALIDATE_STATUS, &status);
+ if (status == 0)
+ return FALSE;
+
+ return TRUE;
+}
+
+//-----------------------------------------------------------------------------------------------------------
+- (BOOL)loadShaders
+{
+ GLuint vertShader, fragShader;
+ NSString *vertShaderPathname, *fragShaderPathname;
+
+ // Create shader program.
+ program = glCreateProgram();
+
+ // Create and compile vertex shader.
+ vertShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"vsh"];
+ if (![self compileShader:&vertShader type:GL_VERTEX_SHADER file:vertShaderPathname])
+ {
+ NSLog(@"Failed to compile vertex shader");
+ return FALSE;
+ }
+
+ // Create and compile fragment shader.
+ fragShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"fsh"];
+ if (![self compileShader:&fragShader type:GL_FRAGMENT_SHADER file:fragShaderPathname])
+ {
+ NSLog(@"Failed to compile fragment shader");
+ return FALSE;
+ }
+
+ // Attach vertex shader to program.
+ glAttachShader(program, vertShader);
+
+ // Attach fragment shader to program.
+ glAttachShader(program, fragShader);
+
+ // Bind attribute locations.
+ // This needs to be done prior to linking.
+ glBindAttribLocation(program, ATTRIB_VERTEX, "position");
+ glBindAttribLocation(program, ATTRIB_COLOR, "color");
+
+ // Link program.
+ if (![self linkProgram:program])
+ {
+ NSLog(@"Failed to link program: %d", program);
+
+ if (vertShader)
+ {
+ glDeleteShader(vertShader);
+ vertShader = 0;
+ }
+ if (fragShader)
+ {
+ glDeleteShader(fragShader);
+ fragShader = 0;
+ }
+ if (program)
+ {
+ glDeleteProgram(program);
+ program = 0;
+ }
+
+ return FALSE;
+ }
+
+ // Get uniform locations.
+ uniforms[UNIFORM_TRANSLATE] = glGetUniformLocation(program, "translate");
+
+ // Release vertex and fragment shaders.
+ if (vertShader)
+ glDeleteShader(vertShader);
+ if (fragShader)
+ glDeleteShader(fragShader);
+
+ return TRUE;
+}
+
+@end
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+ <key>UIStatusBarHidden</key>
+ <true/>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActivePerspectiveName</key>
+ <string>Project</string>
+ <key>AllowedModules</key>
+ <array>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Name</key>
+ <string>Groups and Files Outline View</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Name</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCTaskListModule</string>
+ <key>Name</key>
+ <string>Task List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Name</key>
+ <string>File and Smart Group Detail Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Name</key>
+ <string>Detailed Build Results Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Name</key>
+ <string>Project Batch Find Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCProjectFormatConflictsModule</string>
+ <key>Name</key>
+ <string>Project Format Conflicts List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Name</key>
+ <string>Bookmarks Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Name</key>
+ <string>Class Browser</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Name</key>
+ <string>Source Code Control Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXDebugBreakpointsModule</string>
+ <key>Name</key>
+ <string>Debug Breakpoints Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDockableInspector</string>
+ <key>Name</key>
+ <string>Inspector</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXOpenQuicklyModule</string>
+ <key>Name</key>
+ <string>Open Quickly Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Name</key>
+ <string>Debugger</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Name</key>
+ <string>Debug Console</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCSnapshotModule</string>
+ <key>Name</key>
+ <string>Snapshots Tool</string>
+ </dict>
+ </array>
+ <key>BundlePath</key>
+ <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
+ <key>Description</key>
+ <string>DefaultDescriptionKey</string>
+ <key>DockingSystemVisible</key>
+ <false/>
+ <key>Extension</key>
+ <string>mode1v3</string>
+ <key>FavBarConfig</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>4B91BFC512AA63C700C245A1</string>
+ <key>XCBarModuleItemNames</key>
+ <dict/>
+ <key>XCBarModuleItems</key>
+ <array/>
+ </dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>com.apple.perspectives.project.mode1v3</string>
+ <key>MajorVersion</key>
+ <integer>33</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>Default</string>
+ <key>Notifications</key>
+ <array/>
+ <key>OpenEditors</key>
+ <array/>
+ <key>PerspectiveWidths</key>
+ <array>
+ <integer>-1</integer>
+ <integer>-1</integer>
+ </array>
+ <key>Perspectives</key>
+ <array>
+ <dict>
+ <key>ChosenToolbarItems</key>
+ <array>
+ <string>active-combo-popup</string>
+ <string>action</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>debugger-enable-breakpoints</string>
+ <string>build-and-go</string>
+ <string>com.apple.ide.PBXToolbarStopButton</string>
+ <string>get-info</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>com.apple.pbx.toolbar.searchfield</string>
+ </array>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProjectWithEditor</string>
+ <key>Identifier</key>
+ <string>perspective.project</string>
+ <key>IsVertical</key>
+ <false/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>210</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>29B97314FDCFA39411CA2CEA</string>
+ <string>080E96DDFE201D6D7F000001</string>
+ <string>4B90648712B4287100655D84</string>
+ <string>2514C27610084DB600A42282</string>
+ <string>4B90648212B41E0800655D84</string>
+ <string>29B97315FDCFA39411CA2CEA</string>
+ <string>29B97317FDCFA39411CA2CEA</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>3</integer>
+ <integer>2</integer>
+ <integer>1</integer>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {210, 945}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <true/>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {227, 963}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>210</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>-42 -1004 1676 1004 -46 -1050 1680 1050 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>227pt</string>
+ </dict>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20306471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>OpenGLServices.h</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20406471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>OpenGLServices.h</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>4B68583712BC1E86005667D3</string>
+ <key>history</key>
+ <array>
+ <string>4B05CF8B12B3FEDE00952C76</string>
+ <string>4B90648912B4442200655D84</string>
+ <string>4B90648A12B4442200655D84</string>
+ <string>4B90648B12B4442200655D84</string>
+ <string>4B90648C12B4442200655D84</string>
+ <string>4B90648D12B4442200655D84</string>
+ <string>4B90648E12B4442200655D84</string>
+ <string>4B9064EA12B4598300655D84</string>
+ <string>4B9064EB12B4598300655D84</string>
+ <string>4B9064EC12B4598300655D84</string>
+ <string>4B9064ED12B4598300655D84</string>
+ <string>4B1B5BDB12BC1CCC005720E9</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {1444, 866}}</string>
+ <key>RubberWindowFrame</key>
+ <string>-42 -1004 1676 1004 -46 -1050 1680 1050 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>866pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20506471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 871}, {1444, 92}}</string>
+ <key>RubberWindowFrame</key>
+ <string>-42 -1004 1676 1004 -46 -1050 1680 1050 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>92pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>1444pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCModuleDock</string>
+ <string>PBXNavigatorGroup</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>4B68583812BC1E86005667D3</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>4B68583912BC1E86005667D3</string>
+ <string>1CE0B20306471E060097A5F4</string>
+ <string>1CE0B20506471E060097A5F4</string>
+ </array>
+ <key>ToolbarConfigUserDefaultsMinorVersion</key>
+ <string>2</string>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.defaultV3</string>
+ </dict>
+ <dict>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProject</string>
+ <key>Identifier</key>
+ <string>perspective.morph</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C08E77C0454961000C914BD</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>186</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>29B97314FDCFA39411CA2CEA</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {186, 337}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>1</integer>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {203, 355}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>186</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>373 269 690 397 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Morph</string>
+ <key>PreferredWidth</key>
+ <integer>300</integer>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.default.shortV3</string>
+ </dict>
+ </array>
+ <key>PerspectivesBarVisible</key>
+ <false/>
+ <key>ShelfIsVisible</key>
+ <false/>
+ <key>SourceDescription</key>
+ <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TimeStamp</key>
+ <real>0.0</real>
+ <key>ToolbarConfigUserDefaultsMinorVersion</key>
+ <string>2</string>
+ <key>ToolbarDisplayMode</key>
+ <integer>3</integer>
+ <key>ToolbarIsVisible</key>
+ <true/>
+ <key>ToolbarSizeMode</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Perspectives</string>
+ <key>UpdateMessage</key>
+ <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string>
+ <key>WindowJustification</key>
+ <integer>5</integer>
+ <key>WindowOrderList</key>
+ <array>
+ <string>4B91BFC612AA63C700C245A1</string>
+ <string>/Users/dorischen/Code/tanks-ios/Littlest.xcodeproj</string>
+ </array>
+ <key>WindowString</key>
+ <string>-42 -1004 1676 1004 -46 -1050 1680 1050 </string>
+ <key>WindowToolsV3</key>
+ <array>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.build</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528F0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string></string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {889, 503}}</string>
+ <key>RubberWindowFrame</key>
+ <string>382 137 889 785 0 0 1600 1178 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>503pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Build Results</string>
+ <key>XCBuildResultsTrigger_Collapse</key>
+ <integer>1021</integer>
+ <key>XCBuildResultsTrigger_Open</key>
+ <integer>1011</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 508}, {889, 236}}</string>
+ <key>RubberWindowFrame</key>
+ <string>382 137 889 785 0 0 1600 1178 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Proportion</key>
+ <string>236pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>744pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Build Results</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBuildResultsModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>4B91BFC612AA63C700C245A1</string>
+ <string>4B68583A12BC1E86005667D3</string>
+ <string>1CD0528F0623707200166675</string>
+ <string>XCMainBuildResultsModuleGUID</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.buildV3</string>
+ <key>WindowContentMinSize</key>
+ <string>486 300</string>
+ <key>WindowString</key>
+ <string>382 137 889 785 0 0 1600 1178 </string>
+ <key>WindowToolGUID</key>
+ <string>4B91BFC612AA63C700C245A1</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.debugger</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>Debugger</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {316, 194}}</string>
+ <string>{{316, 0}, {378, 194}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {694, 194}}</string>
+ <string>{{0, 194}, {694, 187}}</string>
+ </array>
+ </dict>
+ </dict>
+ <key>LauncherConfigVersion</key>
+ <string>8</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C162984064C10D400B95A72</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debug - GLUTExamples (Underwater)</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>DebugConsoleVisible</key>
+ <string>None</string>
+ <key>DebugConsoleWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>DebugSTDIOWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>Frame</key>
+ <string>{{0, 0}, {694, 381}}</string>
+ <key>PBXDebugSessionStackFrameViewKey</key>
+ <dict>
+ <key>DebugVariablesTableConfiguration</key>
+ <array>
+ <string>Name</string>
+ <real>120</real>
+ <string>Value</string>
+ <real>85</real>
+ <string>Summary</string>
+ <real>148</real>
+ </array>
+ <key>Frame</key>
+ <string>{{316, 0}, {378, 194}}</string>
+ <key>RubberWindowFrame</key>
+ <string>23 588 694 422 0 0 1680 1028 </string>
+ </dict>
+ <key>RubberWindowFrame</key>
+ <string>23 588 694 422 0 0 1680 1028 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Proportion</key>
+ <string>381pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>381pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugSessionModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <string>4B90649612B4442200655D84</string>
+ <string>1C162984064C10D400B95A72</string>
+ <string>4B90649712B4442200655D84</string>
+ <string>4B90649812B4442200655D84</string>
+ <string>4B90649912B4442200655D84</string>
+ <string>4B90649A12B4442200655D84</string>
+ <string>4B90649B12B4442200655D84</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugV3</string>
+ <key>WindowString</key>
+ <string>23 588 694 422 0 0 1680 1028 </string>
+ <key>WindowToolGUID</key>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.find</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CDD528C0622207200134675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>LittlestViewController.m</string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {781, 212}}</string>
+ <key>RubberWindowFrame</key>
+ <string>21 685 781 470 0 0 1600 1178 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>781pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>212pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528E0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Project Find</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 217}, {781, 212}}</string>
+ <key>RubberWindowFrame</key>
+ <string>21 685 781 470 0 0 1600 1178 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Proportion</key>
+ <string>212pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>429pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project Find</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXProjectFindModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <string>4B05CF7912AE1B6700952C76</string>
+ <string>4B05CF7A12AE1B6700952C76</string>
+ <string>1CDD528C0622207200134675</string>
+ <string>1CD0528E0623707200166675</string>
+ </array>
+ <key>WindowString</key>
+ <string>21 685 781 470 0 0 1600 1178 </string>
+ <key>WindowToolGUID</key>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>MENUSEPARATOR</string>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.debuggerConsole</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAAC065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debugger Console</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {650, 209}}</string>
+ <key>RubberWindowFrame</key>
+ <string>23 759 650 250 0 0 1680 1028 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Proportion</key>
+ <string>209pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>209pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger Console</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugCLIModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C78EAAD065D492600B07095</string>
+ <string>4B9064BC12B446E600655D84</string>
+ <string>1C78EAAC065D492600B07095</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.consoleV3</string>
+ <key>WindowString</key>
+ <string>23 759 650 250 0 0 1680 1028 </string>
+ <key>WindowToolGUID</key>
+ <string>1C78EAAD065D492600B07095</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.snapshots</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>XCSnapshotModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Snapshots</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCSnapshotModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <string>Yes</string>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.snapshots</string>
+ <key>WindowString</key>
+ <string>315 824 300 550 0 0 1440 878 </string>
+ <key>WindowToolIsVisible</key>
+ <string>Yes</string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.scm</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB2065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string><No Editor></string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB3065D492600B07095</string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <integer>1</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {452, 0}}</string>
+ <key>RubberWindowFrame</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>0pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD052920623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>SCM</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ConsoleFrame</key>
+ <string>{{0, 259}, {452, 0}}</string>
+ <key>Frame</key>
+ <string>{{0, 7}, {452, 259}}</string>
+ <key>RubberWindowFrame</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ <key>TableConfiguration</key>
+ <array>
+ <string>Status</string>
+ <real>30</real>
+ <string>FileName</string>
+ <real>199</real>
+ <string>Path</string>
+ <real>197.0950012207031</real>
+ </array>
+ <key>TableFrame</key>
+ <string>{{0, 0}, {452, 250}}</string>
+ </dict>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Proportion</key>
+ <string>262pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>266pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>SCM</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXCVSModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C78EAB4065D492600B07095</string>
+ <string>1C78EAB5065D492600B07095</string>
+ <string>1C78EAB2065D492600B07095</string>
+ <string>1CD052920623707200166675</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.scm</string>
+ <key>WindowString</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.breakpoints</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>no</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>168</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {168, 350}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>0</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {185, 368}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>168</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>185pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA1AED706398EBD00589147</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{190, 0}, {554, 368}}</string>
+ <key>RubberWindowFrame</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>554pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>368pt</string>
+ </dict>
+ </array>
+ <key>MajorVersion</key>
+ <integer>3</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>Breakpoints</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CDDB66807F98D9800BB5817</string>
+ <string>1CDDB66907F98D9800BB5817</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>1CA1AED706398EBD00589147</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.breakpointsV3</string>
+ <key>WindowString</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1CDDB66807F98D9800BB5817</string>
+ <key>WindowToolIsVisible</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debugAnimator</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debug Visualizer</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXNavigatorGroup</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugAnimatorV3</string>
+ <key>WindowString</key>
+ <string>100 100 700 500 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.bookmarks</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Bookmarks</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBookmarksModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>WindowString</key>
+ <string>538 42 401 187 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.projectFormatConflicts</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>XCProjectFormatConflictsModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project Format Conflicts</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCProjectFormatConflictsModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>WindowContentMinSize</key>
+ <string>450 300</string>
+ <key>WindowString</key>
+ <string>50 850 472 307 0 0 1440 877</string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.classBrowser</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>OptionsSetName</key>
+ <string>Hierarchy, all classes</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA6456E063B45B4001379D8</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Class Browser - NSObject</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ClassesFrame</key>
+ <string>{{0, 0}, {374, 96}}</string>
+ <key>ClassesTreeTableConfiguration</key>
+ <array>
+ <string>PBXClassNameColumnIdentifier</string>
+ <real>208</real>
+ <string>PBXClassBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>Frame</key>
+ <string>{{0, 0}, {630, 331}}</string>
+ <key>MembersFrame</key>
+ <string>{{0, 105}, {374, 395}}</string>
+ <key>MembersTreeTableConfiguration</key>
+ <array>
+ <string>PBXMemberTypeIconColumnIdentifier</string>
+ <real>22</real>
+ <string>PBXMemberNameColumnIdentifier</string>
+ <real>216</real>
+ <string>PBXMemberTypeColumnIdentifier</string>
+ <real>97</real>
+ <string>PBXMemberBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <integer>1</integer>
+ <key>RubberWindowFrame</key>
+ <string>385 179 630 352 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Class Browser</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXClassBrowserModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <string>1C0AD2B0069F1E9B00FABCE6</string>
+ <string>1CA6456E063B45B4001379D8</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.classbrowser</string>
+ <key>WindowString</key>
+ <string>385 179 630 352 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.refactoring</string>
+ <key>IncludeInToolsMenu</key>
+ <integer>0</integer>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>4B90649E12B4468800655D84</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {500, 315}}</string>
+ <key>RubberWindowFrame</key>
+ <string>21 649 500 356 0 0 1680 1028 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCRefactoringModule</string>
+ <key>Proportion</key>
+ <string>315pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>315pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Refactoring</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCRefactoringModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>4B90649F12B4468800655D84</string>
+ <string>4B9064A012B4468800655D84</string>
+ <string>4B90649E12B4468800655D84</string>
+ </array>
+ <key>WindowString</key>
+ <string>21 649 500 356 0 0 1680 1028 </string>
+ <key>WindowToolGUID</key>
+ <string>4B90649F12B4468800655D84</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ </array>
+</dict>
+</plist>
--- /dev/null
+// !$*UTF8*$!
+{
+ 1D3623240D0F684500981E51 /* LittlestAppDelegate.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 769}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 483}";
+ };
+ };
+ 1D3623250D0F684500981E51 /* LittlestAppDelegate.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 769}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 1206}";
+ };
+ };
+ 1D6058900D05DD3D006BFB54 /* Littlest */ = {
+ activeExec = 0;
+ executables = (
+ 4B91BFB612AA63C200C245A1 /* Littlest */,
+ );
+ };
+ 2514C27910084DCA00A42282 /* Shader.fsh */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 769}}";
+ sepNavSelRange = "{217, 0}";
+ sepNavVisRange = "{0, 217}";
+ };
+ };
+ 2514C27A10084DCA00A42282 /* Shader.vsh */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 769}}";
+ sepNavSelRange = "{348, 0}";
+ sepNavVisRange = "{0, 351}";
+ sepNavWindowFrame = "{{-31, -936}, {1576, 931}}";
+ };
+ };
+ 28EC4C5611D54ECE0027AA9F /* LittlestViewController.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 815}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 697}";
+ };
+ };
+ 28EC4C5711D54ECE0027AA9F /* LittlestViewController.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {720, 5291}}";
+ sepNavSelRange = "{297, 8}";
+ sepNavVisRange = "{183, 221}";
+ };
+ };
+ 28FD14FC0DC6FC130079059D /* EAGLView.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 815}}";
+ sepNavSelRange = "{595, 11}";
+ sepNavVisRange = "{0, 989}";
+ sepNavWindowFrame = "{{1, 4}, {1679, 1024}}";
+ };
+ };
+ 28FD14FD0DC6FC130079059D /* EAGLView.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {828, 2119}}";
+ sepNavSelRange = "{5068, 0}";
+ sepNavVisRange = "{4073, 995}";
+ sepNavWindowFrame = "{{1, 4}, {1679, 1024}}";
+ };
+ };
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ activeBuildConfigurationName = Debug;
+ activeExecutable = 4B91BFB612AA63C200C245A1 /* Littlest */;
+ activeTarget = 1D6058900D05DD3D006BFB54 /* Littlest */;
+ addToTargets = (
+ 1D6058900D05DD3D006BFB54 /* Littlest */,
+ );
+ codeSenseManager = 4B91BFC912AA63C700C245A1 /* Code sense */;
+ executables = (
+ 4B91BFB612AA63C200C245A1 /* Littlest */,
+ );
+ perUserDictionary = {
+ PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 1205,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 314318448;
+ PBXWorkspaceStateSaveDate = 314318448;
+ };
+ perUserProjectItems = {
+ 4B05CF8B12B3FEDE00952C76 = 4B05CF8B12B3FEDE00952C76 /* PBXTextBookmark */;
+ 4B05CF9912B3FEDE00952C76 = 4B05CF9912B3FEDE00952C76 /* PBXTextBookmark */;
+ 4B1B5BDB12BC1CCC005720E9 = 4B1B5BDB12BC1CCC005720E9 /* PBXTextBookmark */;
+ 4B68583712BC1E86005667D3 /* PBXTextBookmark */ = 4B68583712BC1E86005667D3 /* PBXTextBookmark */;
+ 4B8CB66C12B92E6D00443DFA = 4B8CB66C12B92E6D00443DFA /* PBXTextBookmark */;
+ 4B90648912B4442200655D84 = 4B90648912B4442200655D84 /* PBXTextBookmark */;
+ 4B90648A12B4442200655D84 = 4B90648A12B4442200655D84 /* PBXTextBookmark */;
+ 4B90648B12B4442200655D84 = 4B90648B12B4442200655D84 /* PBXTextBookmark */;
+ 4B90648C12B4442200655D84 = 4B90648C12B4442200655D84 /* PBXTextBookmark */;
+ 4B90648D12B4442200655D84 = 4B90648D12B4442200655D84 /* PBXTextBookmark */;
+ 4B90648E12B4442200655D84 = 4B90648E12B4442200655D84 /* PBXTextBookmark */;
+ 4B9064EA12B4598300655D84 = 4B9064EA12B4598300655D84 /* PBXTextBookmark */;
+ 4B9064EB12B4598300655D84 = 4B9064EB12B4598300655D84 /* PBXTextBookmark */;
+ 4B9064EC12B4598300655D84 = 4B9064EC12B4598300655D84 /* PBXTextBookmark */;
+ 4B9064ED12B4598300655D84 = 4B9064ED12B4598300655D84 /* PBXTextBookmark */;
+ 4B9064EF12B4598300655D84 = 4B9064EF12B4598300655D84 /* PBXTextBookmark */;
+ };
+ sourceControlManager = 4B91BFC812AA63C700C245A1 /* Source Control */;
+ userBuildSettings = {
+ };
+ };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1560, 900}}";
+ sepNavSelRange = "{155, 0}";
+ sepNavVisRange = "{0, 360}";
+ sepNavWindowFrame = "{{0, 0}, {1619, 1028}}";
+ };
+ };
+ 32CA4F630368D1EE00C91783 /* Littlest_Prefix.pch */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1560, 900}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 314}";
+ sepNavWindowFrame = "{{0, 0}, {1619, 1028}}";
+ };
+ };
+ 4B05CF8712B2192400952C76 /* LittlestViewController.m */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.objc;
+ name = LittlestViewController.m;
+ path = /Users/dorischen/Documents/Littlest/Classes/LittlestViewController.m;
+ sourceTree = "<absolute>";
+ };
+ 4B05CF8B12B3FEDE00952C76 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 32CA4F630368D1EE00C91783 /* Littlest_Prefix.pch */;
+ name = "Littlest_Prefix.pch: 8";
+ rLen = 1;
+ rLoc = 171;
+ rType = 0;
+ vrLen = 314;
+ vrLoc = 0;
+ };
+ 4B05CF9912B3FEDE00952C76 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 29B97316FDCFA39411CA2CEA /* main.m */;
+ name = "main.m: 10";
+ rLen = 0;
+ rLoc = 155;
+ rType = 0;
+ vrLen = 360;
+ vrLoc = 0;
+ };
+ 4B1B5BDB12BC1CCC005720E9 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4B90648812B428E900655D84 /* OpenGLServices.h */;
+ name = "OpenGLServices.h: 22";
+ rLen = 0;
+ rLoc = 336;
+ rType = 0;
+ vrLen = 340;
+ vrLoc = 0;
+ };
+ 4B68583712BC1E86005667D3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4B90648812B428E900655D84 /* OpenGLServices.h */;
+ name = "OpenGLServices.h: 22";
+ rLen = 0;
+ rLoc = 336;
+ rType = 0;
+ vrLen = 340;
+ vrLoc = 0;
+ };
+ 4B8CB66C12B92E6D00443DFA /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4B90648812B428E900655D84 /* OpenGLServices.h */;
+ name = "OpenGLServices.h: 22";
+ rLen = 0;
+ rLoc = 336;
+ rType = 0;
+ vrLen = 340;
+ vrLoc = 0;
+ };
+ 4B90648312B41E6500655D84 /* Standard.vsh */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 769}}";
+ sepNavSelRange = "{346, 0}";
+ sepNavVisRange = "{0, 403}";
+ };
+ };
+ 4B90648512B426FE00655D84 /* Standard.fsh */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 769}}";
+ sepNavSelRange = "{111, 0}";
+ sepNavVisRange = "{0, 111}";
+ };
+ };
+ 4B90648812B428E900655D84 /* OpenGLServices.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1383, 834}}";
+ sepNavSelRange = "{336, 0}";
+ sepNavVisRange = "{0, 340}";
+ };
+ };
+ 4B90648912B4442200655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2514C27A10084DCA00A42282 /* Shader.vsh */;
+ name = "Shader.vsh: 21";
+ rLen = 0;
+ rLoc = 348;
+ rType = 0;
+ vrLen = 351;
+ vrLoc = 0;
+ };
+ 4B90648A12B4442200655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2514C27910084DCA00A42282 /* Shader.fsh */;
+ name = "Shader.fsh: 15";
+ rLen = 0;
+ rLoc = 217;
+ rType = 0;
+ vrLen = 217;
+ vrLoc = 0;
+ };
+ 4B90648B12B4442200655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4B90648512B426FE00655D84 /* Standard.fsh */;
+ name = "Standard.fsh: 8";
+ rLen = 0;
+ rLoc = 111;
+ rType = 0;
+ vrLen = 111;
+ vrLoc = 0;
+ };
+ 4B90648C12B4442200655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4B90648312B41E6500655D84 /* Standard.vsh */;
+ name = "Standard.vsh: 14";
+ rLen = 0;
+ rLoc = 346;
+ rType = 0;
+ vrLen = 403;
+ vrLoc = 0;
+ };
+ 4B90648D12B4442200655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1D3623240D0F684500981E51 /* LittlestAppDelegate.h */;
+ name = "LittlestAppDelegate.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 483;
+ vrLoc = 0;
+ };
+ 4B90648E12B4442200655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1D3623250D0F684500981E51 /* LittlestAppDelegate.m */;
+ name = "LittlestAppDelegate.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1206;
+ vrLoc = 0;
+ };
+ 4B9064EA12B4598300655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4B05CF8712B2192400952C76 /* LittlestViewController.m */;
+ name = "LittlestViewController.m: 9";
+ rLen = 0;
+ rLoc = 175;
+ rType = 0;
+ vrLen = 1485;
+ vrLoc = 0;
+ };
+ 4B9064EB12B4598300655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 28EC4C5611D54ECE0027AA9F /* LittlestViewController.h */;
+ name = "LittlestViewController.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 697;
+ vrLoc = 0;
+ };
+ 4B9064EC12B4598300655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 28FD14FC0DC6FC130079059D /* EAGLView.h */;
+ name = "EAGLView.h: 10";
+ rLen = 0;
+ rLoc = 159;
+ rType = 0;
+ vrLen = 989;
+ vrLoc = 0;
+ };
+ 4B9064ED12B4598300655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 28FD14FD0DC6FC130079059D /* EAGLView.m */;
+ name = "EAGLView.m: 112";
+ rLen = 0;
+ rLoc = 3756;
+ rType = 0;
+ vrLen = 2011;
+ vrLoc = 72;
+ };
+ 4B9064EF12B4598300655D84 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4B90648812B428E900655D84 /* OpenGLServices.h */;
+ name = "OpenGLServices.h: 17";
+ rLen = 0;
+ rLoc = 336;
+ rType = 0;
+ vrLen = 291;
+ vrLoc = 0;
+ };
+ 4B91BFB612AA63C200C245A1 /* Littlest */ = {
+ isa = PBXExecutable;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ breakpointsEnabled = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ dataTipCustomDataFormattersEnabled = 1;
+ dataTipShowTypeColumn = 1;
+ dataTipSortType = 0;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ dylibVariantSuffix = "";
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = Littlest;
+ savedGlobals = {
+ };
+ showTypeColumn = 0;
+ sourceDirectories = (
+ );
+ };
+ 4B91BFC812AA63C700C245A1 /* Source Control */ = {
+ isa = PBXSourceControlManager;
+ fallbackIsa = XCSourceControlManager;
+ isSCMEnabled = 0;
+ scmConfiguration = {
+ repositoryNamesForRoots = {
+ "" = "";
+ };
+ };
+ };
+ 4B91BFC912AA63C700C245A1 /* Code sense */ = {
+ isa = PBXCodeSenseManager;
+ indexTemplatePath = "";
+ };
+}
--- /dev/null
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1D3623260D0F684500981E51 /* LittlestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* LittlestAppDelegate.m */; };
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 2514C27B10084DCA00A42282 /* Shader.fsh in Resources */ = {isa = PBXBuildFile; fileRef = 2514C27910084DCA00A42282 /* Shader.fsh */; };
+ 2514C27C10084DCA00A42282 /* Shader.vsh in Resources */ = {isa = PBXBuildFile; fileRef = 2514C27A10084DCA00A42282 /* Shader.vsh */; };
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
+ 28EC4C5911D54ECE0027AA9F /* LittlestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28EC4C5711D54ECE0027AA9F /* LittlestViewController.m */; };
+ 28EC4C5A11D54ECE0027AA9F /* LittlestViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28EC4C5811D54ECE0027AA9F /* LittlestViewController.xib */; };
+ 28FD14FE0DC6FC130079059D /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 28FD14FD0DC6FC130079059D /* EAGLView.m */; };
+ 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
+ 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
+ 4B68585B12BC1E97005667D3 /* LocklessRingBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B68584612BC1E97005667D3 /* LocklessRingBuffer.cpp */; };
+ 4B68585C12BC1E97005667D3 /* MemoryBitset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B68585312BC1E97005667D3 /* MemoryBitset.cpp */; };
+ 4B68585D12BC1E97005667D3 /* MemoryHeap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B68585512BC1E97005667D3 /* MemoryHeap.cpp */; };
+ 4B90648412B41E6500655D84 /* Standard.vsh in Sources */ = {isa = PBXBuildFile; fileRef = 4B90648312B41E6500655D84 /* Standard.vsh */; };
+ 4B90648612B426FE00655D84 /* Standard.fsh in Sources */ = {isa = PBXBuildFile; fileRef = 4B90648512B426FE00655D84 /* Standard.fsh */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 1D3623240D0F684500981E51 /* LittlestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LittlestAppDelegate.h; sourceTree = "<group>"; };
+ 1D3623250D0F684500981E51 /* LittlestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LittlestAppDelegate.m; sourceTree = "<group>"; };
+ 1D6058910D05DD3D006BFB54 /* Littlest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Littlest.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 2514C27910084DCA00A42282 /* Shader.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Shader.fsh; path = Shaders/Shader.fsh; sourceTree = "<group>"; };
+ 2514C27A10084DCA00A42282 /* Shader.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Shader.vsh; path = Shaders/Shader.vsh; sourceTree = "<group>"; };
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
+ 28EC4C5611D54ECE0027AA9F /* LittlestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LittlestViewController.h; sourceTree = "<group>"; };
+ 28EC4C5711D54ECE0027AA9F /* LittlestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LittlestViewController.m; sourceTree = "<group>"; };
+ 28EC4C5811D54ECE0027AA9F /* LittlestViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LittlestViewController.xib; sourceTree = "<group>"; };
+ 28FD14FC0DC6FC130079059D /* EAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EAGLView.h; sourceTree = "<group>"; };
+ 28FD14FD0DC6FC130079059D /* EAGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EAGLView.m; sourceTree = "<group>"; };
+ 28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
+ 28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 32CA4F630368D1EE00C91783 /* Littlest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Littlest_Prefix.pch; sourceTree = "<group>"; };
+ 4B68583D12BC1E97005667D3 /* Assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Assert.h; sourceTree = "<group>"; };
+ 4B68583E12BC1E97005667D3 /* Base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base.h; sourceTree = "<group>"; };
+ 4B68583F12BC1E97005667D3 /* GlobalDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalDefines.h; sourceTree = "<group>"; };
+ 4B68584012BC1E97005667D3 /* GlobalInclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalInclude.h; sourceTree = "<group>"; };
+ 4B68584112BC1E97005667D3 /* GlobalTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalTypes.h; sourceTree = "<group>"; };
+ 4B68584212BC1E97005667D3 /* Print.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Print.h; sourceTree = "<group>"; };
+ 4B68584312BC1E97005667D3 /* Singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Singleton.h; sourceTree = "<group>"; };
+ 4B68584512BC1E97005667D3 /* BitEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitEncoder.h; sourceTree = "<group>"; };
+ 4B68584612BC1E97005667D3 /* LocklessRingBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocklessRingBuffer.cpp; sourceTree = "<group>"; };
+ 4B68584712BC1E97005667D3 /* LocklessRingBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocklessRingBuffer.h; sourceTree = "<group>"; };
+ 4B68584912BC1E97005667D3 /* DJB2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJB2.h; sourceTree = "<group>"; };
+ 4B68584B12BC1E97005667D3 /* MathDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathDefines.h; sourceTree = "<group>"; };
+ 4B68584C12BC1E97005667D3 /* MathInclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathInclude.h; sourceTree = "<group>"; };
+ 4B68584D12BC1E97005667D3 /* MathOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathOperations.h; sourceTree = "<group>"; };
+ 4B68584E12BC1E97005667D3 /* MathTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathTypes.h; sourceTree = "<group>"; };
+ 4B68584F12BC1E97005667D3 /* Matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Matrix.h; sourceTree = "<group>"; };
+ 4B68585012BC1E97005667D3 /* Quaternion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Quaternion.h; sourceTree = "<group>"; };
+ 4B68585112BC1E97005667D3 /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector.h; sourceTree = "<group>"; };
+ 4B68585312BC1E97005667D3 /* MemoryBitset.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryBitset.cpp; sourceTree = "<group>"; };
+ 4B68585412BC1E97005667D3 /* MemoryBitset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryBitset.h; sourceTree = "<group>"; };
+ 4B68585512BC1E97005667D3 /* MemoryHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryHeap.cpp; sourceTree = "<group>"; };
+ 4B68585612BC1E97005667D3 /* MemoryHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryHeap.h; sourceTree = "<group>"; };
+ 4B68585712BC1E97005667D3 /* MemoryLinear.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryLinear.h; sourceTree = "<group>"; };
+ 4B68585912BC1E97005667D3 /* Atomic32Bit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atomic32Bit.h; sourceTree = "<group>"; };
+ 4B68585A12BC1E97005667D3 /* MemorySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemorySync.h; sourceTree = "<group>"; };
+ 4B90648312B41E6500655D84 /* Standard.vsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Standard.vsh; path = Shaders/Standard/Standard.vsh; sourceTree = "<group>"; };
+ 4B90648512B426FE00655D84 /* Standard.fsh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.glsl; name = Standard.fsh; path = Shaders/Standard/Standard.fsh; sourceTree = "<group>"; };
+ 4B90648812B428E900655D84 /* OpenGLServices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OpenGLServices.h; path = GraphicsServices/OpenGLServices.h; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Littlest-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Littlest-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+ 28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */,
+ 28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 4B68583B12BC1E97005667D3 /* Foundation */,
+ 4B90648712B4287100655D84 /* GraphicsServices */,
+ 28FD14FC0DC6FC130079059D /* EAGLView.h */,
+ 28FD14FD0DC6FC130079059D /* EAGLView.m */,
+ 1D3623240D0F684500981E51 /* LittlestAppDelegate.h */,
+ 1D3623250D0F684500981E51 /* LittlestAppDelegate.m */,
+ 28EC4C5611D54ECE0027AA9F /* LittlestViewController.h */,
+ 28EC4C5711D54ECE0027AA9F /* LittlestViewController.m */,
+ );
+ path = Classes;
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1D6058910D05DD3D006BFB54 /* Littlest.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 2514C27610084DB600A42282 /* Shaders */ = {
+ isa = PBXGroup;
+ children = (
+ 4B90648212B41E0800655D84 /* Standard */,
+ 2514C27910084DCA00A42282 /* Shader.fsh */,
+ 2514C27A10084DCA00A42282 /* Shader.vsh */,
+ );
+ name = Shaders;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 2514C27610084DB600A42282 /* Shaders */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = CustomTemplate;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* Littlest_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 28EC4C5811D54ECE0027AA9F /* LittlestViewController.xib */,
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */,
+ 8D1107310486CEB800E47090 /* Littlest-Info.plist */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 28FD15070DC6FC5B0079059D /* QuartzCore.framework */,
+ 28FD14FF0DC6FC520079059D /* OpenGLES.framework */,
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
+ 1D30AB110D05D00D00671497 /* Foundation.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 4B68583B12BC1E97005667D3 /* Foundation */ = {
+ isa = PBXGroup;
+ children = (
+ 4B68583C12BC1E97005667D3 /* Common */,
+ 4B68584412BC1E97005667D3 /* Containers */,
+ 4B68584812BC1E97005667D3 /* Hash */,
+ 4B68584A12BC1E97005667D3 /* Math */,
+ 4B68585212BC1E97005667D3 /* Memory */,
+ 4B68585812BC1E97005667D3 /* Synchronization */,
+ );
+ path = Foundation;
+ sourceTree = "<group>";
+ };
+ 4B68583C12BC1E97005667D3 /* Common */ = {
+ isa = PBXGroup;
+ children = (
+ 4B68583D12BC1E97005667D3 /* Assert.h */,
+ 4B68583E12BC1E97005667D3 /* Base.h */,
+ 4B68583F12BC1E97005667D3 /* GlobalDefines.h */,
+ 4B68584012BC1E97005667D3 /* GlobalInclude.h */,
+ 4B68584112BC1E97005667D3 /* GlobalTypes.h */,
+ 4B68584212BC1E97005667D3 /* Print.h */,
+ 4B68584312BC1E97005667D3 /* Singleton.h */,
+ );
+ path = Common;
+ sourceTree = "<group>";
+ };
+ 4B68584412BC1E97005667D3 /* Containers */ = {
+ isa = PBXGroup;
+ children = (
+ 4B68584512BC1E97005667D3 /* BitEncoder.h */,
+ 4B68584612BC1E97005667D3 /* LocklessRingBuffer.cpp */,
+ 4B68584712BC1E97005667D3 /* LocklessRingBuffer.h */,
+ );
+ path = Containers;
+ sourceTree = "<group>";
+ };
+ 4B68584812BC1E97005667D3 /* Hash */ = {
+ isa = PBXGroup;
+ children = (
+ 4B68584912BC1E97005667D3 /* DJB2.h */,
+ );
+ path = Hash;
+ sourceTree = "<group>";
+ };
+ 4B68584A12BC1E97005667D3 /* Math */ = {
+ isa = PBXGroup;
+ children = (
+ 4B68584B12BC1E97005667D3 /* MathDefines.h */,
+ 4B68584C12BC1E97005667D3 /* MathInclude.h */,
+ 4B68584D12BC1E97005667D3 /* MathOperations.h */,
+ 4B68584E12BC1E97005667D3 /* MathTypes.h */,
+ 4B68584F12BC1E97005667D3 /* Matrix.h */,
+ 4B68585012BC1E97005667D3 /* Quaternion.h */,
+ 4B68585112BC1E97005667D3 /* Vector.h */,
+ );
+ path = Math;
+ sourceTree = "<group>";
+ };
+ 4B68585212BC1E97005667D3 /* Memory */ = {
+ isa = PBXGroup;
+ children = (
+ 4B68585312BC1E97005667D3 /* MemoryBitset.cpp */,
+ 4B68585412BC1E97005667D3 /* MemoryBitset.h */,
+ 4B68585512BC1E97005667D3 /* MemoryHeap.cpp */,
+ 4B68585612BC1E97005667D3 /* MemoryHeap.h */,
+ 4B68585712BC1E97005667D3 /* MemoryLinear.h */,
+ );
+ path = Memory;
+ sourceTree = "<group>";
+ };
+ 4B68585812BC1E97005667D3 /* Synchronization */ = {
+ isa = PBXGroup;
+ children = (
+ 4B68585912BC1E97005667D3 /* Atomic32Bit.h */,
+ 4B68585A12BC1E97005667D3 /* MemorySync.h */,
+ );
+ path = Synchronization;
+ sourceTree = "<group>";
+ };
+ 4B90648212B41E0800655D84 /* Standard */ = {
+ isa = PBXGroup;
+ children = (
+ 4B90648312B41E6500655D84 /* Standard.vsh */,
+ 4B90648512B426FE00655D84 /* Standard.fsh */,
+ );
+ name = Standard;
+ sourceTree = "<group>";
+ };
+ 4B90648712B4287100655D84 /* GraphicsServices */ = {
+ isa = PBXGroup;
+ children = (
+ 4B90648812B428E900655D84 /* OpenGLServices.h */,
+ );
+ name = GraphicsServices;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 1D6058900D05DD3D006BFB54 /* Littlest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Littlest" */;
+ buildPhases = (
+ 1D60588D0D05DD3D006BFB54 /* Resources */,
+ 1D60588E0D05DD3D006BFB54 /* Sources */,
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Littlest;
+ productName = Littlest;
+ productReference = 1D6058910D05DD3D006BFB54 /* Littlest.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Littlest" */;
+ compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
+ hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 1D6058900D05DD3D006BFB54 /* Littlest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 1D60588D0D05DD3D006BFB54 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2514C27B10084DCA00A42282 /* Shader.fsh in Resources */,
+ 2514C27C10084DCA00A42282 /* Shader.vsh in Resources */,
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
+ 28EC4C5A11D54ECE0027AA9F /* LittlestViewController.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
+ 1D3623260D0F684500981E51 /* LittlestAppDelegate.m in Sources */,
+ 28FD14FE0DC6FC130079059D /* EAGLView.m in Sources */,
+ 28EC4C5911D54ECE0027AA9F /* LittlestViewController.m in Sources */,
+ 4B90648412B41E6500655D84 /* Standard.vsh in Sources */,
+ 4B90648612B426FE00655D84 /* Standard.fsh in Sources */,
+ 4B68585B12BC1E97005667D3 /* LocklessRingBuffer.cpp in Sources */,
+ 4B68585C12BC1E97005667D3 /* MemoryBitset.cpp in Sources */,
+ 4B68585D12BC1E97005667D3 /* MemoryHeap.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1D6058940D05DD3E006BFB54 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Littlest_Prefix.pch;
+ "GCC_THUMB_SUPPORT[arch=armv6]" = "";
+ INFOPLIST_FILE = "Littlest-Info.plist";
+ PRODUCT_NAME = Littlest;
+ };
+ name = Debug;
+ };
+ 1D6058950D05DD3E006BFB54 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Littlest_Prefix.pch;
+ "GCC_THUMB_SUPPORT[arch=armv6]" = "";
+ INFOPLIST_FILE = "Littlest-Info.plist";
+ PRODUCT_NAME = Littlest;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_CHAR_IS_UNSIGNED_CHAR = YES;
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_FAST_MATH = YES;
+ GCC_ONE_BYTE_BOOL = NO;
+ GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_CHAR_IS_UNSIGNED_CHAR = YES;
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_FAST_MATH = YES;
+ GCC_ONE_BYTE_BOOL = NO;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ PREBINDING = NO;
+ SDKROOT = iphoneos;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Littlest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1D6058940D05DD3E006BFB54 /* Debug */,
+ 1D6058950D05DD3E006BFB54 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Littlest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1024</int>
+ <string key="IBDocument.SystemVersion">10F569</string>
+ <string key="IBDocument.InterfaceBuilderVersion">800</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">121</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="371349661">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="184854543">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 460}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="184854543"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="371349661"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="184854543"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>2.CustomClassName</string>
+ <string>2.IBEditorWindowLastContentRect</string>
+ <string>2.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>LittlestViewController</string>
+ <string>UIResponder</string>
+ <string>EAGLView</string>
+ <string>{{401, 662}, {320, 460}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">4</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">EAGLView</string>
+ <string key="superclassName">UIView</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">drawView:</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <string key="NS.key.0">drawView:</string>
+ <object class="IBActionInfo" key="NS.object.0">
+ <string key="name">drawView:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>displayLink</string>
+ <string>renderer</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>displayLink</string>
+ <string>renderer</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">displayLink</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">renderer</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/EAGLView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">LittlestViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="742078473">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="742078473"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1024" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">Untitled.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">121</string>
+ </data>
+</archive>
--- /dev/null
+//
+// Prefix header for all source files of the 'Littlest' target in the 'Littlest' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_3_0
+#warning "This project uses features only available in iPhone SDK 3.0 and later."
+#endif
+
+#ifdef __OBJC__
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+#endif
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1056</int>
+ <string key="IBDocument.SystemVersion">10H542</string>
+ <string key="IBDocument.InterfaceBuilderVersion">804</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">131</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="191355593">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIViewController" id="40278677">
+ <string key="IBUINibName">LittlestViewController</string>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <bool key="IBUIWantsFullScreenLayout">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ <object class="IBUIWindow" id="380026005">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">1316</int>
+ <object class="NSPSMatrix" key="NSFrameMatrix"/>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIVisibleAtLaunch">YES</bool>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="380026005"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">viewController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="40278677"/>
+ </object>
+ <int key="connectionID">12</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="380026005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="191355593"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="40278677"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>10.CustomClassName</string>
+ <string>10.IBEditorWindowLastContentRect</string>
+ <string>10.IBPluginDependency</string>
+ <string>2.IBAttributePlaceholdersKey</string>
+ <string>2.IBEditorWindowLastContentRect</string>
+ <string>2.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <string>LittlestViewController</string>
+ <string>{{415, 586}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <object class="NSMutableDictionary">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <string>{{400, 376}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>LittlestAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">12</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">LittlestAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>LittlestViewController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">viewController</string>
+ <string key="candidateClassName">LittlestViewController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">window</string>
+ <string key="candidateClassName">UIWindow</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/LittlestAppDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">LittlestAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">LittlestViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">displayLink</string>
+ <string key="NS.object.0">id</string>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <string key="NS.key.0">displayLink</string>
+ <object class="IBToOneOutletInfo" key="NS.object.0">
+ <string key="name">displayLink</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/LittlestViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">LittlestViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="212071180">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIApplication</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIResponder</string>
+ <string key="superclassName">NSObject</string>
+ <reference key="sourceIdentifier" ref="212071180"/>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchBar</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UISearchDisplayController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPrintFormatter.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIView</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIViewController</string>
+ <string key="superclassName">UIResponder</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">UIWindow</string>
+ <string key="superclassName">UIView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBFrameworkSource</string>
+ <string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+ <integer value="1056" key="NS.object.0"/>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+ <integer value="3100" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">Littlest.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">131</string>
+ </data>
+</archive>
--- /dev/null
+//
+// Shader.fsh
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+varying lowp vec4 colorVarying;
+
+void main()
+{
+ gl_FragColor = colorVarying;
+}
--- /dev/null
+//
+// Shader.vsh
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+attribute vec4 position;
+attribute vec4 color;
+
+varying vec4 colorVarying;
+
+uniform float translate;
+
+void main()
+{
+ gl_Position = position;
+ gl_Position.y += sin(translate) / 2.0;
+
+ colorVarying = color;
+}
--- /dev/null
+varying mediump vec4 uv01_vary
+varying lowp vec4 color_vary;
+
+void main()
+{
+ gl_FragColor = colorVarying;
+}
--- /dev/null
+attribute vec2 position;
+attribute vec4 color;
+attribute vec2 uv0;
+attribute vec2 uv1;
+
+varying vec4 color_vary;
+varying vec4 uv01_vary;
+
+uniform mat3 modelview_transform;
+
+void main()
+{
+ vec3 pos_2D = modelview_transform * position;
+ gl_Position = vec4(pos_2D.x, pos_2D.y, 1.0f, pos_2D.z); // don't do computataions where we don't need to!
+
+ color_vary = color;
+ uv01_vary = vec4(uv0, uv1);
+}
--- /dev/null
+//
+// main.m
+// Littlest
+//
+// Created by Doris Chen on 12/4/10.
+// Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ [pool release];
+ return retVal;
+}