diff --git a/README b/README new file mode 100644 index 0000000000..a129ab2c3c --- /dev/null +++ b/README @@ -0,0 +1,7 @@ +Boxing balance surface project + +Low latency high FPS display of exact balance point of a standing person, +detected by pressure sensors at corners of a 4' by 4' platform. +Sensors read and processed by Maple ret6 board, sent to MacBook via serial USB. + + diff --git a/SerialInterface.cpp b/SerialInterface.cpp new file mode 100644 index 0000000000..5d96343c77 --- /dev/null +++ b/SerialInterface.cpp @@ -0,0 +1,231 @@ +// +// SerialInterface.cpp +// interface +// +// Created by Seiji Emery on 8/10/12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#include "SerialInterface.h" +#include + +// These includes are for serial port reading/writing +#include +#include +#include + + +// For accessing the serial port +void init_port(int *fd, int baud) +{ + struct termios options; + tcgetattr(*fd,&options); + switch(baud) + { + case 9600: cfsetispeed(&options,B9600); + cfsetospeed(&options,B9600); + break; + case 19200: cfsetispeed(&options,B19200); + cfsetospeed(&options,B19200); + break; + case 38400: cfsetispeed(&options,B38400); + cfsetospeed(&options,B38400); + break; + case 115200: cfsetispeed(&options,B115200); + cfsetospeed(&options,B115200); + break; + default:cfsetispeed(&options,B9600); + cfsetospeed(&options,B9600); + break; + } + options.c_cflag |= (CLOCAL | CREAD); + options.c_cflag &= ~PARENB; + options.c_cflag &= ~CSTOPB; + options.c_cflag &= ~CSIZE; + options.c_cflag |= CS8; + tcsetattr(*fd,TCSANOW,&options); +} + +bool SerialInterface::enable () { + if (!_enabled) { + // Try to re-initialize the interface. + // May fail (if open() fails), in which case an error code is emitted + // (which we can safely ignore), and _enabled is reset to false + initInterface(); + } + return _enabled; +} + +void SerialInterface::disable () { + _enabled = false; + closeInterface(); +} + + +void SerialInterface::closeInterface () { + close(_serial_fd); + _enabled = false; +} + +int SerialInterface::initInterface () { + if (_enabled) { + _serial_fd = open("/dev/tty.usbmodem411", O_RDWR | O_NOCTTY | O_NDELAY); // List usbSerial devices using Terminal ls /dev/tty.* + + if (_serial_fd == -1) { + std::cerr << "Unable to open serial port (" << _serial_fd << ")\n"; + _enabled = false; + return 1; + } else { + init_port(&_serial_fd, 115200); + } + } + return 0; +} + +// Reads data from a serial interface and updates gyro and accelerometer state +// TODO: implement accelerometer +void SerialInterface::readSensors (float deltaTime) { + // Note: changed to use binary format instead of plaintext + // (Changed in balance_maple.pde as well (toggleable)) + + + /* + int lines_read = 0; + const float AVG_RATE = 0.00001; + if (_enabled) + { + char bufchar[1]; + while (read(_serial_fd, bufchar, 1) > 0) + { + serial_buffer[serial_buffer_pos] = bufchar[0]; + serial_buffer_pos++; + // Have we reached end of a line of input? + if ((bufchar[0] == '\n') || (serial_buffer_pos >= MAX_BUFFER)) + { + lines_read++; + // At end - Extract value from string to variables + if (serial_buffer[0] != 'p') + { + samplecount++; + sscanf(serial_buffer, "%d %d %d %d", &adc_channels[0], + &adc_channels[1], + &adc_channels[2], + &adc_channels[3]); + for (int i = 0; i < 4; i++) + { + if (!first_measurement) + avg_adc_channels[i] = (1.f - AVG_RATE)*avg_adc_channels[i] + + AVG_RATE*(float)adc_channels[i]; + else + { + avg_adc_channels[i] = (float)adc_channels[i]; + } + } + } + // Clear rest of string for printing onscreen + while(serial_buffer_pos++ < MAX_BUFFER) serial_buffer[serial_buffer_pos] = ' '; + serial_buffer_pos = 0; + } + if (bufchar[0] == 'p') + { + gettimeofday(&end_ping, NULL); + ping = diffclock(begin_ping,end_ping); + display_ping = 1; + } + } + } + return lines_read; + */ + + + /* + if (_enabled) { + int _channels[CHANNEL_COUNT]; + _channels[0] = _channels[1] = _channels[2] = _channels[3] = 0; + + for (char c; read(_serial_fd, &c, 1) > 0; ) { // Read bytes from serial port + if (_readPacket) { + // load byte into buffer + _buffer[_bufferPos++] = c; + if (_bufferPos > CHANNEL_COUNT * sizeof(int)) { + // if buffer is full: load into channels + for (int i = 0; i < CHANNEL_COUNT; ++i) { + _channels[i] += *((int*)(_buffer + i * sizeof(int))); + } + //memcpy(_channels, _buffer, CHANNEL_COUNT * sizeof(int)); + // And check for next opcode + _readPacket = false; + } + } else { + // read opcode + switch (c) { + case 'd': + _readPacket = true; + _bufferPos = 0; + break; + case 'p': + // TODO: implement pings + break; + } + } + } + + } + */ +} + + + +// Old read_sensors() +/* +// Collect sensor data from serial port +void read_sensors(void) +{ + + if (serial_on) + { + char bufchar[1]; + while (read(serial_fd, bufchar, 1) > 0) + { + serial_buffer[serial__bufferpos] = bufchar[0]; + serial__bufferpos++; + // Have we reached end of a line of input? + if ((bufchar[0] == '\n') || (serial__bufferpos >= MAX_BUFFER)) + { + // At end - Extract value from string to variables + if (serial_buffer[0] != 'p') + { + samplecount++; + sscanf(serial_buffer, "%d %d %d %d", &adc_channels[0], + &adc_channels[1], + &adc_channels[2], + &adc_channels[3]); + for (int i = 0; i < 4; i++) + { + if (!first_measurement) + avg_adc_channels[i] = (1.f - AVG_RATE)*avg_adc_channels[i] + + AVG_RATE*(float)adc_channels[i]; + else + { + avg_adc_channels[i] = (float)adc_channels[i]; + } + } + first_measurement = 0; + } + // Clear rest of string for printing onscreen + while(serial__bufferpos++ < MAX_BUFFER) serial_buffer[serial__bufferpos] = ' '; + serial__bufferpos = 0; + } + if (bufchar[0] == 'p') + { + gettimeofday(&end_ping, NULL); + ping = diffclock(begin_ping,end_ping); + display_ping = 1; + } + } + } +} + + + +*/ \ No newline at end of file diff --git a/SerialInterface.h b/SerialInterface.h new file mode 100644 index 0000000000..d560043183 --- /dev/null +++ b/SerialInterface.h @@ -0,0 +1,64 @@ +// +// SerialInterface.h +// interface +// +// Created by Seiji Emery on 8/10/12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#ifndef interface_SerialInterface_h +#define interface_SerialInterface_h + +void init_port (int *fd, int baud); + +const int CHANNEL_COUNT = 4; + +class SerialInterface { + int _serial_fd; // internal device id + bool _enabled; // Enables/disables serial i/o + // Disabled by default if open() fails + + // Internal persistant state for readSensors() + char _buffer [CHANNEL_COUNT * sizeof(int)]; + int _bufferPos; // = 0; + bool _readPacket; + + // Try to open the serial port. On failure, disable the interface internally, write + // error message to cerr, and return non-zero error code (which can be ignored). + // Called by constructor and enable(). + int initInterface(); + + // Close the serial port. + // Called by deconstructor and disable(). + void closeInterface(); + +public: + SerialInterface() + : _enabled(true), + _bufferPos(0), + _readPacket(false) + { + initInterface(); + } + ~SerialInterface() { + closeInterface(); + } + + // Try to reinitialize the interface. + // If already enabled, do nothing. + // If reinitialization fails return false; otherwise return true. + bool enable(); + + // Disable the interface. + void disable(); + + bool isEnabled () { return _enabled; } + + // Updates gyro using serial input. + // Reads data from serial port into _buffer and accumulates that into _channels. + // Uses delta time and _channel input to update gyro yaw, pitch, and roll + void readSensors (float deltaTime); +}; + + +#endif diff --git a/audio.cpp b/audio.cpp new file mode 100644 index 0000000000..c05d98ce1d --- /dev/null +++ b/audio.cpp @@ -0,0 +1,243 @@ + // + // audio.cpp + // interface + // + // Created by Seiji Emery on 9/2/12. + // Copyright (c) 2012 __MyCompanyName__. All rights reserved. + // + +#include +#include +#include +#include "audio.h" + + // static member definitions + // (required – will cause linker errors if left out...): +bool Audio::initialized; +Audio::AudioData *Audio::data; +PaStream *Audio::stream; +PaError Audio::err; +float Audio::AudioData::inputGain; + +int audioCallback (const void *inputBuffer, + void *outputBuffer, + unsigned long frames, + const PaStreamCallbackTimeInfo *timeInfo, + PaStreamCallbackFlags statusFlags, + void *userData) +{ + Audio::AudioData *data = (Audio::AudioData*)userData; + float *input = (float*)inputBuffer; + float *output = (float*)outputBuffer; + + if (input != NULL) { + // combine input into data buffer + + // temp variables (frames and bufferPos need to remain untouched so they can be used in the second block of code) + unsigned int f = (unsigned int)frames, + p = data->bufferPos; + for (; p < data->bufferLength && f > 0; --f, ++p) { + data->buffer[p].l += (*input++) * data->inputGain; + data->buffer[p].r += (*input++) * data->inputGain; + } + if (f > 0) { + // handle data->buffer wraparound + for (p = 0; f > 0; --f, ++p) { + data->buffer[p].l += (*input++) * data->inputGain; + data->buffer[p].r += (*input++) * data->inputGain; + } + } + } + + // Write data->buffer into outputBuffer + if (data->bufferPos + frames >= data->bufferLength) { + // wraparound: write first section (end of buffer) first + + // note: buffer is just an array of a struct of floats, so it can be typecast to float* + memcpy(output, (float*)(data->buffer + data->bufferPos), // write data buffer + (data->bufferLength - data->bufferPos) * 2 * sizeof(float)); + memset((float*)(data->buffer + data->bufferPos), 0, // clear data buffer + (data->bufferLength - data->bufferPos) * 2 * sizeof(float)); + frames -= (data->bufferLength - data->bufferPos); // adjust frames to be written + data->bufferPos = 0; // reset position to start + } + + memcpy(output, (float*)(data->buffer + data->bufferPos), // write data buffer + frames * 2 * sizeof(float)); + memset((float*)(data->buffer + data->bufferPos), 0, // clear data buffer + frames * 2 * sizeof(float)); + data->bufferPos += frames; // update position + + return paContinue; +} + +/* + ** Initializes portaudio, and creates and starts an audio stream. + */ +void Audio::init() +{ + initialized = true; + + data = new AudioData(); + + err = Pa_Initialize(); + if (err != paNoError) goto error; + + err = Pa_OpenDefaultStream(&stream, + 2, // input channels + 2, // output channels + paFloat32, // sample format + 44100, // sample rate + 256, // frames per buffer + audioCallback, // callback function + (void*)data); // user data to be passed to callback + if (err != paNoError) goto error; + + err = Pa_StartStream(stream); + if (err != paNoError) goto error; + + return; +error: + fprintf(stderr, "-- Failed to initialize portaudio --\n"); + fprintf(stderr, "PortAudio error (%d): %s\n", err, Pa_GetErrorText(err)); + exit(err); // replace w/ return value error code? +} + +/* + ** Closes the running audio stream, and deinitializes portaudio. + */ +void Audio::terminate () +{ + if (!initialized) return; + initialized = false; + // err = Pa_StopStream(stream); + // if (err != paNoError) goto error; + + err = Pa_CloseStream(stream); + if (err != paNoError) goto error; + + delete data; + + err = Pa_Terminate(); + if (err != paNoError) goto error; + + return; +error: + fprintf(stderr, "-- portaudio termination error --\n"); + fprintf(stderr, "PortAudio error (%d): %s\n", err, Pa_GetErrorText(err)); + exit(err); +} + +void Audio::writeAudio (unsigned int offset, unsigned int length, float *left, float *right) { + if (length > data->bufferLength) { + fprintf(stderr, "Audio::writeAudio length exceeded (%d). Truncating to %d.\n", length, data->bufferLength); + length = data->bufferLength; + } + unsigned int p = data->bufferPos + offset; + if (p > data->bufferLength) + p -= data->bufferLength; + for (; p < data->bufferLength && length > 0; --length, ++p) { + data->buffer[p].l = *left++; + data->buffer[p].r = *right++; + } + if (length > 0) { + p = 0; + for (; length > 0; --length, ++p) { + data->buffer[p].l = *left++; + data->buffer[p].r = *right++; + } + } +} + +void Audio::writeTone (unsigned int offset, unsigned int length, float left, float right) { + if (length > data->bufferLength) { + fprintf(stderr, "Audio::writeTone length exceeded (%d). Truncating to %d.\n", length, data->bufferLength); + length = data->bufferLength; + } + unsigned int p = data->bufferPos + offset; + if (p > data->bufferLength) + p -= data->bufferLength; + for (; p < data->bufferLength && length > 0; --length, ++p) { + data->buffer[p].l = left; + data->buffer[p].r = right; + } + if (length > 0) { + p = 0; + for (; length > 0; --length, ++p) { + data->buffer[p].l = left; + data->buffer[p].r = right; + } + } +} + +void Audio::addAudio (unsigned int offset, unsigned int length, float *left, float *right) { + if (length > data->bufferLength) { + fprintf(stderr, "Audio::addAudio length exceeded (%d). Truncating to %d.\n", length, data->bufferLength); + length = data->bufferLength; + } + unsigned int p = data->bufferPos + offset; + if (p > data->bufferLength) + p -= data->bufferLength; + for (; p < data->bufferLength && length > 0; --length, ++p) { + data->buffer[p].l += *left++; + data->buffer[p].r += *right++; + } + if (length > 0) { + p = 0; + for (; length > 0; --length, ++p) { + data->buffer[p].l += *left++; + data->buffer[p].r += *right++; + } + } +} + +void Audio::addTone (unsigned int offset, unsigned int length, float left, float right) { + if (length > data->bufferLength) { + fprintf(stderr, "Audio::writeTone length exceeded (%d). Truncating to %d.\n", length, data->bufferLength); + length = data->bufferLength; + } + unsigned int p = data->bufferPos + offset; + if (p > data->bufferLength) + p -= data->bufferLength; + for (; p < data->bufferLength && length > 0; --length, ++p) { + data->buffer[p].l += left; + data->buffer[p].r += right; + } + if (length > 0) { + p = 0; + for (; length > 0; --length, ++p) { + data->buffer[p].l += left; + data->buffer[p].r += right; + } + } +} + +void Audio::clearAudio(unsigned int offset, unsigned int length) { + if (length > data->bufferLength) { + fprintf(stderr, "Audio::clearAudio length exceeded (%d). Truncating to %d.\n", length, data->bufferLength); + length = data->bufferLength; + } + unsigned int p = data->bufferPos + offset; + if (p > data->bufferLength) + p -= data->bufferLength; + if (length + p < data->bufferLength) { + memset((float*)(data->buffer + p), 0, + sizeof(float) * 2 * length); + } else { + memset((float*)(data->buffer + p), 0, + sizeof(float) * 2 * (data->bufferLength - p)); + memset((float*)(data->buffer + p), 0, + sizeof(float) * 2 * (data->bufferLength + p - data->bufferLength)); + } +} + + + + + + + + + + + diff --git a/audio.h b/audio.h new file mode 100644 index 0000000000..2daa5abd94 --- /dev/null +++ b/audio.h @@ -0,0 +1,74 @@ + // + // audio.h + // interface + // + // Created by Seiji Emery on 9/2/12. + // Copyright (c) 2012 __MyCompanyName__. All rights reserved. + // + +#ifndef interface_audio_h +#define interface_audio_h + +#include "portaudio.h" + +typedef short sample_t; + +int audioCallback (const void *inputBuffer, + void *outputBuffer, + unsigned long framesPerBuffer, + const PaStreamCallbackTimeInfo *timeInfo, + PaStreamCallbackFlags statusFlags, + void *userData); + +/* + ** TODO: Docs + */ +class Audio { +public: + static void init (); + static void terminate (); + + // Audio values clamped betewen -1.0f and 1.0f + static void writeAudio (unsigned int offset, unsigned int length, float *left, float *right); + static void addAudio (unsigned int offset, unsigned int length, float *left, float *right); + static void writeTone (unsigned int offset, unsigned int length, float left, float right); + static void addTone (unsigned int offset, unsigned int length, float left, float right); + static void clearAudio (unsigned int offset, unsigned int length); + + static void setInputGain (float gain) { + data->inputGain = gain; + } + +private: + static bool initialized; + + static struct AudioData { + struct BufferFrame{ + float l, r; + } *buffer; + const static unsigned int bufferLength = 1000; + unsigned int bufferPos; + static float inputGain;// = 1.f; + + AudioData () : bufferPos(0) { + inputGain = 1.0f; + buffer = new BufferFrame[bufferLength]; + for (unsigned int i = 0; i < bufferLength; ++i) { + buffer[i].l = buffer[i].r = 0; + } + } + ~AudioData () { + delete[] buffer; + } + + }*data; + static PaStream *stream; + static PaError err; + + Audio (); // prevent instantiation (private constructor) + + + friend int audioCallback (const void*, void*, unsigned long, const PaStreamCallbackTimeInfo*, PaStreamCallbackFlags, void*); +}; + +#endif diff --git a/balance_maple/balance_maple.pde b/balance_maple/balance_maple.pde new file mode 100644 index 0000000000..5bbce8f9ac --- /dev/null +++ b/balance_maple/balance_maple.pde @@ -0,0 +1,96 @@ +/* + Balance Platform code for Maple ret6 + + Read a number of piezo pressure sensors at analog inputs and send data to PC + +*/ + +const int inputPinX = 0; +const int inputPinY = 1; +const int inputPinZ = 2; +const int inputPinW = 3; + +int pingRcvd = 0; + +int corners[4]; +int baseline[4]; + +float accum[4]; + +int sampleCount = 0; +const int NUM_SAMPLES=100; + +const int debug = 1; + +unsigned int time; + +char readBuffer[100]; + +void setup() +{ + pinMode(inputPinX, INPUT_ANALOG); + pinMode(inputPinY, INPUT_ANALOG); + pinMode(inputPinZ, INPUT_ANALOG); + pinMode(inputPinW, INPUT_ANALOG); + pinMode(BOARD_LED_PIN, OUTPUT); + + corners[0] = corners[1] = corners[2] = corners[3] = 0; + accum[0] = accum[1] = accum[2] = accum[3] = 0.f; + + baseline[0] = analogRead(inputPinX); + baseline[1] = analogRead(inputPinY); + baseline[2] = analogRead(inputPinZ); +} + +void loop() +{ + sampleCount++; + // Read the instantaneous value of the pressure sensors, average over last 10 samples + accum[0] += analogRead(inputPinX); + accum[1] += analogRead(inputPinY); + accum[2] += analogRead(inputPinZ); + accum[3] += analogRead(inputPinW); + //accum[2] += analogRead(inputPinZ); + //corners[0] = accum[0]; + //corners[1] = accum[1]; + //corners[2] = accum[2]; + + // Periodically send averaged value to the PC + // Print out the instantaneous deviation from the trailing average + if (sampleCount % NUM_SAMPLES == 0) + { + corners[0] = accum[0] / NUM_SAMPLES; + corners[1] = accum[1] / NUM_SAMPLES; + corners[2] = accum[2] / NUM_SAMPLES; + corners[3] = accum[3] / NUM_SAMPLES; + //corners[3] = accum[3] / NUM_SAMPLES; + accum[0] = accum[1] = accum[2] = accum[3] = 0.f; + + if (debug) + { + //SerialUSB.print("Measured = "); + SerialUSB.print(corners[0]); + SerialUSB.print(" "); + SerialUSB.print(corners[1]); + SerialUSB.print(" "); + SerialUSB.print(corners[2]); + SerialUSB.print(" "); + SerialUSB.print(corners[3]); + SerialUSB.println(""); + } + } + pingRcvd = 0; + while (SerialUSB.available() > 0) + { + pingRcvd = 1; + readBuffer[0] = SerialUSB.read(); + } + if (pingRcvd == 1) + { + SerialUSB.println("pong"); + toggleLED(); + } +} + + + diff --git a/build/.DS_Store b/build/.DS_Store new file mode 100644 index 0000000000..405df91202 Binary files /dev/null and b/build/.DS_Store differ diff --git a/build/Debug/automata6 b/build/Debug/automata6 new file mode 100755 index 0000000000..71f7c1e238 Binary files /dev/null and b/build/Debug/automata6 differ diff --git a/build/Debug/junk.txt b/build/Debug/junk.txt new file mode 100644 index 0000000000..d5100b06df --- /dev/null +++ b/build/Debug/junk.txt @@ -0,0 +1,3 @@ +blah blah blah +Philip is a weenie + diff --git a/build/Debug/test_c_plus b/build/Debug/test_c_plus new file mode 100755 index 0000000000..6855169b88 Binary files /dev/null and b/build/Debug/test_c_plus differ diff --git a/build/Release/.DS_Store b/build/Release/.DS_Store new file mode 100644 index 0000000000..15f3953713 Binary files /dev/null and b/build/Release/.DS_Store differ diff --git a/build/Release/automata6 b/build/Release/automata6 new file mode 100755 index 0000000000..00213ffddf Binary files /dev/null and b/build/Release/automata6 differ diff --git a/build/Release/automata6.dSYM/Contents/Info.plist b/build/Release/automata6.dSYM/Contents/Info.plist new file mode 100644 index 0000000000..bf4d111a3d --- /dev/null +++ b/build/Release/automata6.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.automata6 + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/build/Release/automata6.dSYM/Contents/Resources/DWARF/automata6 b/build/Release/automata6.dSYM/Contents/Resources/DWARF/automata6 new file mode 100644 index 0000000000..65b36431c6 Binary files /dev/null and b/build/Release/automata6.dSYM/Contents/Resources/DWARF/automata6 differ diff --git a/build/Release/automata7 b/build/Release/automata7 new file mode 100755 index 0000000000..2c049ab953 Binary files /dev/null and b/build/Release/automata7 differ diff --git a/build/Release/automata7.dSYM/Contents/Info.plist b/build/Release/automata7.dSYM/Contents/Info.plist new file mode 100644 index 0000000000..752c04d47a --- /dev/null +++ b/build/Release/automata7.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.automata7 + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/build/Release/automata7.dSYM/Contents/Resources/DWARF/automata7 b/build/Release/automata7.dSYM/Contents/Resources/DWARF/automata7 new file mode 100644 index 0000000000..09d519e407 Binary files /dev/null and b/build/Release/automata7.dSYM/Contents/Resources/DWARF/automata7 differ diff --git a/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/automata6.LinkFileList b/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/automata6.LinkFileList new file mode 100644 index 0000000000..b8a9847ab9 --- /dev/null +++ b/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/automata6.LinkFileList @@ -0,0 +1 @@ +/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o diff --git a/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o b/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o new file mode 100644 index 0000000000..6b2dfc9c91 Binary files /dev/null and b/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o differ diff --git a/build/automata6.build/Debug/automata6.build/automata6-all-target-headers.hmap b/build/automata6.build/Debug/automata6.build/automata6-all-target-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata6.build/Debug/automata6.build/automata6-all-target-headers.hmap differ diff --git a/build/automata6.build/Debug/automata6.build/automata6-generated-files.hmap b/build/automata6.build/Debug/automata6.build/automata6-generated-files.hmap new file mode 100644 index 0000000000..dd8b535d60 Binary files /dev/null and b/build/automata6.build/Debug/automata6.build/automata6-generated-files.hmap differ diff --git a/build/automata6.build/Debug/automata6.build/automata6-own-target-headers.hmap b/build/automata6.build/Debug/automata6.build/automata6-own-target-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata6.build/Debug/automata6.build/automata6-own-target-headers.hmap differ diff --git a/build/automata6.build/Debug/automata6.build/automata6-project-headers.hmap b/build/automata6.build/Debug/automata6.build/automata6-project-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata6.build/Debug/automata6.build/automata6-project-headers.hmap differ diff --git a/build/automata6.build/Debug/automata6.build/automata6.dep b/build/automata6.build/Debug/automata6.build/automata6.dep new file mode 100644 index 0000000000..2bb3c7901d --- /dev/null +++ b/build/automata6.build/Debug/automata6.build/automata6.dep @@ -0,0 +1,2 @@ +000000000070e2100000000000001dee f2e6d648fa53a608fdd4d42f67ad2db6 ffffffffffffffffffffffffffffffff 99708 /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o +f2e6d648b0a188d3fdd4d42f67b32aa6 be93829766c551603abdbc16216bcb6b ffffffffffffffffffffffffffffffff 25472 /Users/philip/Desktop/test_c_plus/build/Debug/automata6 diff --git a/build/automata6.build/Debug/automata6.build/automata6.hmap b/build/automata6.build/Debug/automata6.build/automata6.hmap new file mode 100644 index 0000000000..dc511c473b Binary files /dev/null and b/build/automata6.build/Debug/automata6.build/automata6.hmap differ diff --git a/build/automata6.build/Debug/automata6.build/automata6~.dep b/build/automata6.build/Debug/automata6.build/automata6~.dep new file mode 100644 index 0000000000..bdc50b3406 --- /dev/null +++ b/build/automata6.build/Debug/automata6.build/automata6~.dep @@ -0,0 +1,2 @@ +f2e6d648b0d62bacfdd4d42f67b32efb be93829766c551603abdbc16216bcb6b ffffffffffffffffffffffffffffffff 25232 /Users/philip/Desktop/test_c_plus/build/Debug/automata6 +000000000052eefc00000000000019b3 f2e6d648fa53a608fdd4d42f67ad2db6 ffffffffffffffffffffffffffffffff 98180 /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o diff --git a/build/automata6.build/Debug/automata6.build/build-state.dat b/build/automata6.build/Debug/automata6.build/build-state.dat new file mode 100644 index 0000000000..947f76f035 --- /dev/null +++ b/build/automata6.build/Debug/automata6.build/build-state.dat @@ -0,0 +1,108 @@ +Tautomata6 +v7 +r0 +t325212964.225906 +cCheck dependencies +cCompileC build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/test_c_plus/build/Debug/automata6 normal x86_64 + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004CAA740B00000000000000EE +t1286239243 +s238 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/GLUT.framework/Headers/glut.h +c000000004C23CCCC000000000000578C +t1277414604 +s22412 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/math.h +c000000004A5C14A000000000000004F1 +t1247548576 +s1265 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdio.h +c000000004BBD2CE90000000000004174 +t1270689001 +s16756 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdlib.h +c000000004BBD2CE90000000000002DF5 +t1270689001 +s11765 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h +c000000004BBD2CE90000000000001731 +t1270689001 +s5937 + +N/System/Library/Frameworks/GLUT.framework/GLUT +c000000004B5FAB1A00000000001A2920 +t1264560922 +s1714464 + +N/System/Library/Frameworks/OpenGL.framework/OpenGL +c000000004D7713DA0000000000043330 +t1299649498 +s275248 + +N/Users/philip/Desktop/test_c_plus/build/Debug/automata6 +t1303519236 +s25472 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/automata6.LinkFileList +c000000004D901AEB000000000000006B +t1301289707 +s107 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o +t1303519236 +s99708 + +N/Users/philip/Desktop/test_c_plus/main.cpp +c000000004DB216950000000000003523 +t1303516821 +s13603 +i +i +i +i +i +i +i +i +i +i + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies325212964#325212964#0(0"0(0#1#0"8605789600#0"0# + +CCompileC build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +s325212036.060392 +e325212036.492859 +r1 +xCompileC +xbuild/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xx86_64 +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/test_c_plus/main.cpp:401: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/test_c_plus/main.cpp:412: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp:414: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp325212036#325212036#0(490"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:401: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': /Users/philip/Desktop/test_c_plus/main.cpp:412: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp:414: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'325212036#80#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#401#0#401#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'325212036#268#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#412#0#412#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'325212036#379#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#414#0#414#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8605465536#1272" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -mfix-and-continue -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/automata6-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/automata6-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/automata6-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/automata6-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Debug -I/Users/philip/Desktop/test_c_plus/build/Debug/include -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/DerivedSources/x86_64 -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o 0# + +CLd /Users/philip/Desktop/test_c_plus/build/Debug/automata6 normal x86_64 +s325212036.492944 +e325212036.513658 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/Debug/automata6 +xnormal +xx86_64 +lSLF07#2@60"Link /Users/philip/Desktop/test_c_plus/build/Debug/automata6325212036#325212036#0(0"0(0#0#0"8606088000#515" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Debug -F/Users/philip/Desktop/test_c_plus/build/Debug -filelist /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/Debug/automata6 0# + diff --git a/build/automata6.build/Debug/automata6.build/build-state~.dat b/build/automata6.build/Debug/automata6.build/build-state~.dat new file mode 100644 index 0000000000..0ddc2143e8 --- /dev/null +++ b/build/automata6.build/Debug/automata6.build/build-state~.dat @@ -0,0 +1,111 @@ +Tautomata6 +v7 +r0 +t322982507.904974 +cCheck dependencies +cCompileC build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/test_c_plus/build/Debug/automata6 normal x86_64 + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004CAA740B00000000000000EE +t1286239243 +s238 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/GLUT.framework/Headers/glut.h +c000000004C23CCCC000000000000578C +t1277414604 +s22412 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/math.h +c000000004A5C14A000000000000004F1 +t1247548576 +s1265 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdio.h +c000000004BBD2CE90000000000004174 +t1270689001 +s16756 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdlib.h +c000000004BBD2CE90000000000002DF5 +t1270689001 +s11765 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h +c000000004BBD2CE90000000000001731 +t1270689001 +s5937 + +N/System/Library/Frameworks/GLUT.framework/GLUT +c000000004B5FAB1A00000000001A2920 +t1264560922 +s1714464 + +N/System/Library/Frameworks/OpenGL.framework/OpenGL +c000000004D22BC490000000000043330 +t1294122057 +s275248 + +N/Users/philip/Desktop/test_c_plus/build/Debug/automata6 +t1301289707 +s25232 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/automata6.LinkFileList +c000000004D901AEB000000000000006B +t1301289707 +s107 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o +t1301289707 +s98180 + +N/Users/philip/Desktop/test_c_plus/main.cpp +c000000004D901A79000000000000317E +t1301289593 +s12670 +i +i +i +i +i +i +i +i +i +i + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies322982507#322982507#0(0"0(0#1#0"8612578496#0"0# + +CCompileC build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +s322982507.458512 +e322982507.884903 +r1 +xCompileC +xbuild/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xx86_64 +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void init_cells()': +o/Users/philip/Desktop/test_c_plus/main.cpp:131: warning: unused variable 'centersize' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void update_cells()': +o/Users/philip/Desktop/test_c_plus/main.cpp:165: warning: unused variable 'neighborsum' +o/Users/philip/Desktop/test_c_plus/main.cpp:167: warning: unused variable 'io_char_counter' +o/Users/philip/Desktop/test_c_plus/main.cpp:174: warning: unused variable 'UPDATE_MEMORY_DECAY' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/test_c_plus/main.cpp:361: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp322982507#322982507#0(706"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void init_cells()': /Users/philip/Desktop/test_c_plus/main.cpp:131: warning: unused variable 'centersize' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void update_cells()': /Users/philip/Desktop/test_c_plus/main.cpp:165: warning: unused variable 'neighborsum' /Users/philip/Desktop/test_c_plus/main.cpp:167: warning: unused variable 'io_char_counter' /Users/philip/Desktop/test_c_plus/main.cpp:174: warning: unused variable 'UPDATE_MEMORY_DECAY' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:361: warning: deprecated conversion from string constant to 'char*' 5(22@28"Unused variable 'centersize'322982507#77#86#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#131#0#131#0#19"unused variable '*'0(22@29"Unused variable 'neighborsum'322982507#242#87#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#165#0#165#0#19"unused variable '*'0(22@33"Unused variable 'io_char_counter'322982507#329#91#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#167#0#167#0#19"unused variable '*'0(22@37"Unused variable 'UPDATE_MEMORY_DECAY'322982507#420#95#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#174#0#174#0#19"unused variable '*'0(22@53"Deprecated conversion from string constant to 'char*'322982507#595#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#361#0#361#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8611293184#1272" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -mfix-and-continue -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/automata6-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/automata6-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/automata6-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/automata6-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Debug -I/Users/philip/Desktop/test_c_plus/build/Debug/include -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/DerivedSources/x86_64 -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/main.o 0# + +CLd /Users/philip/Desktop/test_c_plus/build/Debug/automata6 normal x86_64 +s322982507.885011 +e322982507.904926 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/Debug/automata6 +xnormal +xx86_64 +lSLF07#2@60"Link /Users/philip/Desktop/test_c_plus/build/Debug/automata6322982507#322982507#0(0"0(0#0#0"8611887200#515" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Debug -F/Users/philip/Desktop/test_c_plus/build/Debug -filelist /Users/philip/Desktop/test_c_plus/build/automata6.build/Debug/automata6.build/Objects-normal/x86_64/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/Debug/automata6 0# + diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 b/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 new file mode 100755 index 0000000000..a0758ab756 Binary files /dev/null and b/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 differ diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList b/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList new file mode 100644 index 0000000000..f305574ead --- /dev/null +++ b/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList @@ -0,0 +1 @@ +/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o b/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o new file mode 100644 index 0000000000..b3f4e68c1c Binary files /dev/null and b/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o differ diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 b/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 new file mode 100755 index 0000000000..f3fa338ad6 Binary files /dev/null and b/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 differ diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList b/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList new file mode 100644 index 0000000000..301295190b --- /dev/null +++ b/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList @@ -0,0 +1 @@ +/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o b/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o new file mode 100644 index 0000000000..87004058af Binary files /dev/null and b/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o differ diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 b/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 new file mode 100755 index 0000000000..e9ddef43c8 Binary files /dev/null and b/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 differ diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList b/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList new file mode 100644 index 0000000000..1cfd54044c --- /dev/null +++ b/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList @@ -0,0 +1 @@ +/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o diff --git a/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o b/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o new file mode 100644 index 0000000000..94e7c2a630 Binary files /dev/null and b/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o differ diff --git a/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap b/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap differ diff --git a/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap b/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap new file mode 100644 index 0000000000..dd8b535d60 Binary files /dev/null and b/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap differ diff --git a/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap b/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap differ diff --git a/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap b/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap differ diff --git a/build/automata6.build/Release/automata6.build/automata6.dep b/build/automata6.build/Release/automata6.build/automata6.dep new file mode 100644 index 0000000000..09c5ac75b8 --- /dev/null +++ b/build/automata6.build/Release/automata6.build/automata6.dep @@ -0,0 +1,16 @@ +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 105476 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 100184 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 105132 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +00000000000000000000000000000000 d8add73606ccbc4d815f460ac9e84903 ffffffffffffffffffffffffffffffff 102 /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6.dSYM +65c4b152c0d828b38da52ff20bbe7080 1a5b4231140b88802ee1dee0e007d8ff ffffffffffffffffffffffffffffffff 71272 /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 +a35a6ceaef6e85867b8c2045d24761d1 c7c1c795286a6bef9492a1301dbaf1ea ffffffffffffffffffffffffffffffff 22120 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +8f643bb7574536e8cda8974487e8318b 3af6063a2af0fa1345ea0ff0083c409e ffffffffffffffffffffffffffffffff 19596 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +9d0ced60c56f699e0e1edd1b5a8ca9c9 29c1cac0bf0663bfe4e7eb28111b3867 ffffffffffffffffffffffffffffffff 24544 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +000000000015f9ca0000000000001ece 37116946c6c1af292497fd4fda2efdc1 ffffffffffffffffffffffffffffffff 105476 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +000000000015f9ca0000000000001ece d754e235ca464465c3c2d339726fb394 ffffffffffffffffffffffffffffffff 100184 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +000000000015f9ca0000000000001ece dc5fa72143e5c64ac997c8eafa56c016 ffffffffffffffffffffffffffffffff 105132 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +00000000000000000000000000000000 d8c56ede45789364d976a2b1e21d68f5 ffffffffffffffffffffffffffffffff 102 /Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM +edb73db0cda822287152d50d3d625065 faa6ca067b2cb1ee97e89c815125fdbe ffffffffffffffffffffffffffffffff 71264 /Users/philip/Desktop/test_c_plus/build/Release/automata6 +371169468f0906582497fd4fda30f9a1 c74bc30de7dd61880616e520aa027b2c ffffffffffffffffffffffffffffffff 22112 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +d754e235838eed14c3c2d3397271b7f4 39b810ca89510d7930e25f6604689a03 ffffffffffffffffffffffffffffffff 19588 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +dc5fa7210a2d6f3bc997c8eafa48c476 2f5ec225a58ecaae696489d7c1013b69 ffffffffffffffffffffffffffffffff 24536 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 diff --git a/build/automata6.build/Release/automata6.build/automata6.hmap b/build/automata6.build/Release/automata6.build/automata6.hmap new file mode 100644 index 0000000000..dc511c473b Binary files /dev/null and b/build/automata6.build/Release/automata6.build/automata6.hmap differ diff --git a/build/automata6.build/Release/automata6.build/automata6~.dep b/build/automata6.build/Release/automata6.build/automata6~.dep new file mode 100644 index 0000000000..2753ad39c1 --- /dev/null +++ b/build/automata6.build/Release/automata6.build/automata6~.dep @@ -0,0 +1,8 @@ +00000000000000000000000000000000 d8c56ede45789364d976a2b1e21d68f5 ffffffffffffffffffffffffffffffff 102 /Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM +edb73db0ce92a5827152d50d3d625315 faa6ca067b2cb1ee97e89c815125fdbe ffffffffffffffffffffffffffffffff 71104 /Users/philip/Desktop/test_c_plus/build/Release/automata6 +371169468c3381f22497fd4fda30fad1 c74bc30de7dd61880616e520aa027b2c ffffffffffffffffffffffffffffffff 21952 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +d754e23580b46abec3c2d3397271b484 39b810ca89510d7930e25f6604689a03 ffffffffffffffffffffffffffffffff 19408 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +dc5fa7210917e891c997c8eafa48c706 2f5ec225a58ecaae696489d7c1013b69 ffffffffffffffffffffffffffffffff 24312 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +000000000070e2100000000000001dee 37116946c6c1af292497fd4fda2efdc1 ffffffffffffffffffffffffffffffff 103740 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +000000000070e2100000000000001dee d754e235ca464465c3c2d339726fb394 ffffffffffffffffffffffffffffffff 98868 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +000000000070e2100000000000001dee dc5fa72143e5c64ac997c8eafa56c016 ffffffffffffffffffffffffffffffff 103624 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o diff --git a/build/automata6.build/Release/automata6.build/automata7.dep b/build/automata6.build/Release/automata6.build/automata7.dep new file mode 100644 index 0000000000..a78341782b --- /dev/null +++ b/build/automata6.build/Release/automata6.build/automata7.dep @@ -0,0 +1,24 @@ +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 105476 /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 100184 /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 105132 /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 102 /Users/philip/Desktop/automata/Automata7/build/Release/automata6.dSYM +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 71272 /Users/philip/Desktop/automata/Automata7/build/Release/automata6 +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 22120 /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 19596 /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 24544 /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 105476 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 100184 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffff 105132 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +00000000000000000000000000000000 d8add73606ccbc4d815f460ac9e84903 ffffffffffffffffffffffffffffffff 102 /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6.dSYM +65c4b152c0d828b38da52ff20bbe7080 1a5b4231140b88802ee1dee0e007d8ff ffffffffffffffffffffffffffffffff 71272 /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 +a35a6ceaef6e85867b8c2045d24761d1 c7c1c795286a6bef9492a1301dbaf1ea ffffffffffffffffffffffffffffffff 22120 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +8f643bb7574536e8cda8974487e8318b 3af6063a2af0fa1345ea0ff0083c409e ffffffffffffffffffffffffffffffff 19596 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +9d0ced60c56f699e0e1edd1b5a8ca9c9 29c1cac0bf0663bfe4e7eb28111b3867 ffffffffffffffffffffffffffffffff 24544 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +000000000015f9ca0000000000001ece 37116946c6c1af292497fd4fda2efdc1 ffffffffffffffffffffffffffffffff 105476 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +000000000015f9ca0000000000001ece d754e235ca464465c3c2d339726fb394 ffffffffffffffffffffffffffffffff 100184 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +000000000015f9ca0000000000001ece dc5fa72143e5c64ac997c8eafa56c016 ffffffffffffffffffffffffffffffff 105132 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +00000000000000000000000000000000 d8c56ede45789364d976a2b1e21d68f5 ffffffffffffffffffffffffffffffff 102 /Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM +edb73db0cda822287152d50d3d625065 faa6ca067b2cb1ee97e89c815125fdbe ffffffffffffffffffffffffffffffff 71264 /Users/philip/Desktop/test_c_plus/build/Release/automata6 +371169468f0906582497fd4fda30f9a1 c74bc30de7dd61880616e520aa027b2c ffffffffffffffffffffffffffffffff 22112 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +d754e235838eed14c3c2d3397271b7f4 39b810ca89510d7930e25f6604689a03 ffffffffffffffffffffffffffffffff 19588 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +dc5fa7210a2d6f3bc997c8eafa48c476 2f5ec225a58ecaae696489d7c1013b69 ffffffffffffffffffffffffffffffff 24536 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 diff --git a/build/automata6.build/Release/automata6.build/build-state.dat b/build/automata6.build/Release/automata6.build/build-state.dat new file mode 100644 index 0000000000..c86b1c4af4 --- /dev/null +++ b/build/automata6.build/Release/automata6.build/build-state.dat @@ -0,0 +1,429 @@ +Tautomata6 +v7 +r0 +t348473925.833389 +cCheck dependencies +cCompileC build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/automata/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 normal x86_64 +cCompileC build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o /Users/philip/Desktop/automata/test_c_plus/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 normal i386 +cCompileC build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o /Users/philip/Desktop/automata/test_c_plus/main.cpp normal ppc c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 normal ppc +cCreateUniversalBinary /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 normal "x86_64 i386 ppc" +cGenerateDSYMFile /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6.dSYM /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004CAA740B00000000000000EE +t1286239243 +s238 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/GLUT.framework/Headers/glut.h +c000000004C23CCCC000000000000578C +t1277414604 +s22412 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/math.h +c000000004A5C14A000000000000004F1 +t1247548576 +s1265 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdio.h +c000000004BBD2CE90000000000004174 +t1270689001 +s16756 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdlib.h +c000000004BBD2CE90000000000002DF5 +t1270689001 +s11765 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h +c000000004BBD2CE90000000000001731 +t1270689001 +s5937 + +N/System/Library/Frameworks/GLUT.framework/GLUT +c000000004B5FAB1A00000000001A2920 +t1264560922 +s1714464 + +N/System/Library/Frameworks/OpenGL.framework/OpenGL +c000000004E288FAA0000000000043360 +t1311281066 +s275296 + +N/Users/philip/Desktop/automata/Automata7/build/Release/automata6 +t1323458780 +s71272 + +N/Users/philip/Desktop/automata/Automata7/build/Release/automata6.dSYM +t1323458780 +s102 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +t1323458779 +s19596 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList +c000000004EE260DA0000000000000074 +t1323458778 +s116 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +t1305939280 +s100184 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +t1323458780 +s22120 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList +c000000004EE260DA0000000000000073 +t1323458778 +s115 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +t1305939281 +s105476 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +t1323458779 +s24544 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList +c000000004EE260DA0000000000000076 +t1323458778 +s118 + +N/Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +t1305939280 +s105132 + +N/Users/philip/Desktop/automata/Automata7/main.cpp +c000000004DD70D4F0000000000003603 +t1305939279 +s13827 +i +i +i +i +i +i +i +i +i +i + +N/Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 +t1323458780 +s71272 + +N/Users/philip/Desktop/automata/test_c_plus/build/Release/automata6.dSYM +t1323458780 +s102 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +t1323458779 +s19596 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList +c000000004EE260DA0000000000000074 +t1323458778 +s116 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +t1305939280 +s100184 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +t1323458780 +s22120 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList +c000000004EE260DA0000000000000073 +t1323458778 +s115 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +t1305939281 +s105476 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +t1323458779 +s24544 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList +c000000004EE260DA0000000000000076 +t1323458778 +s118 + +N/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +t1305939280 +s105132 + +N/Users/philip/Desktop/automata/test_c_plus/main.cpp +c000000004DD70D4F0000000000003603 +t1305939279 +s13827 +i +i +i +i +i +i +i +i +i +i + +N/Users/philip/Desktop/test_c_plus/build/Release/automata6 +t1317247237 +s71264 + +N/Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM +t1317247237 +s102 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +t1317247237 +s19588 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList +c000000004DB223B3000000000000006B +t1303520179 +s107 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +t1305939280 +s100184 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +t1317247237 +s22112 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList +c000000004DB223B3000000000000006A +t1303520179 +s106 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +t1305939281 +s105476 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +t1317247237 +s24536 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList +c000000004DB223B3000000000000006D +t1303520179 +s109 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +t1305939280 +s105132 + +N/Users/philip/Desktop/test_c_plus/main.cpp +c000000004DD70D4F0000000000003603 +t1305939279 +s13827 +i +i +i +i +i +i +i +i +i +i + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies348473925#348473925#0(0"0(0#1#0"3343187568374212096#0"0# + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2 +r0 + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o /Users/philip/Desktop/automata/test_c_plus/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2 +r0 + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2 +s327632079.443604 +e327632080.886590 +r1 +xCompileC +xbuild/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xi386 +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/test_c_plus/main.cpp:404: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/test_c_plus/main.cpp:415: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp:417: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp327632079#327632080#0(490"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:404: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': /Users/philip/Desktop/test_c_plus/main.cpp:415: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp:417: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'327632080#80#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#404#0#404#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'327632080#268#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#415#0#415#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'327632080#379#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#417#0#417#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8611796032#1302" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Release -I/Users/philip/Desktop/test_c_plus/build/Release/include -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources/i386 -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o 0# + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal ppc c++ com.apple.compilers.gcc.4_2 +r0 + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o /Users/philip/Desktop/automata/test_c_plus/main.cpp normal ppc c++ com.apple.compilers.gcc.4_2 +r0 + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal ppc c++ com.apple.compilers.gcc.4_2 +s327632080.777848 +e327632081.521888 +r1 +xCompileC +xbuild/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xppc +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/test_c_plus/main.cpp:404: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/test_c_plus/main.cpp:415: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp:417: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp327632080#327632081#0(490"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:404: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': /Users/philip/Desktop/test_c_plus/main.cpp:415: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp:417: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'327632081#80#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#404#0#404#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'327632081#268#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#415#0#415#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'327632081#379#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#417#0#417#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8612944928#1309" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch ppc -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -mtune=G5 -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Release -I/Users/philip/Desktop/test_c_plus/build/Release/include -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources/ppc -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o 0# + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +r0 + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/automata/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +r0 + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +s327632079.441634 +e327632080.739638 +r1 +xCompileC +xbuild/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xx86_64 +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/test_c_plus/main.cpp:404: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/test_c_plus/main.cpp:415: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp:417: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp327632079#327632080#0(490"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:404: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': /Users/philip/Desktop/test_c_plus/main.cpp:415: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp:417: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'327632080#80#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#404#0#404#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'327632080#268#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#415#0#415#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'327632080#379#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp327632079#417#0#417#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8612891456#1308" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Release -I/Users/philip/Desktop/test_c_plus/build/Release/include -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources/x86_64 -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o 0# + +CCreateUniversalBinary /Users/philip/Desktop/automata/Automata7/build/Release/automata6 normal "x86_64 i386 ppc" +r0 + +CCreateUniversalBinary /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 normal "x86_64 i386 ppc" +s345151580.159936 +e345151580.250088 +r1 +xCreateUniversalBinary +x/Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 +xnormal +xx86_64 i386 ppc +lSLF07#2@70"CreateUniversalBinary build/Release/automata6 normal "x86_64 i386 ppc"345151580#345151580#0(0"0(0#0#58"/Users/philip/Desktop/automata/test_c_plus/x86_64 i386 ppc8599802624#509" cd /Users/philip/Desktop/automata/test_c_plus /usr/bin/lipo -create /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 -output /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 0# + +CCreateUniversalBinary /Users/philip/Desktop/test_c_plus/build/Release/automata6 normal "x86_64 i386 ppc" +s338940037.597251 +e338940037.628864 +r1 +xCreateUniversalBinary +x/Users/philip/Desktop/test_c_plus/build/Release/automata6 +xnormal +xx86_64 i386 ppc +lSLF07#2@70"CreateUniversalBinary build/Release/automata6 normal "x86_64 i386 ppc"338940037#338940037#0(0"0(0#0#49"/Users/philip/Desktop/test_c_plus/x86_64 i386 ppc8603913728#464" cd /Users/philip/Desktop/test_c_plus /usr/bin/lipo -create /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 -output /Users/philip/Desktop/test_c_plus/build/Release/automata6 0# + +CGenerateDSYMFile /Users/philip/Desktop/automata/Automata7/build/Release/automata6.dSYM /Users/philip/Desktop/automata/Automata7/build/Release/automata6 +r0 + +CGenerateDSYMFile /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6.dSYM /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 +s345151580.250417 +e345151580.542370 +r1 +xGenerateDSYMFile +x/Users/philip/Desktop/automata/test_c_plus/build/Release/automata6.dSYM +x/Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 +lSLF07#2@69"GenerateDSYMFile build/Release/automata6.dSYM build/Release/automata6345151580#345151580#0(0"0(0#0#66"/Users/philip/Desktop/automata/test_c_plus/build/Release/automata68603549760#224" cd /Users/philip/Desktop/automata/test_c_plus /Developer/usr/bin/dsymutil /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6 -o /Users/philip/Desktop/automata/test_c_plus/build/Release/automata6.dSYM 0# + +CGenerateDSYMFile /Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM /Users/philip/Desktop/test_c_plus/build/Release/automata6 +s338940037.628944 +e338940037.775128 +r1 +xGenerateDSYMFile +x/Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM +x/Users/philip/Desktop/test_c_plus/build/Release/automata6 +lSLF07#2@69"GenerateDSYMFile build/Release/automata6.dSYM build/Release/automata6338940037#338940037#0(0"0(0#0#57"/Users/philip/Desktop/test_c_plus/build/Release/automata68603896896#197" cd /Users/philip/Desktop/test_c_plus /Developer/usr/bin/dsymutil /Users/philip/Desktop/test_c_plus/build/Release/automata6 -o /Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM 0# + +CLd /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 normal i386 +r0 + +CLd /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 normal ppc +r0 + +CLd /Users/philip/Desktop/automata/Automata7/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 normal x86_64 +r0 + +CLd /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 normal i386 +s345151578.823083 +e345151579.814760 +r1 +xLd +x/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +xnormal +xi386 +lSLF07#2@123"Link /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6345151578#345151579#0(0"0(0#0#0"8601133056#616" cd /Users/philip/Desktop/automata/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/automata/test_c_plus/build/Release -F/Users/philip/Desktop/automata/test_c_plus/build/Release -filelist /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 0# + +CLd /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 normal ppc +s345151579.814925 +e345151580.159823 +r1 +xLd +x/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +xnormal +xppc +lSLF07#2@122"Link /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6345151579#345151580#0(0"0(0#0#0"8598791200#613" cd /Users/philip/Desktop/automata/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch ppc -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/automata/test_c_plus/build/Release -F/Users/philip/Desktop/automata/test_c_plus/build/Release -filelist /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 0# + +CLd /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 normal x86_64 +s345151578.723383 +e345151579.816211 +r1 +xLd +x/Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +xnormal +xx86_64 +lSLF07#2@125"Link /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6345151578#345151579#0(0"0(0#0#0"13229753409208424#622" cd /Users/philip/Desktop/automata/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/automata/test_c_plus/build/Release -F/Users/philip/Desktop/automata/test_c_plus/build/Release -filelist /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/automata/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 0# + +CLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 normal i386 +s338940036.881354 +e338940037.424465 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +xnormal +xi386 +lSLF07#2@114"Link /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6338940036#338940037#0(0"0(0#0#0"8603123776#571" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Release -F/Users/philip/Desktop/test_c_plus/build/Release -filelist /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 0# + +CLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 normal ppc +s338940037.424683 +e338940037.597159 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +xnormal +xppc +lSLF07#2@113"Link /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6338940037#338940037#0(0"0(0#0#0"8603716128#568" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch ppc -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Release -F/Users/philip/Desktop/test_c_plus/build/Release -filelist /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 0# + +CLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 normal x86_64 +s338940036.825460 +e338940037.425924 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +xnormal +xx86_64 +lSLF07#2@116"Link /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6338940036#338940037#0(0"0(0#0#0"30962440719237236#577" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Release -F/Users/philip/Desktop/test_c_plus/build/Release -filelist /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 0# + diff --git a/build/automata6.build/Release/automata6.build/build-state~.dat b/build/automata6.build/Release/automata6.build/build-state~.dat new file mode 100644 index 0000000000..ddd069709a --- /dev/null +++ b/build/automata6.build/Release/automata6.build/build-state~.dat @@ -0,0 +1,229 @@ +Tautomata6 +v7 +r0 +t325212981.320645 +cCheck dependencies +cCompileC build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +cCompileC build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 normal i386 +cLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 normal x86_64 +cCompileC build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal ppc c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 normal ppc +cCreateUniversalBinary /Users/philip/Desktop/test_c_plus/build/Release/automata6 normal "x86_64 i386 ppc" +cGenerateDSYMFile /Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM /Users/philip/Desktop/test_c_plus/build/Release/automata6 + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004CAA740B00000000000000EE +t1286239243 +s238 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/GLUT.framework/Headers/glut.h +c000000004C23CCCC000000000000578C +t1277414604 +s22412 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/math.h +c000000004A5C14A000000000000004F1 +t1247548576 +s1265 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdio.h +c000000004BBD2CE90000000000004174 +t1270689001 +s16756 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdlib.h +c000000004BBD2CE90000000000002DF5 +t1270689001 +s11765 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h +c000000004BBD2CE90000000000001731 +t1270689001 +s5937 + +N/System/Library/Frameworks/GLUT.framework/GLUT +c000000004B5FAB1A00000000001A2920 +t1264560922 +s1714464 + +N/System/Library/Frameworks/OpenGL.framework/OpenGL +c000000004D7713DA0000000000043330 +t1299649498 +s275248 + +N/Users/philip/Desktop/test_c_plus/build/Release/automata6 +t1303520181 +s71104 + +N/Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM +t1303520181 +s102 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +t1303520179 +s19408 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList +c000000004DB223B3000000000000006B +t1303520179 +s107 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +t1303520179 +s98868 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +t1303520181 +s21952 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList +c000000004DB223B3000000000000006A +t1303520179 +s106 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +t1303520180 +s103740 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +t1303520179 +s24312 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList +c000000004DB223B3000000000000006D +t1303520179 +s109 + +N/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +t1303520179 +s103624 + +N/Users/philip/Desktop/test_c_plus/main.cpp +c000000004DB216950000000000003523 +t1303516821 +s13603 +i +i +i +i +i +i +i +i +i +i + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies325212979#325212979#0(0"0(0#1#0"8605821280#0"0# + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2 +s325212979.064154 +e325212979.774767 +r1 +xCompileC +xbuild/automata6.build/Release/automata6.build/Objects-normal/i386/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xi386 +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/test_c_plus/main.cpp:401: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/test_c_plus/main.cpp:412: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp:414: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp325212979#325212979#0(490"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:401: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': /Users/philip/Desktop/test_c_plus/main.cpp:412: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp:414: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'325212979#80#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#401#0#401#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'325212979#268#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#412#0#412#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'325212979#379#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#414#0#414#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8603018720#1302" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Release -I/Users/philip/Desktop/test_c_plus/build/Release/include -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources/i386 -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/main.o 0# + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal ppc c++ com.apple.compilers.gcc.4_2 +s325212979.838430 +e325212980.998926 +r1 +xCompileC +xbuild/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xppc +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/test_c_plus/main.cpp:401: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/test_c_plus/main.cpp:412: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp:414: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp325212979#325212980#0(490"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:401: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': /Users/philip/Desktop/test_c_plus/main.cpp:412: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp:414: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'325212980#80#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#401#0#401#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'325212980#268#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#412#0#412#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'325212980#379#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#414#0#414#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8607898080#1309" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch ppc -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -mtune=G5 -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Release -I/Users/philip/Desktop/test_c_plus/build/Release/include -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources/ppc -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/main.o 0# + +CCompileC build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +s325212979.062758 +e325212979.811548 +r1 +xCompileC +xbuild/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xx86_64 +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/test_c_plus/main.cpp:401: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/test_c_plus/main.cpp:412: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/test_c_plus/main.cpp:414: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp325212979#325212979#0(490"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:401: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_io()': /Users/philip/Desktop/test_c_plus/main.cpp:412: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/test_c_plus/main.cpp:414: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'325212979#80#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#401#0#401#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'325212979#268#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#412#0#412#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'325212979#379#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp325209621#414#0#414#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8605807840#1308" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/automata6-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Release -I/Users/philip/Desktop/test_c_plus/build/Release/include -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources/x86_64 -I/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/main.o 0# + +CCreateUniversalBinary /Users/philip/Desktop/test_c_plus/build/Release/automata6 normal "x86_64 i386 ppc" +s325212981.199258 +e325212981.232548 +r1 +xCreateUniversalBinary +x/Users/philip/Desktop/test_c_plus/build/Release/automata6 +xnormal +xx86_64 i386 ppc +lSLF07#2@70"CreateUniversalBinary build/Release/automata6 normal "x86_64 i386 ppc"325212981#325212981#0(0"0(0#0#49"/Users/philip/Desktop/test_c_plus/x86_64 i386 ppc8606179168#464" cd /Users/philip/Desktop/test_c_plus /usr/bin/lipo -create /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 -output /Users/philip/Desktop/test_c_plus/build/Release/automata6 0# + +CGenerateDSYMFile /Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM /Users/philip/Desktop/test_c_plus/build/Release/automata6 +s325212981.232633 +e325212981.320604 +r1 +xGenerateDSYMFile +x/Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM +x/Users/philip/Desktop/test_c_plus/build/Release/automata6 +lSLF07#2@69"GenerateDSYMFile build/Release/automata6.dSYM build/Release/automata6325212981#325212981#0(0"0(0#0#57"/Users/philip/Desktop/test_c_plus/build/Release/automata68606138464#197" cd /Users/philip/Desktop/test_c_plus /Developer/usr/bin/dsymutil /Users/philip/Desktop/test_c_plus/build/Release/automata6 -o /Users/philip/Desktop/test_c_plus/build/Release/automata6.dSYM 0# + +CLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 normal i386 +s325212979.774860 +e325212979.838344 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 +xnormal +xi386 +old: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found +old: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found +lSLF07#2@114"Link /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6325212979#325212979#0(192"ld: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found ld: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found 2(22@82"Directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found325212979#0#96#0(6@0"325212979#0#0#0#0#0"0(22@82"Directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found325212979#96#96#0(6@0"325212979#0#0#0#0#0"0(0#0#0"8606340384#571" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Release -F/Users/philip/Desktop/test_c_plus/build/Release -filelist /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/i386/automata6 0# + +CLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 normal ppc +s325212980.999045 +e325212981.199160 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 +xnormal +xppc +old: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found +old: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found +lSLF07#2@113"Link /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6325212980#325212981#0(192"ld: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found ld: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found 2(22@82"Directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found325212981#0#96#0(6@0"325212981#0#0#0#0#0"0(22@82"Directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found325212981#96#96#0(6@0"325212981#0#0#0#0#0"0(0#0#0"8606342784#568" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch ppc -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Release -F/Users/philip/Desktop/test_c_plus/build/Release -filelist /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/ppc/automata6 0# + +CLd /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 normal x86_64 +s325212979.811638 +e325212979.842318 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 +xnormal +xx86_64 +old: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found +old: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found +lSLF07#2@116"Link /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6325212979#325212979#0(192"ld: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found ld: warning: directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found 2(22@82"Directory '/Users/philip/Desktop/test_c_plus/build/Release' following -L not found325212979#0#96#0(6@0"325212979#0#0#0#0#0"0(22@82"Directory '/Users/philip/Desktop/test_c_plus/build/Release' following -F not found325212979#96#96#0(6@0"325212979#0#0#0#0#0"0(0#0#0"8608111424#577" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Release -F/Users/philip/Desktop/test_c_plus/build/Release -filelist /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/automata6.build/Release/automata6.build/Objects-normal/x86_64/automata6 0# + diff --git a/build/automata6.build/automata6.pbxindex/categories.pbxbtree b/build/automata6.build/automata6.pbxindex/categories.pbxbtree new file mode 100644 index 0000000000..d3f6bb3b64 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/categories.pbxbtree differ diff --git a/build/automata6.build/automata6.pbxindex/cdecls.pbxbtree b/build/automata6.build/automata6.pbxindex/cdecls.pbxbtree new file mode 100644 index 0000000000..2b03fa9b32 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/cdecls.pbxbtree differ diff --git a/build/automata6.build/automata6.pbxindex/decls.pbxbtree b/build/automata6.build/automata6.pbxindex/decls.pbxbtree new file mode 100644 index 0000000000..ab50394b4e Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/decls.pbxbtree differ diff --git a/build/automata6.build/automata6.pbxindex/files.pbxbtree b/build/automata6.build/automata6.pbxindex/files.pbxbtree new file mode 100644 index 0000000000..85141e0a37 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/files.pbxbtree differ diff --git a/build/automata6.build/automata6.pbxindex/imports.pbxbtree b/build/automata6.build/automata6.pbxindex/imports.pbxbtree new file mode 100644 index 0000000000..2b6f606027 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/imports.pbxbtree differ diff --git a/build/automata6.build/automata6.pbxindex/pbxindex.header b/build/automata6.build/automata6.pbxindex/pbxindex.header new file mode 100644 index 0000000000..2bff6eb3dd Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/pbxindex.header differ diff --git a/build/automata6.build/automata6.pbxindex/protocols.pbxbtree b/build/automata6.build/automata6.pbxindex/protocols.pbxbtree new file mode 100644 index 0000000000..d3f6bb3b64 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/protocols.pbxbtree differ diff --git a/build/automata6.build/automata6.pbxindex/refs.pbxbtree b/build/automata6.build/automata6.pbxindex/refs.pbxbtree new file mode 100644 index 0000000000..cce39606ca Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/refs.pbxbtree differ diff --git a/build/automata6.build/automata6.pbxindex/strings.pbxstrings/control b/build/automata6.build/automata6.pbxindex/strings.pbxstrings/control new file mode 100644 index 0000000000..6820463f65 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/strings.pbxstrings/control differ diff --git a/build/automata6.build/automata6.pbxindex/strings.pbxstrings/strings b/build/automata6.build/automata6.pbxindex/strings.pbxstrings/strings new file mode 100644 index 0000000000..ba83c30fa5 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/strings.pbxstrings/strings differ diff --git a/build/automata6.build/automata6.pbxindex/subclasses.pbxbtree b/build/automata6.build/automata6.pbxindex/subclasses.pbxbtree new file mode 100644 index 0000000000..7321d12a42 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/subclasses.pbxbtree differ diff --git a/build/automata6.build/automata6.pbxindex/symbols0.pbxsymbols b/build/automata6.build/automata6.pbxindex/symbols0.pbxsymbols new file mode 100644 index 0000000000..1ed205b801 Binary files /dev/null and b/build/automata6.build/automata6.pbxindex/symbols0.pbxsymbols differ diff --git a/build/automata7.build/.DS_Store b/build/automata7.build/.DS_Store new file mode 100644 index 0000000000..06447559f0 Binary files /dev/null and b/build/automata7.build/.DS_Store differ diff --git a/build/automata7.build/Release/.DS_Store b/build/automata7.build/Release/.DS_Store new file mode 100644 index 0000000000..5fb551790b Binary files /dev/null and b/build/automata7.build/Release/.DS_Store differ diff --git a/build/automata7.build/Release/automata7.build/.DS_Store b/build/automata7.build/Release/automata7.build/.DS_Store new file mode 100644 index 0000000000..36a1efed6a Binary files /dev/null and b/build/automata7.build/Release/automata7.build/.DS_Store differ diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 b/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 new file mode 100755 index 0000000000..4fb655f61e Binary files /dev/null and b/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 differ diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7.LinkFileList b/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7.LinkFileList new file mode 100644 index 0000000000..b9de6f9c70 --- /dev/null +++ b/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7.LinkFileList @@ -0,0 +1 @@ +/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o b/build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o new file mode 100644 index 0000000000..b64b58caa7 Binary files /dev/null and b/build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o differ diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 b/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 new file mode 100755 index 0000000000..d637ef545f Binary files /dev/null and b/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 differ diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7.LinkFileList b/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7.LinkFileList new file mode 100644 index 0000000000..e43f60a095 --- /dev/null +++ b/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7.LinkFileList @@ -0,0 +1 @@ +/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o b/build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o new file mode 100644 index 0000000000..b1a96bb43a Binary files /dev/null and b/build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o differ diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 new file mode 100755 index 0000000000..0cd6cacdde Binary files /dev/null and b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 differ diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7.LinkFileList b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7.LinkFileList new file mode 100644 index 0000000000..e486a41f6c --- /dev/null +++ b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7.LinkFileList @@ -0,0 +1 @@ +/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o new file mode 100644 index 0000000000..186f3cdcc4 Binary files /dev/null and b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o differ diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o~> b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o~> new file mode 100644 index 0000000000..e6736f9795 --- /dev/null +++ b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o~> @@ -0,0 +1,24 @@ +/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void init_cells()': +/Users/philip/Desktop/automata/Automata7/main.cpp:179: error: 'cells' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:181: error: 'cells' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:183: error: 'memory' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void update_cells()': +/Users/philip/Desktop/automata/Automata7/main.cpp:259: error: 'neighbors' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:259: error: 'cells' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:274: error: 'memory' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:279: error: 'cells1' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:322: error: 'cells1' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:332: error: 'cells1' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:354: error: 'cells' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:354: error: 'cells1' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void key(unsigned char, int, int)': +/Users/philip/Desktop/automata/Automata7/main.cpp:396: error: 'cells' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:397: error: 'cells1' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp:398: error: 'memory' was not declared in this scope +/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_stats()': +/Users/philip/Desktop/automata/Automata7/main.cpp:427: warning: deprecated conversion from string constant to 'char*' +/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_io()': +/Users/philip/Desktop/automata/Automata7/main.cpp:438: warning: deprecated conversion from string constant to 'char*' +/Users/philip/Desktop/automata/Automata7/main.cpp:440: warning: deprecated conversion from string constant to 'char*' +/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display()': +/Users/philip/Desktop/automata/Automata7/main.cpp:461: error: 'cells' was not declared in this scope diff --git a/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o~? b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o~? new file mode 100644 index 0000000000..63e4bd6a42 Binary files /dev/null and b/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o~? differ diff --git a/build/automata7.build/Release/automata7.build/automata7-all-target-headers.hmap b/build/automata7.build/Release/automata7.build/automata7-all-target-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata7.build/Release/automata7.build/automata7-all-target-headers.hmap differ diff --git a/build/automata7.build/Release/automata7.build/automata7-generated-files.hmap b/build/automata7.build/Release/automata7.build/automata7-generated-files.hmap new file mode 100644 index 0000000000..dd8b535d60 Binary files /dev/null and b/build/automata7.build/Release/automata7.build/automata7-generated-files.hmap differ diff --git a/build/automata7.build/Release/automata7.build/automata7-own-target-headers.hmap b/build/automata7.build/Release/automata7.build/automata7-own-target-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata7.build/Release/automata7.build/automata7-own-target-headers.hmap differ diff --git a/build/automata7.build/Release/automata7.build/automata7-project-headers.hmap b/build/automata7.build/Release/automata7.build/automata7-project-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/automata7.build/Release/automata7.build/automata7-project-headers.hmap differ diff --git a/build/automata7.build/Release/automata7.build/automata7.dep b/build/automata7.build/Release/automata7.build/automata7.dep new file mode 100644 index 0000000000..923d25db65 --- /dev/null +++ b/build/automata7.build/Release/automata7.build/automata7.dep @@ -0,0 +1,8 @@ +00000000000000000000000000000000 027a3a4db0c1e0205fd45131beee743e ffffffffffffffffffffffffffffffff 102 /Users/philip/Desktop/automata/Automata7/build/Release/automata7.dSYM +a50975e4e52ae5847b3a00682835c0fc 5795387fc1f15114541a98a0d3d6fc16 ffffffffffffffffffffffffffffffff 71276 /Users/philip/Desktop/automata/Automata7/build/Release/automata7 +df6e245a528b37bba9d03b944a5155e3 ef2a9cee50674a7e633478984e504966 ffffffffffffffffffffffffffffffff 22124 /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 +94df1b0a4f092f43461806828063eae4 3dd0a5a36af517659d94738a3a1b590e ffffffffffffffffffffffffffffffff 19604 /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 +73f7c7db32152076540baad90442cc8a 4fb5b422f02f80113e599cb5920ea319 ffffffffffffffffffffffffffffffff 24544 /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 +000000000015f9ca0000000000001ece df6e245a1b439ecaa9d03b944a4f5183 ffffffffffffffffffffffffffffffff 105492 /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o +000000000015f9ca0000000000001ece 94df1b0a06c1863246180682807dee84 ffffffffffffffffffffffffffffffff 100196 /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o +000000000015f9ca0000000000001ece 73f7c7db7bdd8907540baad9045cc8ea ffffffffffffffffffffffffffffffff 105148 /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o diff --git a/build/automata7.build/Release/automata7.build/automata7.hmap b/build/automata7.build/Release/automata7.build/automata7.hmap new file mode 100644 index 0000000000..dc511c473b Binary files /dev/null and b/build/automata7.build/Release/automata7.build/automata7.hmap differ diff --git a/build/automata7.build/Release/automata7.build/build-state.dat b/build/automata7.build/Release/automata7.build/build-state.dat new file mode 100644 index 0000000000..371d126add --- /dev/null +++ b/build/automata7.build/Release/automata7.build/build-state.dat @@ -0,0 +1,223 @@ +Tautomata7 +v7 +r0 +t348474253.522900 +cCheck dependencies +cCompileC build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +cCompileC build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 normal i386 +cLd /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 normal x86_64 +cCompileC build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal ppc c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 normal ppc +cCreateUniversalBinary /Users/philip/Desktop/automata/Automata7/build/Release/automata7 normal "x86_64 i386 ppc" +cGenerateDSYMFile /Users/philip/Desktop/automata/Automata7/build/Release/automata7.dSYM /Users/philip/Desktop/automata/Automata7/build/Release/automata7 + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004CAA740B00000000000000EE +t1286239243 +s238 + +N/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/GLUT.framework/Headers/glut.h +c000000004C23CCCC000000000000578C +t1277414604 +s22412 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/math.h +c000000004A5C14A000000000000004F1 +t1247548576 +s1265 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdio.h +c000000004BBD2CE90000000000004174 +t1270689001 +s16756 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdlib.h +c000000004BBD2CE90000000000002DF5 +t1270689001 +s11765 + +N/Developer/SDKs/MacOSX10.6.sdk/usr/include/string.h +c000000004BBD2CE90000000000001731 +t1270689001 +s5937 + +N/System/Library/Frameworks/GLUT.framework/GLUT +c000000004B5FAB1A00000000001A2920 +t1264560922 +s1714464 + +N/System/Library/Frameworks/OpenGL.framework/OpenGL +c000000004E288FAA0000000000043360 +t1311281066 +s275296 + +N/Users/philip/Desktop/automata/Automata7/build/Release/automata7 +t1326781453 +s71276 + +N/Users/philip/Desktop/automata/Automata7/build/Release/automata7.dSYM +t1326781453 +s102 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 +t1326781452 +s19604 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7.LinkFileList +c000000004F15140A0000000000000072 +t1326781450 +s114 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o +t1326781451 +s100196 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 +t1326781453 +s22124 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7.LinkFileList +c000000004F15140A0000000000000071 +t1326781450 +s113 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o +t1326781453 +s105492 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 +t1326781452 +s24544 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7.LinkFileList +c000000004F15140A0000000000000074 +t1326781450 +s116 + +N/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o +t1326781451 +s105148 + +N/Users/philip/Desktop/automata/Automata7/main.cpp +c000000004DD70D4F0000000000003603 +t1305939279 +s13827 +i +i +i +i +i +i +i +i +i +i + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies348474250#348474250#0(0"0(0#1#0"3343187568374212096#0"0# + +CCompileC build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal i386 c++ com.apple.compilers.gcc.4_2 +s348474250.746387 +e348474251.635211 +r1 +xCompileC +xbuild/automata7.build/Release/automata7.build/Objects-normal/i386/main.o +x/Users/philip/Desktop/automata/Automata7/main.cpp +xnormal +xi386 +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/automata/Automata7/main.cpp:404: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/automata/Automata7/main.cpp:415: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/automata/Automata7/main.cpp:417: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@57"Compile /Users/philip/Desktop/automata/Automata7/main.cpp348474250#348474251#0(525"/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/automata/Automata7/main.cpp:404: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_io()': /Users/philip/Desktop/automata/Automata7/main.cpp:415: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/automata/Automata7/main.cpp:417: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'348474251#87#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#404#0#404#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'348474251#289#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#415#0#415#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'348474251#407#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#417#0#417#0#49"deprecated conversion from string constant to '*'0(0#0#49"/Users/philip/Desktop/automata/Automata7/main.cpp8606306976#1379" cd /Users/philip/Desktop/automata/Automata7 setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-generated-files.hmap -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-own-target-headers.hmap -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-all-target-headers.hmap -iquote /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-project-headers.hmap -F/Users/philip/Desktop/automata/Automata7/build/Release -I/Users/philip/Desktop/automata/Automata7/build/Release/include -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/DerivedSources/i386 -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/DerivedSources -c /Users/philip/Desktop/automata/Automata7/main.cpp -o /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/main.o 0# + +CCompileC build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal ppc c++ com.apple.compilers.gcc.4_2 +s348474252.108240 +e348474253.234601 +r1 +xCompileC +xbuild/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o +x/Users/philip/Desktop/automata/Automata7/main.cpp +xnormal +xppc +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/automata/Automata7/main.cpp:404: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/automata/Automata7/main.cpp:415: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/automata/Automata7/main.cpp:417: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@57"Compile /Users/philip/Desktop/automata/Automata7/main.cpp348474252#348474253#0(525"/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/automata/Automata7/main.cpp:404: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_io()': /Users/philip/Desktop/automata/Automata7/main.cpp:415: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/automata/Automata7/main.cpp:417: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'348474252#87#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#404#0#404#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'348474252#289#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#415#0#415#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'348474252#407#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#417#0#417#0#49"deprecated conversion from string constant to '*'0(0#0#49"/Users/philip/Desktop/automata/Automata7/main.cpp8603396000#1386" cd /Users/philip/Desktop/automata/Automata7 setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch ppc -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -mtune=G5 -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-generated-files.hmap -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-own-target-headers.hmap -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-all-target-headers.hmap -iquote /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-project-headers.hmap -F/Users/philip/Desktop/automata/Automata7/build/Release -I/Users/philip/Desktop/automata/Automata7/build/Release/include -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/DerivedSources/ppc -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/DerivedSources -c /Users/philip/Desktop/automata/Automata7/main.cpp -o /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/main.o 0# + +CCompileC build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/automata/Automata7/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +s348474250.704910 +e348474251.647391 +r1 +xCompileC +xbuild/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o +x/Users/philip/Desktop/automata/Automata7/main.cpp +xnormal +xx86_64 +xc++ +xcom.apple.compilers.gcc.4_2 +o/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_stats()': +o/Users/philip/Desktop/automata/Automata7/main.cpp:404: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_io()': +o/Users/philip/Desktop/automata/Automata7/main.cpp:415: warning: deprecated conversion from string constant to 'char*' +o/Users/philip/Desktop/automata/Automata7/main.cpp:417: warning: deprecated conversion from string constant to 'char*' +lSLF07#2@57"Compile /Users/philip/Desktop/automata/Automata7/main.cpp348474250#348474251#0(525"/Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/automata/Automata7/main.cpp:404: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/automata/Automata7/main.cpp: In function 'void display_io()': /Users/philip/Desktop/automata/Automata7/main.cpp:415: warning: deprecated conversion from string constant to 'char*' /Users/philip/Desktop/automata/Automata7/main.cpp:417: warning: deprecated conversion from string constant to 'char*' 3(22@53"Deprecated conversion from string constant to 'char*'348474251#87#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#404#0#404#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'348474251#289#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#415#0#415#0#49"deprecated conversion from string constant to '*'0(22@53"Deprecated conversion from string constant to 'char*'348474251#407#118#0(6@49"/Users/philip/Desktop/automata/Automata7/main.cpp327632079#417#0#417#0#49"deprecated conversion from string constant to '*'0(0#0#49"/Users/philip/Desktop/automata/Automata7/main.cpp8660259774160596992#1385" cd /Users/philip/Desktop/automata/Automata7 setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-generated-files.hmap -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-own-target-headers.hmap -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-all-target-headers.hmap -iquote /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/automata7-project-headers.hmap -F/Users/philip/Desktop/automata/Automata7/build/Release -I/Users/philip/Desktop/automata/Automata7/build/Release/include -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/DerivedSources/x86_64 -I/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/DerivedSources -c /Users/philip/Desktop/automata/Automata7/main.cpp -o /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/main.o 0# + +CCreateUniversalBinary /Users/philip/Desktop/automata/Automata7/build/Release/automata7 normal "x86_64 i386 ppc" +s348474253.416869 +e348474253.434810 +r1 +xCreateUniversalBinary +x/Users/philip/Desktop/automata/Automata7/build/Release/automata7 +xnormal +xx86_64 i386 ppc +lSLF07#2@70"CreateUniversalBinary build/Release/automata7 normal "x86_64 i386 ppc"348474253#348474253#0(0"0(0#0#56"/Users/philip/Desktop/automata/Automata7/x86_64 i386 ppc8606164768#499" cd /Users/philip/Desktop/automata/Automata7 /usr/bin/lipo -create /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 -output /Users/philip/Desktop/automata/Automata7/build/Release/automata7 0# + +CGenerateDSYMFile /Users/philip/Desktop/automata/Automata7/build/Release/automata7.dSYM /Users/philip/Desktop/automata/Automata7/build/Release/automata7 +s348474253.434902 +e348474253.522846 +r1 +xGenerateDSYMFile +x/Users/philip/Desktop/automata/Automata7/build/Release/automata7.dSYM +x/Users/philip/Desktop/automata/Automata7/build/Release/automata7 +lSLF07#2@69"GenerateDSYMFile build/Release/automata7.dSYM build/Release/automata7348474253#348474253#0(0"0(0#0#64"/Users/philip/Desktop/automata/Automata7/build/Release/automata78605493600#218" cd /Users/philip/Desktop/automata/Automata7 /Developer/usr/bin/dsymutil /Users/philip/Desktop/automata/Automata7/build/Release/automata7 -o /Users/philip/Desktop/automata/Automata7/build/Release/automata7.dSYM 0# + +CLd /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 normal i386 +s348474251.635300 +e348474252.108148 +r1 +xLd +x/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 +xnormal +xi386 +lSLF07#2@121"Link /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7348474251#348474252#0(0"0(0#0#0"27584887023140964#606" cd /Users/philip/Desktop/automata/Automata7 setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/automata/Automata7/build/Release -F/Users/philip/Desktop/automata/Automata7/build/Release -filelist /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/i386/automata7 0# + +CLd /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 normal ppc +s348474253.234754 +e348474253.416776 +r1 +xLd +x/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 +xnormal +xppc +lSLF07#2@120"Link /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7348474253#348474253#0(0"0(0#0#0"8605444352#603" cd /Users/philip/Desktop/automata/Automata7 setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch ppc -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/automata/Automata7/build/Release -F/Users/philip/Desktop/automata/Automata7/build/Release -filelist /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/ppc/automata7 0# + +CLd /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 normal x86_64 +s348474251.647482 +e348474252.115109 +r1 +xLd +x/Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 +xnormal +xx86_64 +lSLF07#2@123"Link /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7348474251#348474252#0(0"0(0#0#0"8598307424#612" cd /Users/philip/Desktop/automata/Automata7 setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/automata/Automata7/build/Release -F/Users/philip/Desktop/automata/Automata7/build/Release -filelist /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/automata/Automata7/build/automata7.build/Release/automata7.build/Objects-normal/x86_64/automata7 0# + diff --git a/build/automata7.build/automata7.pbxindex/categories.pbxbtree b/build/automata7.build/automata7.pbxindex/categories.pbxbtree new file mode 100644 index 0000000000..d3f6bb3b64 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/categories.pbxbtree differ diff --git a/build/automata7.build/automata7.pbxindex/cdecls.pbxbtree b/build/automata7.build/automata7.pbxindex/cdecls.pbxbtree new file mode 100644 index 0000000000..2b03fa9b32 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/cdecls.pbxbtree differ diff --git a/build/automata7.build/automata7.pbxindex/decls.pbxbtree b/build/automata7.build/automata7.pbxindex/decls.pbxbtree new file mode 100644 index 0000000000..ab50394b4e Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/decls.pbxbtree differ diff --git a/build/automata7.build/automata7.pbxindex/files.pbxbtree b/build/automata7.build/automata7.pbxindex/files.pbxbtree new file mode 100644 index 0000000000..85141e0a37 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/files.pbxbtree differ diff --git a/build/automata7.build/automata7.pbxindex/imports.pbxbtree b/build/automata7.build/automata7.pbxindex/imports.pbxbtree new file mode 100644 index 0000000000..2b6f606027 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/imports.pbxbtree differ diff --git a/build/automata7.build/automata7.pbxindex/pbxindex.header b/build/automata7.build/automata7.pbxindex/pbxindex.header new file mode 100644 index 0000000000..aa768fcc6e Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/pbxindex.header differ diff --git a/build/automata7.build/automata7.pbxindex/protocols.pbxbtree b/build/automata7.build/automata7.pbxindex/protocols.pbxbtree new file mode 100644 index 0000000000..d3f6bb3b64 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/protocols.pbxbtree differ diff --git a/build/automata7.build/automata7.pbxindex/refs.pbxbtree b/build/automata7.build/automata7.pbxindex/refs.pbxbtree new file mode 100644 index 0000000000..cce39606ca Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/refs.pbxbtree differ diff --git a/build/automata7.build/automata7.pbxindex/strings.pbxstrings/control b/build/automata7.build/automata7.pbxindex/strings.pbxstrings/control new file mode 100644 index 0000000000..36a0816eb9 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/strings.pbxstrings/control differ diff --git a/build/automata7.build/automata7.pbxindex/strings.pbxstrings/strings b/build/automata7.build/automata7.pbxindex/strings.pbxstrings/strings new file mode 100644 index 0000000000..ba83c30fa5 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/strings.pbxstrings/strings differ diff --git a/build/automata7.build/automata7.pbxindex/subclasses.pbxbtree b/build/automata7.build/automata7.pbxindex/subclasses.pbxbtree new file mode 100644 index 0000000000..7321d12a42 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/subclasses.pbxbtree differ diff --git a/build/automata7.build/automata7.pbxindex/symbols0.pbxsymbols b/build/automata7.build/automata7.pbxindex/symbols0.pbxsymbols new file mode 100644 index 0000000000..7115320c59 Binary files /dev/null and b/build/automata7.build/automata7.pbxindex/symbols0.pbxsymbols differ diff --git a/build/test_c_plus.build/.DS_Store b/build/test_c_plus.build/.DS_Store new file mode 100644 index 0000000000..d619b29cbc Binary files /dev/null and b/build/test_c_plus.build/.DS_Store differ diff --git a/build/test_c_plus.build/Debug/.DS_Store b/build/test_c_plus.build/Debug/.DS_Store new file mode 100644 index 0000000000..8b4d783cca Binary files /dev/null and b/build/test_c_plus.build/Debug/.DS_Store differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/.DS_Store b/build/test_c_plus.build/Debug/test_c_plus.build/.DS_Store new file mode 100644 index 0000000000..f86c369270 Binary files /dev/null and b/build/test_c_plus.build/Debug/test_c_plus.build/.DS_Store differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/.DS_Store b/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/.DS_Store new file mode 100644 index 0000000000..5f11b34666 Binary files /dev/null and b/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/.DS_Store differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o b/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o new file mode 100644 index 0000000000..549f0a5b05 Binary files /dev/null and b/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/test_c_plus.LinkFileList b/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/test_c_plus.LinkFileList new file mode 100644 index 0000000000..484212e5ad --- /dev/null +++ b/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/test_c_plus.LinkFileList @@ -0,0 +1 @@ +/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/automata6.dep b/build/test_c_plus.build/Debug/test_c_plus.build/automata6.dep new file mode 100644 index 0000000000..31eacfd1d4 --- /dev/null +++ b/build/test_c_plus.build/Debug/test_c_plus.build/automata6.dep @@ -0,0 +1,2 @@ +5d159624d3ce50946eace2ae57ea00c2 b610339f3980234a8c54ac152978b227 ffffffffffffffffffffffffffffffff 25240 /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus +000000004d901a79000000000000317e 5d159624d48929b56eace2ae57f42b42 ffffffffffffffffffffffffffffffff 98180 /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/build-state.dat b/build/test_c_plus.build/Debug/test_c_plus.build/build-state.dat new file mode 100644 index 0000000000..87c50a0f56 --- /dev/null +++ b/build/test_c_plus.build/Debug/test_c_plus.build/build-state.dat @@ -0,0 +1,71 @@ +Ttest_c_plus +v7 +r0 +t322982393.975896 +cCheck dependencies +cCompileC build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus normal x86_64 + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004CAA740B00000000000000EE +t1286239243 +s238 + +N/System/Library/Frameworks/GLUT.framework/GLUT +c000000004B5FAB1A00000000001A2920 +t1264560922 +s1714464 + +N/System/Library/Frameworks/OpenGL.framework/OpenGL +c000000004D22BC490000000000043330 +t1294122057 +s275248 + +N/Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus +t1301289593 +s25240 + +N/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o +t1301289593 +s98180 + +N/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/test_c_plus.LinkFileList +c000000004D900895000000000000006F +t1301285013 +s111 + +N/Users/philip/Desktop/test_c_plus/main.cpp +c000000004D901A79000000000000317E +t1301289593 +s12670 +i +i +i + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies322982393#322982393#0(0"0(0#1#0"8611291200#0"0# + +CCompileC build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +s322982393.573246 +e322982393.953401 +r1 +xCompileC +xbuild/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xx86_64 +xc++ +xcom.apple.compilers.gcc.4_2 +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp322982393#322982393#0(706"/Users/philip/Desktop/test_c_plus/main.cpp: In function 'void init_cells()': /Users/philip/Desktop/test_c_plus/main.cpp:131: warning: unused variable 'centersize' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void update_cells()': /Users/philip/Desktop/test_c_plus/main.cpp:165: warning: unused variable 'neighborsum' /Users/philip/Desktop/test_c_plus/main.cpp:167: warning: unused variable 'io_char_counter' /Users/philip/Desktop/test_c_plus/main.cpp:174: warning: unused variable 'UPDATE_MEMORY_DECAY' /Users/philip/Desktop/test_c_plus/main.cpp: In function 'void display_stats()': /Users/philip/Desktop/test_c_plus/main.cpp:361: warning: deprecated conversion from string constant to 'char*' 5(22@28"Unused variable 'centersize'322982393#77#86#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#131#0#131#0#19"unused variable '*'0(22@29"Unused variable 'neighborsum'322982393#242#87#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#165#0#165#0#19"unused variable '*'0(22@33"Unused variable 'io_char_counter'322982393#329#91#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#167#0#167#0#19"unused variable '*'0(22@37"Unused variable 'UPDATE_MEMORY_DECAY'322982393#420#95#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#174#0#174#0#19"unused variable '*'0(22@53"Deprecated conversion from string constant to 'char*'322982393#595#111#0(6@42"/Users/philip/Desktop/test_c_plus/main.cpp322982393#361#0#361#0#49"deprecated conversion from string constant to '*'0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8611182272#1308" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -mfix-and-continue -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Debug -I/Users/philip/Desktop/test_c_plus/build/Debug/include -I/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/DerivedSources/x86_64 -I/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o 0# + +CLd /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus normal x86_64 +s322982393.953467 +e322982393.975851 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus +xnormal +xx86_64 +lSLF07#2@62"Link /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus322982393#322982393#0(0"0(0#0#0"8612011840#523" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Debug -F/Users/philip/Desktop/test_c_plus/build/Debug -filelist /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/test_c_plus.LinkFileList -mmacosx-version-min=10.6 -framework GLUT -framework OpenGL -o /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus 0# + diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/build-state~.dat b/build/test_c_plus.build/Debug/test_c_plus.build/build-state~.dat new file mode 100644 index 0000000000..0ff218d369 --- /dev/null +++ b/build/test_c_plus.build/Debug/test_c_plus.build/build-state~.dat @@ -0,0 +1,61 @@ +Ttest_c_plus +v7 +r0 +t322977813.959900 +cCheck dependencies +cCompileC build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +cLd /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus normal x86_64 + +N/Developer/SDKs/MacOSX10.6.sdk +c000000004CAA740B00000000000000EE +t1286239243 +s238 + +N/Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus +t1301285013 +s12136 + +N/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o +t1301285013 +s79904 + +N/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/test_c_plus.LinkFileList +c000000004D900895000000000000006F +t1301285013 +s111 + +N/Users/philip/Desktop/test_c_plus/main.cpp +c000000004D9008950000000000000171 +t1301285013 +s369 +i +i +i + +CCheck dependencies +r0 +lSLF07#2@18"Check dependencies322977813#322977813#0(0"0(0#1#0"8610065952#0"0# + +CCompileC build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o /Users/philip/Desktop/test_c_plus/main.cpp normal x86_64 c++ com.apple.compilers.gcc.4_2 +s322977813.376290 +e322977813.908442 +r1 +xCompileC +xbuild/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o +x/Users/philip/Desktop/test_c_plus/main.cpp +xnormal +xx86_64 +xc++ +xcom.apple.compilers.gcc.4_2 +lSLF07#2@50"Compile /Users/philip/Desktop/test_c_plus/main.cpp322977813#322977813#0(0"0(0#0#42"/Users/philip/Desktop/test_c_plus/main.cpp8607560032#1308" cd /Users/philip/Desktop/test_c_plus setenv LANG en_US.US-ASCII /Developer/usr/bin/gcc-4.2 -x c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.6.sdk -mfix-and-continue -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-generated-files.hmap -I/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-own-target-headers.hmap -I/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-all-target-headers.hmap -iquote /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-project-headers.hmap -F/Users/philip/Desktop/test_c_plus/build/Debug -I/Users/philip/Desktop/test_c_plus/build/Debug/include -I/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/DerivedSources/x86_64 -I/Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/DerivedSources -c /Users/philip/Desktop/test_c_plus/main.cpp -o /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o 0# + +CLd /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus normal x86_64 +s322977813.908531 +e322977813.959854 +r1 +xLd +x/Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus +xnormal +xx86_64 +lSLF07#2@62"Link /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus322977813#322977813#0(0"0(0#0#0"8610317632#489" cd /Users/philip/Desktop/test_c_plus setenv MACOSX_DEPLOYMENT_TARGET 10.6 /Developer/usr/bin/g++-4.2 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/philip/Desktop/test_c_plus/build/Debug -F/Users/philip/Desktop/test_c_plus/build/Debug -filelist /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/test_c_plus.LinkFileList -mmacosx-version-min=10.6 -o /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus 0# + diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-all-target-headers.hmap b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-all-target-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-all-target-headers.hmap differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-generated-files.hmap b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-generated-files.hmap new file mode 100644 index 0000000000..dd8b535d60 Binary files /dev/null and b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-generated-files.hmap differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-own-target-headers.hmap b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-own-target-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-own-target-headers.hmap differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-project-headers.hmap b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-project-headers.hmap new file mode 100644 index 0000000000..5d74c43a95 Binary files /dev/null and b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus-project-headers.hmap differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus.dep b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus.dep new file mode 100644 index 0000000000..31eacfd1d4 --- /dev/null +++ b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus.dep @@ -0,0 +1,2 @@ +5d159624d3ce50946eace2ae57ea00c2 b610339f3980234a8c54ac152978b227 ffffffffffffffffffffffffffffffff 25240 /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus +000000004d901a79000000000000317e 5d159624d48929b56eace2ae57f42b42 ffffffffffffffffffffffffffffffff 98180 /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus.hmap b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus.hmap new file mode 100644 index 0000000000..dc511c473b Binary files /dev/null and b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus.hmap differ diff --git a/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus~.dep b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus~.dep new file mode 100644 index 0000000000..c79425cb19 --- /dev/null +++ b/build/test_c_plus.build/Debug/test_c_plus.build/test_c_plus~.dep @@ -0,0 +1,2 @@ +5d159624d5b3552b6eace2ae57f42add 8091ffea89ec16ad7c16238dae1f9650 ffffffffffffffffffffffffffffffff 12136 /Users/philip/Desktop/test_c_plus/build/Debug/test_c_plus +000000004d9008950000000000000171 5d159624d48929b56eace2ae57f42b42 ffffffffffffffffffffffffffffffff 79904 /Users/philip/Desktop/test_c_plus/build/test_c_plus.build/Debug/test_c_plus.build/Objects-normal/x86_64/main.o diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/categories.pbxbtree b/build/test_c_plus.build/test_c_plus.pbxindex/categories.pbxbtree new file mode 100644 index 0000000000..d3f6bb3b64 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/categories.pbxbtree differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/cdecls.pbxbtree b/build/test_c_plus.build/test_c_plus.pbxindex/cdecls.pbxbtree new file mode 100644 index 0000000000..a974ec940b Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/cdecls.pbxbtree differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/decls.pbxbtree b/build/test_c_plus.build/test_c_plus.pbxindex/decls.pbxbtree new file mode 100644 index 0000000000..fc587cfdfa Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/decls.pbxbtree differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/files.pbxbtree b/build/test_c_plus.build/test_c_plus.pbxindex/files.pbxbtree new file mode 100644 index 0000000000..c52c4aa7d4 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/files.pbxbtree differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/imports.pbxbtree b/build/test_c_plus.build/test_c_plus.pbxindex/imports.pbxbtree new file mode 100644 index 0000000000..920905dd46 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/imports.pbxbtree differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/pbxindex.header b/build/test_c_plus.build/test_c_plus.pbxindex/pbxindex.header new file mode 100644 index 0000000000..8cebdf7138 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/pbxindex.header differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/protocols.pbxbtree b/build/test_c_plus.build/test_c_plus.pbxindex/protocols.pbxbtree new file mode 100644 index 0000000000..d3f6bb3b64 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/protocols.pbxbtree differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/refs.pbxbtree b/build/test_c_plus.build/test_c_plus.pbxindex/refs.pbxbtree new file mode 100644 index 0000000000..4647c9def0 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/refs.pbxbtree differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/strings.pbxstrings/control b/build/test_c_plus.build/test_c_plus.pbxindex/strings.pbxstrings/control new file mode 100644 index 0000000000..20282f270f Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/strings.pbxstrings/control differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/strings.pbxstrings/strings b/build/test_c_plus.build/test_c_plus.pbxindex/strings.pbxstrings/strings new file mode 100644 index 0000000000..966a2f7db8 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/strings.pbxstrings/strings differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/subclasses.pbxbtree b/build/test_c_plus.build/test_c_plus.pbxindex/subclasses.pbxbtree new file mode 100644 index 0000000000..fa0b7d5fb3 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/subclasses.pbxbtree differ diff --git a/build/test_c_plus.build/test_c_plus.pbxindex/symbols0.pbxsymbols b/build/test_c_plus.build/test_c_plus.pbxindex/symbols0.pbxsymbols new file mode 100644 index 0000000000..f5073864f0 Binary files /dev/null and b/build/test_c_plus.build/test_c_plus.pbxindex/symbols0.pbxsymbols differ diff --git a/field.cpp b/field.cpp new file mode 100644 index 0000000000..4b0d2dc86d --- /dev/null +++ b/field.cpp @@ -0,0 +1,105 @@ +// +// field.cpp +// interface +// +// Created by Philip Rosedale on 8/23/12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#include +#include "field.h" +#include "world.h" +#include + +// A vector-valued field over an array of elements arranged as a 3D lattice + +struct { + float x; + float y; + float z; +} field[FIELD_ELEMENTS]; + + +int field_value(float *value, float *pos) +// sets the vector value (3 floats) to field value at location pos in space. +// returns zero if the location is outside world bounds +{ + int index = (int)(pos[0]/WORLD_SIZE*10.0) + + (int)(pos[1]/WORLD_SIZE*10.0)*10 + + (int)(pos[2]/WORLD_SIZE*10.0)*100; + if ((index >= 0) && (index < FIELD_ELEMENTS)) + { + value[0] = field[index].x; + value[1] = field[index].y; + value[2] = field[index].z; + return 1; + } + else return 0; +} + +void field_init() +// Initializes the field to some random values +{ + int i; + const float FIELD_SCALE = 0.00050; + for (i = 0; i < FIELD_ELEMENTS; i++) + { + field[i].x = (randFloat() - 0.5)*FIELD_SCALE; + field[i].y = (randFloat() - 0.5)*FIELD_SCALE; + field[i].z = (randFloat() - 0.5)*FIELD_SCALE; + } +} + +void field_add(float* add, float *pos) +// At location loc, add vector add to the field values +{ + int index = (int)(pos[0]/WORLD_SIZE*10.0) + + (int)(pos[1]/WORLD_SIZE*10.0)*10 + + (int)(pos[2]/WORLD_SIZE*10.0)*100; + if ((index >= 0) && (index < FIELD_ELEMENTS)) + { + field[index].x += add[0]; + field[index].y += add[0]; + field[index].z += add[0]; + } +} + +void field_render() +// Render the field lines +{ + int i; + float fx, fy, fz; + float scale_view = 1000.0; + + glColor3f(0, 1, 0); + glBegin(GL_LINES); + for (i = 0; i < FIELD_ELEMENTS; i++) + { + fx = (int)(i % 10); + fy = (int)(i%100 / 10); + fz = (int)(i / 100); + + glVertex3f(fx, fy, fz); + glVertex3f(fx + field[i].x*scale_view, + fy + field[i].y*scale_view, + fz + field[i].z*scale_view); + + } + glEnd(); + + glColor3f(0, 1, 0); + glPointSize(4.0); + glEnable(GL_POINT_SMOOTH); + glBegin(GL_POINTS); + + for (i = 0; i < FIELD_ELEMENTS; i++) + { + fx = (int)(i % 10); + fy = (int)(i%100 / 10); + fz = (int)(i / 100); + + glVertex3f(fx, fy, fz); + } + glEnd(); +} + diff --git a/field.h b/field.h new file mode 100644 index 0000000000..8867123fdf --- /dev/null +++ b/field.h @@ -0,0 +1,21 @@ +// +// field.h +// interface +// +// Created by Philip Rosedale on 8/23/12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#ifndef interface_field_h +#define interface_field_h + +// Field is a lattice of vectors uniformly distributed FIELD_ELEMENTS^(1/3) on side + +const int FIELD_ELEMENTS = 1000; + +void field_init(); +int field_value(float *ret, float *pos); +void field_render(); +void field_add(float* add, float *loc); + +#endif diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt new file mode 100755 index 0000000000..d3165dfa02 --- /dev/null +++ b/glm/CMakeLists.txt @@ -0,0 +1,43 @@ +set(NAME glm) + +file(GLOB ROOT_SOURCE *.cpp) +file(GLOB ROOT_INLINE *.inl) +file(GLOB ROOT_HEADER *.hpp) + +file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) +file(GLOB_RECURSE CORE_INLINE ./core/*.inl) +file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) + +file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp) +file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl) +file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp) + +file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) +file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) +file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) + +file(GLOB_RECURSE VIRTREV_SOURCE ./virtrev/*.cpp) +file(GLOB_RECURSE VIRTREV_INLINE ./virtrev/*.inl) +file(GLOB_RECURSE VIRTREV_HEADER ./virtrev/*.hpp) + +source_group("Core Files" FILES ${CORE_SOURCE}) +source_group("Core Files" FILES ${CORE_INLINE}) +source_group("Core Files" FILES ${CORE_HEADER}) +source_group("GTC Files" FILES ${GTC_SOURCE}) +source_group("GTC Files" FILES ${GTC_INLINE}) +source_group("GTC Files" FILES ${GTC_HEADER}) +source_group("GTX Files" FILES ${GTX_SOURCE}) +source_group("GTX Files" FILES ${GTX_INLINE}) +source_group("GTX Files" FILES ${GTX_HEADER}) +source_group("VIRTREV Files" FILES ${VIRTREV_SOURCE}) +source_group("VIRTREV Files" FILES ${VIRTREV_INLINE}) +source_group("VIRTREV Files" FILES ${VIRTREV_HEADER}) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) + +add_executable(${NAME} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${VIRTREV_SOURCE} ${VIRTREV_INLINE} ${VIRTREV_HEADER}) diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp new file mode 100755 index 0000000000..9ff5c523c4 --- /dev/null +++ b/glm/core/_detail.hpp @@ -0,0 +1,468 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_detail.hpp +/// @date 2008-07-24 / 2011-06-14 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_detail +#define glm_core_detail + +#include "setup.hpp" +#include +#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) +#include +#endif + +namespace glm{ +namespace detail +{ + class half; + +#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available + typedef int64_t sint64; + typedef uint64_t uint64; +#elif(GLM_COMPILER & GLM_COMPILER_VC) + typedef signed __int64 sint64; + typedef unsigned __int64 uint64; +#elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG)) + __extension__ typedef signed long long sint64; + __extension__ typedef unsigned long long uint64; +#elif(GLM_COMPILER & GLM_COMPILER_BC) + typedef Int64 sint64; + typedef Uint64 uint64; +#else//unknown compiler + typedef signed long long sint64; + typedef unsigned long long uint64; +#endif//GLM_COMPILER + + template + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F functor, const T& val) + { + return functor(val); + } + }; + + template<> + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F, const T& val) + { + return val; + } + }; + + //template + //struct traits + //{ + // static const bool is_signed = false; + // static const bool is_float = false; + // static const bool is_vector = false; + // static const bool is_matrix = false; + // static const bool is_genType = false; + // static const bool is_genIType = false; + // static const bool is_genUType = false; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template + //struct desc + //{ + // typedef genType type; + // typedef genType * pointer; + // typedef genType const* const_pointer; + // typedef genType const *const const_pointer_const; + // typedef genType *const pointer_const; + // typedef genType & reference; + // typedef genType const& const_reference; + // typedef genType const& param_type; + + // typedef typename genType::value_type value_type; + // typedef typename genType::size_type size_type; + // static const typename size_type value_size; + //}; + + //template + //const typename desc::size_type desc::value_size = genType::value_size(); + + union uif32 + { + GLM_FUNC_QUALIFIER uif32() : + i(0) + {} + + GLM_FUNC_QUALIFIER uif32(float f) : + f(f) + {} + + GLM_FUNC_QUALIFIER uif32(unsigned int i) : + i(i) + {} + + float f; + unsigned int i; + }; + + union uif64 + { + GLM_FUNC_QUALIFIER uif64() : + i(0) + {} + + GLM_FUNC_QUALIFIER uif64(double f) : + f(f) + {} + + GLM_FUNC_QUALIFIER uif64(uint64 i) : + i(i) + {} + + double f; + uint64 i; + }; + + typedef uif32 uif; + + ////////////////// + // int + + template + struct is_int + { + enum is_int_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_INT(T) \ + template <> \ + struct is_int \ + { \ + enum is_int_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // uint + + template + struct is_uint + { + enum is_uint_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_UINT(T) \ + template <> \ + struct is_uint \ + { \ + enum is_uint_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + //GLM_DETAIL_IS_UINT(unsigned long long) + + ////////////////// + // float + + template + struct is_float + { + enum is_float_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_FLOAT(T) \ + template <> \ + struct is_float \ + { \ + enum is_float_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + GLM_DETAIL_IS_FLOAT(detail::half); + GLM_DETAIL_IS_FLOAT(float); + GLM_DETAIL_IS_FLOAT(double); + GLM_DETAIL_IS_FLOAT(long double); + + ////////////////// + // bool + + template + struct is_bool + { + enum is_bool_enum + { + _YES = 0, + _NO = 1 + }; + }; + + template <> + struct is_bool + { + enum is_bool_enum + { + _YES = 1, + _NO = 0 + }; + }; + + ////////////////// + // vector + + template + struct is_vector + { + enum is_vector_enum + { + _YES = 0, + _NO = 1 + }; + }; + +# define GLM_DETAIL_IS_VECTOR(TYPE) \ + template \ + struct is_vector > \ + { \ + enum is_vector_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // matrix + + template + struct is_matrix + { + enum is_matrix_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_MATRIX(T) \ + template <> \ + struct is_matrix \ + { \ + enum is_matrix_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // type + + template + struct type + { + enum type_enum + { + is_float = is_float::_YES, + is_int = is_int::_YES, + is_uint = is_uint::_YES, + is_bool = is_bool::_YES + }; + }; + + ////////////////// + // type + + typedef signed char int8; + typedef signed short int16; + typedef signed int int32; + typedef detail::sint64 int64; + + typedef unsigned char uint8; + typedef unsigned short uint16; + typedef unsigned int uint32; + typedef detail::uint64 uint64; + + typedef detail::half float16; + typedef float float32; + typedef double float64; + + ////////////////// + // float_or_int_trait + + struct float_or_int_value + { + enum + { + GLM_ERROR, + GLM_FLOAT, + GLM_INT + }; + }; + + template + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_ERROR}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + +}//namespace detail +}//namespace glm + +#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) +# define GLM_DEPRECATED __declspec(deprecated) +# define GLM_ALIGN(x) __declspec(align(x)) +# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct +# define GLM_RESTRICT __declspec(restrict) +# define GLM_RESTRICT_VAR __restrict +#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) +# define GLM_DEPRECATED __attribute__((__deprecated__)) +# define GLM_ALIGN(x) __attribute__((aligned(x))) +# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) +# if(GLM_COMPILER >= GLM_COMPILER_GCC33) +# define GLM_RESTRICT __restrict__ +# define GLM_RESTRICT_VAR __restrict__ +# else +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR +# endif +# define GLM_RESTRICT __restrict__ +# define GLM_RESTRICT_VAR __restrict__ +#else +# define GLM_DEPRECATED +# define GLM_ALIGN +# define GLM_ALIGNED_STRUCT(x) +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR +#endif//GLM_COMPILER + +#endif//glm_core_detail diff --git a/glm/core/_fixes.hpp b/glm/core/_fixes.hpp new file mode 100755 index 0000000000..420a3225b3 --- /dev/null +++ b/glm/core/_fixes.hpp @@ -0,0 +1,55 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_fixes.hpp +/// @date 2011-02-21 / 2011-11-22 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include + +//! Workaround for compatibility with other libraries +#ifdef max +#undef max +#endif + +//! Workaround for compatibility with other libraries +#ifdef min +#undef min +#endif + +//! Workaround for Android +#ifdef isnan +#undef isnan +#endif + +//! Workaround for Android +#ifdef isinf +#undef isinf +#endif + +//! Workaround for Chrone Native Client +#ifdef log2 +#undef log2 +#endif + diff --git a/glm/core/_swizzle.hpp b/glm/core/_swizzle.hpp new file mode 100755 index 0000000000..1ef27c2e60 --- /dev/null +++ b/glm/core/_swizzle.hpp @@ -0,0 +1,837 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_swizzle.hpp +/// @date 2006-04-20 / 2011-02-16 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_swizzle +#define glm_core_swizzle + +#include "_swizzle_func.hpp" + +namespace glm +{ + enum comp + { + X = 0, + R = 0, + S = 0, + Y = 1, + G = 1, + T = 1, + Z = 2, + B = 2, + P = 2, + W = 3, + A = 3, + Q = 3 + }; +}//namespace glm + +namespace glm{ +namespace detail +{ + // Internal class for implementing swizzle operators + template + struct _swizzle_base0 + { + typedef T value_type; + + protected: + value_type& elem (size_t i) { return (reinterpret_cast(_buffer))[i]; } + const value_type& elem (size_t i) const { return (reinterpret_cast(_buffer))[i]; } + + // Use an opaque buffer to *ensure* the compiler doesn't call a constructor. + // The size 1 buffer is assumed to aligned to the actual members so that the + // elem() + char _buffer[1]; + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1)); } + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); } + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } + }; + + // Internal class for implementing swizzle operators + /* + Template parameters: + + ValueType = type of scalar values (e.g. float, double) + VecType = class the swizzle is applies to (e.g. tvec3) + N = number of components in the vector (e.g. 3) + E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec + + DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles + containing duplicate elements so that they cannot be used as r-values). + */ + template + struct _swizzle_base2 : public _swizzle_base1 + { + typedef VecType vec_type; + typedef ValueType value_type; + + _swizzle_base2& operator= (const ValueType& t) + { + for (int i = 0; i < N; ++i) + (*this)[i] = t; + return *this; + } + + _swizzle_base2& operator= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e = t; } + }; + _apply_op(that, op()); + return *this; + } + + void operator -= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e -= t; } + }; + _apply_op(that, op()); + } + + void operator += (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e += t; } + }; + _apply_op(that, op()); + } + + void operator *= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e *= t; } + }; + _apply_op(that, op()); + } + + void operator /= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e /= t; } + }; + _apply_op(that, op()); + } + + value_type& operator[] (size_t i) + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + value_type operator[] (size_t i) const + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + protected: + template + void _apply_op(const VecType& that, T op) + { + // Make a copy of the data in this == &that. + // The copier should optimize out the copy in cases where the function is + // properly inlined and the copy is not necessary. + ValueType t[N]; + for (int i = 0; i < N; ++i) + t[i] = that[i]; + for (int i = 0; i < N; ++i) + op( (*this)[i], t[i] ); + } + }; + + // Specialization for swizzles containing duplicate elements. These cannot be modified. + template + struct _swizzle_base2 : public _swizzle_base1 + { + typedef VecType vec_type; + typedef ValueType value_type; + + struct Stub {}; + _swizzle_base2& operator= (Stub const &) {} + + value_type operator[] (size_t i) const + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + }; + + template + struct swizzle : public _swizzle_base2 + { + typedef _swizzle_base2 base_type; + + using base_type::operator=; + + operator VecType () const { return (*this)(); } + }; + +// +// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros +// +#define _GLM_SWIZZLE_TEMPLATE1 template +#define _GLM_SWIZZLE_TEMPLATE2 template +#define _GLM_SWIZZLE_TYPE1 glm::detail::swizzle +#define _GLM_SWIZZLE_TYPE2 glm::detail::swizzle + +// +// Wrapper for a binary operator (e.g. u.yy + v.zy) +// +#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ + _GLM_SWIZZLE_TEMPLATE2 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + { \ + return a() OPERAND b(); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \ + { \ + return a() OPERAND b; \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return a OPERAND b(); \ + } + +// +// Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz) +// +#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \ + { \ + return a() OPERAND b; \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return a OPERAND b(); \ + } + +// +// Macro for wrapping a function taking one argument (e.g. abs()) +// +#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \ + { \ + return FUNCTION(a()); \ + } + +// +// Macro for wrapping a function taking two vector arguments (e.g. dot()). +// +#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE2 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + { \ + return FUNCTION(a(), b()); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return FUNCTION(a(), b()); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \ + { \ + return FUNCTION(a(), b); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return FUNCTION(a, b()); \ + } + +// +// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()). +// +#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE2 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \ + { \ + return FUNCTION(a(), b(), c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ + { \ + return FUNCTION(a(), b(), c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\ + { \ + return FUNCTION(a(), b, c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ + { \ + return FUNCTION(a, b(), c); \ + } + +}//namespace detail +}//namespace glm + +namespace glm +{ + namespace detail + { + _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-) + _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*) + + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/) + } + + // + // Swizzles are distinct types from the unswizzled type. The below macros will + // provide template specializations for the swizzle types for the given functions + // so that the compiler does not have any ambiguity to choosing how to handle + // the function. + // + // The alternative is to use the operator()() when calling the function in order + // to explicitly convert the swizzled type to the unswizzled type. + // + + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, abs); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acos); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acosh); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, all); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, any); + + //_GLM_SWIZZLE_FUNCTION_2_ARGS(value_type, dot); + //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, cross); + //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, step); + //_GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix); +} + +#define _GLM_SWIZZLE2_2_MEMBERS(T,P,E0,E1) \ + struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; + +#define _GLM_SWIZZLE2_3_MEMBERS(T,P2,E0,E1) \ + struct { glm::detail::swizzle<3,T,P2,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,1,1,1,-1> E1 ## E1 ## E1; }; + +#define _GLM_SWIZZLE2_4_MEMBERS(T,P2,E0,E1) \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; }; + +#define _GLM_SWIZZLE3_2_MEMBERS(T,P2,E0,E1,E2) \ + struct { glm::detail::swizzle<2,T,P2,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,0,2,-1,-2> E0 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P2,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,1,1,-1,-2> E1 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,1,2,-1,-2> E1 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P2,2,0,-1,-2> E2 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,2,1,-1,-2> E2 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,2,2,-1,-2> E2 ## E2; }; + +#define _GLM_SWIZZLE3_3_MEMBERS(T,P,E0,E1,E2) \ + struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; }; + +#define _GLM_SWIZZLE3_4_MEMBERS(T,P2,E0,E1,E2) \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,2> E2 ## E2 ## E2 ## E2; }; + +#define _GLM_SWIZZLE4_2_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,0,2,-1,-2> E0 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,0,3,-1,-2> E0 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,1,2,-1,-2> E1 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,1,3,-1,-2> E1 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,2,0,-1,-2> E2 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,2,1,-1,-2> E2 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,2,2,-1,-2> E2 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,2,3,-1,-2> E2 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,3,0,-1,-2> E3 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,3,1,-1,-2> E3 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,3,2,-1,-2> E3 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,3,3,-1,-2> E3 ## E3; }; + +#define _GLM_SWIZZLE4_3_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,3,-1> E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,3,-1> E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,3,-1> E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,0,-1> E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,1,-1> E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,2,-1> E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,3,-1> E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,3,-1> E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,3,-1> E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,3,-1> E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,0,-1> E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,1,-1> E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,2,-1> E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,3,-1> E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,3,-1> E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,3,-1> E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,3,-1> E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,0,-1> E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,1,-1> E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,2,-1> E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,3,-1> E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,0,-1> E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,1,-1> E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,2,-1> E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,3,-1> E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,0,-1> E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,1,-1> E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,2,-1> E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,3,-1> E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,0,-1> E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,1,-1> E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,2,-1> E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,3,-1> E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,0,-1> E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,1,-1> E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,2,-1> E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,3,-1> E3 ## E3 ## E3; }; + +#define _GLM_SWIZZLE4_4_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<4,T,P,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,3> E0 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,3> E0 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,3> E0 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,0> E0 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,1> E0 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,2> E0 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,3> E0 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,3> E0 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,3> E0 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,3> E0 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,0> E0 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,1> E0 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,2> E0 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,3> E0 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,3> E0 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,3> E0 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,3> E0 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,0> E0 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,1> E0 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,2> E0 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,3> E0 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,3> E1 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,3> E1 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,3> E1 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,0> E1 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,1> E1 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,2> E1 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,3> E1 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,3> E1 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,3> E1 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,3> E1 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,0> E1 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,1> E1 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,2> E1 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,3> E1 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,3> E1 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,3> E1 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,3> E1 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,0> E1 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,1> E1 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,2> E1 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,3> E1 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,0> E1 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,1> E1 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,2> E1 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,3> E1 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,0> E1 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,1> E1 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,2> E1 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,3> E1 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,0> E1 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,1> E1 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,2> E1 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,3> E1 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,0> E1 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,1> E1 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,2> E1 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,3> E1 ## E3 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,3> E2 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,3> E2 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,3> E2 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,0> E2 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,1> E2 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,2> E2 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,3> E2 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,3> E2 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,3> E2 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,3> E2 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,0> E2 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,1> E2 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,2> E2 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,3> E2 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,3> E2 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,3> E2 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,2> E2 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,3> E2 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,0> E2 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,1> E2 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,2> E2 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,3> E2 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,0> E2 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,1> E2 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,2> E2 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,3> E2 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,0> E2 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,1> E2 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,2> E2 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,3> E2 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,0> E2 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,1> E2 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,2> E2 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,3> E2 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,0> E2 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,1> E2 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,2> E2 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,3> E2 ## E3 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,0> E3 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,1> E3 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,2> E3 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,3> E3 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,0> E3 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,1> E3 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,2> E3 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,3> E3 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,0> E3 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,1> E3 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,2> E3 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,3> E3 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,0> E3 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,1> E3 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,2> E3 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,3> E3 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,0> E3 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,1> E3 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,2> E3 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,3> E3 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,0> E3 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,1> E3 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,2> E3 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,3> E3 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,0> E3 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,1> E3 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,2> E3 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,3> E3 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,0> E3 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,1> E3 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,2> E3 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,3> E3 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,0> E3 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,1> E3 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,2> E3 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,3> E3 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,0> E3 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,1> E3 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,2> E3 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,3> E3 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,0> E3 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,1> E3 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,2> E3 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,3> E3 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,0> E3 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,1> E3 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,2> E3 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,3> E3 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,0> E3 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,1> E3 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,2> E3 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,3> E3 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,0> E3 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,1> E3 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,2> E3 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,3> E3 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,0> E3 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,1> E3 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,2> E3 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,3> E3 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,0> E3 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,1> E3 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,2> E3 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,3> E3 ## E3 ## E3 ## E3; }; + +#endif//glm_core_swizzle diff --git a/glm/core/_swizzle_func.hpp b/glm/core/_swizzle_func.hpp new file mode 100755 index 0000000000..90a895d63d --- /dev/null +++ b/glm/core/_swizzle_func.hpp @@ -0,0 +1,787 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_swizzle_func.hpp +/// @date 2011-10-16 / 2011-10-16 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_swizzle_func +#define glm_core_swizzle_func + +#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ + SWIZZLED_TYPE A ## B() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B); \ + } + +#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ + SWIZZLED_TYPE A ## B ## C() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C); \ + } + +#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ + SWIZZLED_TYPE A ## B ## C ## D() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ + } + +#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B); \ + } + +#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B ## C() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C); \ + } + +#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B ## C ## D() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ + } + +#define GLM_MUTABLE + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2) + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) + +#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, q) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3) + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C) + +#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B) + +#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q, p) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q, p) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4) + +#endif//glm_core_swizzle_func diff --git a/glm/core/_vectorize.hpp b/glm/core/_vectorize.hpp new file mode 100755 index 0000000000..01b49a8ec0 --- /dev/null +++ b/glm/core/_vectorize.hpp @@ -0,0 +1,159 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_vectorize.hpp +/// @date 2011-10-14 / 2011-10-14 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#define VECTORIZE2_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func( \ + detail::tvec2 const & v) \ + { \ + return detail::tvec2( \ + func(v.x), \ + func(v.y)); \ + } + +#define VECTORIZE3_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func( \ + detail::tvec3 const & v) \ + { \ + return detail::tvec3( \ + func(v.x), \ + func(v.y), \ + func(v.z)); \ + } + +#define VECTORIZE4_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func( \ + detail::tvec4 const & v) \ + { \ + return detail::tvec4( \ + func(v.x), \ + func(v.y), \ + func(v.z), \ + func(v.w)); \ + } + +#define VECTORIZE_VEC(func) \ + VECTORIZE2_VEC(func) \ + VECTORIZE3_VEC(func) \ + VECTORIZE4_VEC(func) + +#define VECTORIZE2_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func \ + ( \ + detail::tvec2 const & x, \ + typename detail::tvec2::value_type const & y \ + ) \ + { \ + return detail::tvec2( \ + func(x.x, y), \ + func(x.y, y)); \ + } + +#define VECTORIZE3_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func \ + ( \ + detail::tvec3 const & x, \ + typename detail::tvec3::value_type const & y \ + ) \ + { \ + return detail::tvec3( \ + func(x.x, y), \ + func(x.y, y), \ + func(x.z, y)); \ + } + +#define VECTORIZE4_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func \ + ( \ + detail::tvec4 const & x, \ + typename detail::tvec4::value_type const & y \ + ) \ + { \ + return detail::tvec4( \ + func(x.x, y), \ + func(x.y, y), \ + func(x.z, y), \ + func(x.w, y)); \ + } + +#define VECTORIZE_VEC_SCA(func) \ + VECTORIZE2_VEC_SCA(func) \ + VECTORIZE3_VEC_SCA(func) \ + VECTORIZE4_VEC_SCA(func) + +#define VECTORIZE2_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func \ + ( \ + detail::tvec2 const & x, \ + detail::tvec2 const & y \ + ) \ + { \ + return detail::tvec2( \ + func(x.x, y.x), \ + func(x.y, y.y)); \ + } + +#define VECTORIZE3_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func \ + ( \ + detail::tvec3 const & x, \ + detail::tvec3 const & y \ + ) \ + { \ + return detail::tvec3( \ + func(x.x, y.x), \ + func(x.y, y.y), \ + func(x.z, y.z)); \ + } + +#define VECTORIZE4_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func \ + ( \ + detail::tvec4 const & x, \ + detail::tvec4 const & y \ + ) \ + { \ + return detail::tvec4( \ + func(x.x, y.x), \ + func(x.y, y.y), \ + func(x.z, y.z), \ + func(x.w, y.w)); \ + } + +#define VECTORIZE_VEC_VEC(func) \ + VECTORIZE2_VEC_VEC(func) \ + VECTORIZE3_VEC_VEC(func) \ + VECTORIZE4_VEC_VEC(func) diff --git a/glm/core/dummy.cpp b/glm/core/dummy.cpp new file mode 100755 index 0000000000..f4df71873f --- /dev/null +++ b/glm/core/dummy.cpp @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/dummy.cpp +/// @date 2011-01-19 / 2011-06-15 +/// @author Christophe Riccio +/// +/// GLM is a header only library. There is nothing to compile. +/// dummy.cpp exist only a wordaround for CMake file. +/////////////////////////////////////////////////////////////////////////////////// + +#define GLM_MESSAGES +#include "../glm.hpp" +#include "../ext.hpp" + +//#error "GLM is a header only library" + +int main() +{ + +} diff --git a/glm/core/func_common.hpp b/glm/core/func_common.hpp new file mode 100755 index 0000000000..4a696e3d1e --- /dev/null +++ b/glm/core/func_common.hpp @@ -0,0 +1,428 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_common.hpp +/// @date 2008-03-08 / 2010-01-26 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.3 Common Functions +/// +/// @defgroup core_func_common Common functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_common +#define GLM_CORE_func_common GLM_VERSION + +#include "_fixes.hpp" + +namespace glm +{ + /// @addtogroup core_func_common + /// @{ + + /// Returns x if x >= 0; otherwise, it returns -x. + /// + /// @tparam genType floating-point or signed integer; scalar or vector types. + /// + /// @see GLSL abs man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType abs(genType const & x); + + /// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. + /// + /// @tparam genType Floating-point or signed integer; scalar or vector types. + /// + /// @see GLSL sign man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType sign(genType const & x); + + /// Returns a value equal to the nearest integer that is less then or equal to x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL floor man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType floor(genType const & x); + + /// Returns a value equal to the nearest integer to x + /// whose absolute value is not larger than the absolute value of x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL trunc man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType trunc(genType const & x); + + /// Returns a value equal to the nearest integer to x. + /// The fraction 0.5 will round in a direction chosen by the + /// implementation, presumably the direction that is fastest. + /// This includes the possibility that round(x) returns the + /// same value as roundEven(x) for all values of x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL round man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType round(genType const & x); + + /// Returns a value equal to the nearest integer to x. + /// A fractional part of 0.5 will round toward the nearest even + /// integer. (Both 3.5 and 4.5 for x will return 4.0.) + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL roundEven man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// @see New round to even technique + template + genType roundEven(genType const & x); + + /// Returns a value equal to the nearest integer + /// that is greater than or equal to x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL ceil man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType ceil(genType const & x); + + /// Return x - floor(x). + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL fract man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType fract(genType const & x); + + /// Modulus. Returns x - y * floor(x / y) + /// for each component in x using the floating point value y. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL mod man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType mod( + genType const & x, + genType const & y); + + /// Modulus. Returns x - y * floor(x / y) + /// for each component in x using the floating point value y. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL mod man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType mod( + genType const & x, + typename genType::value_type const & y); + + /// Returns the fractional part of x and sets i to the integer + /// part (as a whole number floating point value). Both the + /// return value and the output parameter will have the same + /// sign as x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL modf man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType modf( + genType const & x, + genType & i); + + /// Returns y if y < x; otherwise, it returns x. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL min man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType min( + genType const & x, + genType const & y); + + template + genType min( + genType const & x, + typename genType::value_type const & y); + + /// Returns y if x < y; otherwise, it returns x. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL max man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType max( + genType const & x, + genType const & y); + + template + genType max( + genType const & x, + typename genType::value_type const & y); + + /// Returns min(max(x, minVal), maxVal) for each component in x + /// using the floating-point values minVal and maxVal. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL clamp man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType clamp( + genType const & x, + genType const & minVal, + genType const & maxVal); + + template + genType clamp( + genType const & x, + typename genType::value_type const & minVal, + typename genType::value_type const & maxVal); + + //! @return If genTypeU is a floating scalar or vector: + //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of + //! x and y using the floating-point value a. + //! The value for a is not restricted to the range [0, 1]. + //! + //! @return If genTypeU is a boolean scalar or vector: + //! Selects which vector each returned component comes + //! from. For a component of a that is false, the + //! corresponding component of x is returned. For a + //! component of a that is true, the corresponding + //! component of y is returned. Components of x and y that + //! are not selected are allowed to be invalid floating point + //! values and will have no effect on the results. Thus, this + //! provides different functionality than + //! genType mix(genType x, genType y, genType(a)) + //! where a is a Boolean vector. + /// + /// @see GLSL mix man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @param[in] x Value to interpolate. + /// @param[in] y Value to interpolate. + /// @param[in] a Interpolant. + /// + /// @tparam genTypeT Floating point scalar or vector. + /// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT. + /// + /// @code + /// #include + /// ... + /// float a; + /// bool b; + /// glm::dvec3 e; + /// glm::dvec3 f; + /// glm::vec4 g; + /// glm::vec4 h; + /// ... + /// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors. + /// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h; + /// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second. + /// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter. + /// @endcode + template + genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a); + + //! Returns 0.0 if x < edge, otherwise it returns 1.0. + //! + /// @see GLSL step man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType step( + genType const & edge, + genType const & x); + + template + genType step( + typename genType::value_type const & edge, + genType const & x); + + /// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and + /// performs smooth Hermite interpolation between 0 and 1 + /// when edge0 < x < edge1. This is useful in cases where + /// you would want a threshold function with a smooth + /// transition. This is equivalent to: + /// genType t; + /// t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); + /// return t * t * (3 – 2 * t); + /// Results are undefined if edge0 >= edge1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL smoothstep man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType smoothstep( + genType const & edge0, + genType const & edge1, + genType const & x); + + template + genType smoothstep( + typename genType::value_type const & edge0, + typename genType::value_type const & edge1, + genType const & x); + + /// Returns true if x holds a NaN (not a number) + /// representation in the underlying implementation's set of + /// floating point representations. Returns false otherwise, + /// including for implementations with no NaN + /// representations. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL isnan man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + typename genType::bool_type isnan(genType const & x); + + /// Returns true if x holds a positive infinity or negative + /// infinity representation in the underlying implementation's + /// set of floating point representations. Returns false + /// otherwise, including for implementations with no infinity + /// representations. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL isinf man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + typename genType::bool_type isinf(genType const & x); + + /// Returns a signed integer value representing + /// the encoding of a floating-point value. The floatingpoint + /// value's bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL floatBitsToInt man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genIType floatBitsToInt(genType const & value); + + /// Returns a unsigned integer value representing + /// the encoding of a floating-point value. The floatingpoint + /// value's bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL floatBitsToUint man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genUType floatBitsToUint(genType const & value); + + /// Returns a floating-point value corresponding to a signed + /// integer encoding of a floating-point value. + /// If an inf or NaN is passed in, it will not signal, and the + /// resulting floating point value is unspecified. Otherwise, + /// the bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL intBitsToFloat man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @todo Clarify this declaration, we don't need to actually specify the return type + template + genType intBitsToFloat(genIType const & value); + + /// Returns a floating-point value corresponding to a + /// unsigned integer encoding of a floating-point value. + /// If an inf or NaN is passed in, it will not signal, and the + /// resulting floating point value is unspecified. Otherwise, + /// the bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL uintBitsToFloat man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @todo Clarify this declaration, we don't need to actually specify the return type + template + genType uintBitsToFloat(genUType const & value); + + /// Computes and returns a * b + c. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL fma man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType fma(genType const & a, genType const & b, genType const & c); + + /// Splits x into a floating-point significand in the range + /// [0.5, 1.0) and an integral exponent of two, such that: + /// x = significand * exp(2, exponent) + /// + /// The significand is returned by the function and the + /// exponent is returned in the parameter exp. For a + /// floating-point value of zero, the significant and exponent + /// are both zero. For a floating-point value that is an + /// infinity or is not a number, the results are undefined. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL frexp man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType frexp(genType const & x, genIType & exp); + + /// Builds a floating-point number from x and the + /// corresponding integral exponent of two in exp, returning: + /// significand * exp(2, exponent) + /// + /// If this product is too large to be represented in the + /// floating-point type, the result is undefined. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL ldexp man page; + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType ldexp(genType const & x, genIType const & exp); + + /// @} +}//namespace glm + +#include "func_common.inl" + +#endif//GLM_CORE_func_common diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl new file mode 100755 index 0000000000..5599cb4844 --- /dev/null +++ b/glm/core/func_common.inl @@ -0,0 +1,1187 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_common.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include "_vectorize.hpp" + +namespace glm{ +namespace detail +{ + template + struct Abs_ + {}; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int, "'abs' only accept floating-point and integer inputs"); + return x >= genFIType(0) ? x : -x; + // TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff; + } + }; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_uint, "'abs' only accept floating-point and integer inputs"); + return x; + } + }; +}//namespace detail + + // abs + template + GLM_FUNC_QUALIFIER genFIType abs + ( + genFIType const & x + ) + { + return detail::Abs_::is_signed>::get(x); + } + + VECTORIZE_VEC(abs) + + // sign + //Try something like based on x >> 31 to get the sign bit + template + GLM_FUNC_QUALIFIER genFIType sign + ( + genFIType const & x + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int, "'sign' only accept signed inputs"); + + genFIType result; + if(x > genFIType(0)) + result = genFIType(1); + else if(x < genFIType(0)) + result = genFIType(-1); + else + result = genFIType(0); + return result; + } + + VECTORIZE_VEC(sign) + + // floor + template <> + GLM_FUNC_QUALIFIER detail::half floor(detail::half const & x) + { + return detail::half(::std::floor(float(x))); + } + + template + GLM_FUNC_QUALIFIER genType floor(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'floor' only accept floating-point inputs"); + + return ::std::floor(x); + } + + VECTORIZE_VEC(floor) + + // trunc + template + GLM_FUNC_QUALIFIER genType trunc(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'trunc' only accept floating-point inputs"); + return x < 0 ? -floor(-x) : floor(x); + } + + VECTORIZE_VEC(trunc) + + // round + template + GLM_FUNC_QUALIFIER genType round(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'round' only accept floating-point inputs"); + + if(x < 0) + return genType(int(x - genType(0.5))); + return genType(int(x + genType(0.5))); + } + + VECTORIZE_VEC(round) + +/* + // roundEven + template + GLM_FUNC_QUALIFIER genType roundEven(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); + + return genType(int(x + genType(int(x) % 2))); + } +*/ + + // roundEven + template + GLM_FUNC_QUALIFIER genType roundEven(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); + + int Integer = int(x); + genType IntegerPart = genType(Integer); + genType FractionalPart = fract(x); + + if(FractionalPart > genType(0.5) || FractionalPart < genType(0.5)) + { + return round(x); + } + else if((Integer % 2) == 0) + { + return IntegerPart; + } + else if(x <= genType(0)) // Work around... + { + return IntegerPart - 1; + } + else + { + return IntegerPart + 1; + } + //else // Bug on MinGW 4.5.2 + //{ + // return mix(IntegerPart + genType(-1), IntegerPart + genType(1), x <= genType(0)); + //} + } + + VECTORIZE_VEC(roundEven) + + // ceil + template + GLM_FUNC_QUALIFIER genType ceil(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'ceil' only accept floating-point inputs"); + + return ::std::ceil(x); + } + + VECTORIZE_VEC(ceil) + + // fract + template + GLM_FUNC_QUALIFIER genType fract + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'fract' only accept floating-point inputs"); + + return x - ::std::floor(x); + } + + VECTORIZE_VEC(fract) + + // mod + template + GLM_FUNC_QUALIFIER genType mod + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mod' only accept floating-point inputs"); + + return x - y * floor(x / y); + } + + VECTORIZE_VEC_SCA(mod) + VECTORIZE_VEC_VEC(mod) + + // modf + template + GLM_FUNC_QUALIFIER genType modf + ( + genType const & x, + genType & i + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'modf' only accept floating-point inputs"); + + return std::modf(x, &i); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 modf + ( + detail::tvec2 const & x, + detail::tvec2 & i + ) + { + return detail::tvec2( + modf(x.x, i.x), + modf(x.y, i.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 modf + ( + detail::tvec3 const & x, + detail::tvec3 & i + ) + { + return detail::tvec3( + modf(x.x, i.x), + modf(x.y, i.y), + modf(x.z, i.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 modf + ( + detail::tvec4 const & x, + detail::tvec4 & i + ) + { + return detail::tvec4( + modf(x.x, i.x), + modf(x.y, i.y), + modf(x.z, i.z), + modf(x.w, i.w)); + } + + //// Only valid if (INT_MIN <= x-y <= INT_MAX) + //// min(x,y) + //r = y + ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT – 1))); + //// max(x,y) + //r = x - ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT - 1))); + + // min + template + GLM_FUNC_QUALIFIER genType min + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'min' only accept numbers"); + + return x < y ? x : y; + } + + VECTORIZE_VEC_SCA(min) + VECTORIZE_VEC_VEC(min) + + // max + template + GLM_FUNC_QUALIFIER genType max + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'max' only accept numbers"); + + return x > y ? x : y; + } + + VECTORIZE_VEC_SCA(max) + VECTORIZE_VEC_VEC(max) + + // clamp + template + GLM_FUNC_QUALIFIER valType clamp + ( + valType const & x, + valType const & minVal, + valType const & maxVal + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'clamp' only accept numbers"); + + // Old implementation, less predictable branching + //if(x >= maxVal) return maxVal; + //if(x <= minVal) return minVal; + //return x; + return max(min(x, maxVal), minVal); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & minVal, + typename detail::tvec2::value_type const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type const & minVal, + typename detail::tvec3::value_type const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & minVal, + typename detail::tvec4::value_type const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal), + clamp(x.w, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & x, + detail::tvec2 const & minVal, + detail::tvec2 const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & x, + detail::tvec3 const & minVal, + detail::tvec3 const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & x, + detail::tvec4 const & minVal, + detail::tvec4 const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z), + clamp(x.w, minVal.w, maxVal.w)); + } + + // mix + template + GLM_FUNC_QUALIFIER genTypeT mix + ( + genTypeT const & x, + genTypeT const & y, + genTypeU const & a + ) + { + // It could be a vector too + //GLM_STATIC_ASSERT( + // detail::type::is_float && + // detail::type::is_float); + + //return x + a * (y - x); + return genTypeT(genTypeU(x) + a * genTypeU(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valTypeB const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valTypeB const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valTypeB const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + //template + //GLM_FUNC_QUALIFIER genTypeT mix + //( + // genTypeT const & x, + // genTypeT const & y, + // float const & a + //) + //{ + // // It could be a vector too + // //GLM_STATIC_ASSERT( + // // detail::type::is_float && + // // detail::type::is_float); + + // return x + a * (y - x); + //} + + template + GLM_FUNC_QUALIFIER genType mix + ( + genType const & x, + genType const & y, + bool const & a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + return a ? y : x; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + typename detail::tvec2::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec2 result; + for + ( + typename detail::tvec2::size_type i = 0; + i < detail::tvec2::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + typename detail::tvec3::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec3 result; + for + ( + typename detail::tvec3::size_type i = 0; + i < detail::tvec3::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + typename detail::tvec4::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec4 result; + for + ( + typename detail::tvec4::size_type i = 0; + i < detail::tvec4::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + // step + template + GLM_FUNC_QUALIFIER genType step + ( + genType const & edge, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + return x < edge ? genType(0) : genType(1); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 step + ( + typename detail::tvec2::value_type const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 step + ( + typename detail::tvec3::value_type const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1), + x.z < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 step + ( + typename detail::tvec4::value_type const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1), + x.z < edge ? T(0) : T(1), + x.w < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 step + ( + detail::tvec2 const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 step + ( + detail::tvec3 const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1), + x.z < edge.z ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 step + ( + detail::tvec4 const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1), + x.z < edge.z ? T(0) : T(1), + x.w < edge.w ? T(0) : T(1)); + } + + // smoothstep + template + GLM_FUNC_QUALIFIER genType smoothstep + ( + genType const & edge0, + genType const & edge1, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)); + return tmp * tmp * (genType(3) - genType(2) * tmp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 smoothstep + ( + typename detail::tvec2::value_type const & edge0, + typename detail::tvec2::value_type const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 smoothstep + ( + typename detail::tvec3::value_type const & edge0, + typename detail::tvec3::value_type const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 smoothstep + ( + typename detail::tvec4::value_type const & edge0, + typename detail::tvec4::value_type const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z), + smoothstep(edge0, edge1, x.w)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 smoothstep + ( + detail::tvec2 const & edge0, + detail::tvec2 const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 smoothstep + ( + detail::tvec3 const & edge0, + detail::tvec3 const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 smoothstep + ( + detail::tvec4 const & edge0, + detail::tvec4 const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z), + smoothstep(edge0.w, edge1.w, x.w)); + } + + template + GLM_FUNC_QUALIFIER bool isnan(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'isnan' only accept floating-point inputs"); + +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _isnan(x) != 0; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isnan(x) != 0; +# else + return std::isnan(x) != 0; +# endif +# else + return std::isnan(x) != 0; +# endif + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isnan + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isnan(x.x), + isnan(x.y)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isnan + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isnan + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z), + isnan(x.w)); + } + + template + GLM_FUNC_QUALIFIER bool isinf( + genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'isinf' only accept floating-point inputs"); + +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isinf(x) != 0; +# else + return std::isinf(x) != 0; +# endif +# else + return std::isinf(x) != 0; +# endif + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isinf + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isinf(x.x), + isinf(x.y)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isinf + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isinf(x.x), + isinf(x.y), + isinf(x.z)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isinf + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isinf(x.x), + isinf(x.y), + isinf(x.z), + isinf(x.w)); + } + + GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value) + { + union + { + float f; + int i; + } fi; + + fi.f = value; + return fi.i; + } + + GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToInt + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToInt + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToInt(value.x), + floatBitsToInt(value.y), + floatBitsToInt(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToInt + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToInt(value.x), + floatBitsToInt(value.y), + floatBitsToInt(value.z), + floatBitsToInt(value.w)); + } + + GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value) + { + union + { + float f; + uint u; + } fu; + + fu.f = value; + return fu.u; + } + + GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToUint + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToUint + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToUint(value.x), + floatBitsToUint(value.y), + floatBitsToUint(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToUint + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToUint(value.x), + floatBitsToUint(value.y), + floatBitsToUint(value.z), + floatBitsToUint(value.w)); + } + + GLM_FUNC_QUALIFIER float intBitsToFloat(int const & value) + { + union + { + float f; + int i; + } fi; + + fi.i = value; + return fi.f; + } + + GLM_FUNC_QUALIFIER detail::tvec2 intBitsToFloat + + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 intBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + intBitsToFloat(value.x), + intBitsToFloat(value.y), + intBitsToFloat(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 intBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + intBitsToFloat(value.x), + intBitsToFloat(value.y), + intBitsToFloat(value.z), + intBitsToFloat(value.w)); + } + + GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value) + { + union + { + float f; + uint u; + } fu; + + fu.u = value; + return fu.f; + } + + GLM_FUNC_QUALIFIER detail::tvec2 uintBitsToFloat + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 uintBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y), + uintBitsToFloat(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 uintBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y), + uintBitsToFloat(value.z), + uintBitsToFloat(value.w)); + } + + template + GLM_FUNC_QUALIFIER genType fma + ( + genType const & a, + genType const & b, + genType const & c + ) + { + return a * b + c; + } + + template + GLM_FUNC_QUALIFIER genType frexp + ( + genType const & x, + int & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 frexp + ( + detail::tvec2 const & x, + detail::tvec2 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 frexp + ( + detail::tvec3 const & x, + detail::tvec3 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 frexp + ( + detail::tvec4 const & x, + detail::tvec4 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER genType ldexp + ( + genType const & x, + int const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 ldexp + ( + detail::tvec2 const & x, + detail::tvec2 const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 ldexp + ( + detail::tvec3 const & x, + detail::tvec3 const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 ldexp + ( + detail::tvec4 const & x, + detail::tvec4 const & exp + ) + { + return std::frexp(x, exp); + } + +}//namespace glm diff --git a/glm/core/func_exponential.hpp b/glm/core/func_exponential.hpp new file mode 100755 index 0000000000..b37c1f4540 --- /dev/null +++ b/glm/core/func_exponential.hpp @@ -0,0 +1,123 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_exponential.hpp +/// @date 2008-08-08 / 2011-06-14 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions +/// +/// @defgroup core_func_exponential Exponential functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_exponential +#define glm_core_func_exponential GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_exponential + /// @{ + + /// Returns x raised to the y power. + /// + /// @param x pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @param y + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL pow man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType pow(genType const & x, genType const & y); + + /// Returns the natural exponentiation of x, i.e., e^x. + /// + /// @param x exp function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL exp man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType exp(genType const & x); + + /// Returns the natural logarithm of x, i.e., + /// returns the value y which satisfies the equation x = e^y. + /// Results are undefined if x <= 0. + /// + /// @param x log function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL log man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType log(genType const & x); + + /// Returns 2 raised to the x power. + /// + /// @param x exp2 function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL exp2 man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType exp2(genType const & x); + + /// Returns the base 2 log of x, i.e., returns the value y, + /// which satisfies the equation x = 2 ^ y. + /// + /// @param x log2 function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL log2 man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType log2(genType const & x); + + /// Returns the positive square root of x. + /// + /// @param x sqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sqrt man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType sqrt(genType const & x); + + /// Returns the reciprocal of the positive square root of x. + /// + /// @param x inversesqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL inversesqrt man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType inversesqrt(genType const & x); + + /// @} +}//namespace glm + +#include "func_exponential.inl" + +#endif//glm_core_func_exponential diff --git a/glm/core/func_exponential.inl b/glm/core/func_exponential.inl new file mode 100755 index 0000000000..f609214b13 --- /dev/null +++ b/glm/core/func_exponential.inl @@ -0,0 +1,157 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_exponential.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include "_vectorize.hpp" + +namespace glm +{ + // pow + template + GLM_FUNC_QUALIFIER genType pow + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'pow' only accept floating-point input"); + + return ::std::pow(x, y); + } + + VECTORIZE_VEC_VEC(pow) + + // exp + template + GLM_FUNC_QUALIFIER genType exp + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'exp' only accept floating-point input"); + + return ::std::exp(x); + } + + VECTORIZE_VEC(exp) + + // log + template + GLM_FUNC_QUALIFIER genType log + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'log' only accept floating-point input"); + + return ::std::log(x); + } + + VECTORIZE_VEC(log) + + //exp2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType exp2 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'exp2' only accept floating-point input"); + + return ::std::exp(genType(0.69314718055994530941723212145818) * x); + } + + VECTORIZE_VEC(exp2) + +namespace _detail +{ + template + struct _compute_log2 + { + template + T operator() (T const & Value) const; +/* + { + GLM_STATIC_ASSERT(0, "'log2' parameter has an invalid template parameter type. GLM core features only supports floating-point types, include for integer types support. Others types are not supported."); + return Value; + } +*/ + }; + + template <> + struct _compute_log2 + { + template + T operator() (T const & Value) const + { + return T(::std::log(Value)) / T(0.69314718055994530941723212145818); + } + }; + +}//namespace _detail + + // log2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType log2 + ( + genType const & x + ) + { + assert(x > genType(0)); // log2 is only defined on the range (0, inf] + return _detail::_compute_log2::ID>()(x); + } + + VECTORIZE_VEC(log2) + + // sqrt + template + GLM_FUNC_QUALIFIER genType sqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sqrt' only accept floating-point input"); + + return genType(::std::sqrt(x)); + } + + VECTORIZE_VEC(sqrt) + + template + GLM_FUNC_QUALIFIER genType inversesqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inversesqrt' only accept floating-point input"); + + return genType(1) / ::std::sqrt(x); + } + + VECTORIZE_VEC(inversesqrt) + +}//namespace glm diff --git a/glm/core/func_geometric.hpp b/glm/core/func_geometric.hpp new file mode 100755 index 0000000000..c8b5295e71 --- /dev/null +++ b/glm/core/func_geometric.hpp @@ -0,0 +1,138 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_geometric.hpp +/// @date 2008-08-03 / 2011-06-14 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions +/// +/// @defgroup core_func_geometric Geometric functions +/// @ingroup core +/// +/// These operate on vectors as vectors, not component-wise. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_geometric +#define glm_core_func_geometric GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_geometric + /// @{ + + /// Returns the length of x, i.e., sqrt(x * x). + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL length man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type length( + genType const & x); + + /// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL distance man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type distance( + genType const & p0, + genType const & p1); + + /// Returns the dot product of x and y, i.e., result = x * y. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL dot man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type dot( + genType const & x, + genType const & y); + + /// Returns the cross product of x and y. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL cross man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + detail::tvec3 cross( + detail::tvec3 const & x, + detail::tvec3 const & y); + + /// Returns a vector in the same direction as x but with length of 1. + /// + /// @see GLSL normalize man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType normalize( + genType const & x); + + /// If dot(Nref, I) < 0.0, return N, otherwise, return -N. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL faceforward man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType faceforward( + genType const & N, + genType const & I, + genType const & Nref); + + /// For the incident vector I and surface orientation N, + /// returns the reflection direction : result = I - 2.0 * dot(N, I) * N. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL reflect man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType reflect( + genType const & I, + genType const & N); + + /// For the incident vector I and surface normal N, + /// and the ratio of indices of refraction eta, + /// return the refraction vector. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL refract man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType refract( + genType const & I, + genType const & N, + typename genType::value_type const & eta); + + /// @} +}//namespace glm + +#include "func_geometric.inl" + +#endif//glm_core_func_geometric diff --git a/glm/core/func_geometric.inl b/glm/core/func_geometric.inl new file mode 100755 index 0000000000..caa4f29d15 --- /dev/null +++ b/glm/core/func_geometric.inl @@ -0,0 +1,324 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_geometric.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include "_vectorize.hpp" + +namespace glm +{ + // length + template + GLM_FUNC_QUALIFIER genType length + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + genType sqr = x * x; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type length + ( + detail::tvec2 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec2::value_type sqr = v.x * v.x + v.y * v.y; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::value_type length + ( + detail::tvec3 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec3::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::value_type length + ( + detail::tvec4 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec4::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; + return sqrt(sqr); + } + + // distance + template + GLM_FUNC_QUALIFIER genType distance + ( + genType const & p0, + genType const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type distance + ( + detail::tvec2 const & p0, + detail::tvec2 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::value_type distance + ( + detail::tvec3 const & p0, + detail::tvec3 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::value_type distance + ( + detail::tvec4 const & p0, + detail::tvec4 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + // dot + template + GLM_FUNC_QUALIFIER genType dot + ( + genType const & x, + genType const & y + + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x * y; + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type dot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y; + } + + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y + x.z * y.z; + } +/* // SSE3 + GLM_FUNC_QUALIFIER float dot(const tvec4& x, const tvec4& y) + { + float Result; + __asm + { + mov esi, x + mov edi, y + movaps xmm0, [esi] + mulps xmm0, [edi] + haddps( _xmm0, _xmm0 ) + haddps( _xmm0, _xmm0 ) + movss Result, xmm0 + } + return Result; + } +*/ + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; + } + + // cross + template + GLM_FUNC_QUALIFIER detail::tvec3 cross + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cross' only accept floating-point inputs"); + + return detail::tvec3( + x.y * y.z - y.y * x.z, + x.z * y.x - y.z * x.x, + x.x * y.y - y.x * x.y); + } + + // normalize + template + GLM_FUNC_QUALIFIER genType normalize + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + return x < genType(0) ? genType(-1) : genType(1); + } + + // According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error + template + GLM_FUNC_QUALIFIER detail::tvec2 normalize + ( + detail::tvec2 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec2::value_type sqr = x.x * x.x + x.y * x.y; + return x * inversesqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 normalize + ( + detail::tvec3 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec3::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return x * inversesqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 normalize + ( + detail::tvec4 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec4::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return x * inversesqrt(sqr); + } + + // faceforward + template + GLM_FUNC_QUALIFIER genType faceforward + ( + genType const & N, + genType const & I, + genType const & Nref + ) + { + return dot(Nref, I) < 0 ? N : -N; + } + + // reflect + template + genType reflect + ( + genType const & I, + genType const & N + ) + { + return I - N * dot(N, I) * genType(2); + } + + // refract + template + GLM_FUNC_QUALIFIER genType refract + ( + genType const & I, + genType const & N, + genType const & eta + ) + { + //It could be a vector + //GLM_STATIC_ASSERT(detail::type::is_float); + + genType dotValue = dot(N, I); + genType k = genType(1) - eta * eta * (genType(1) - dotValue * dotValue); + if(k < genType(0)) + return genType(0); + else + return eta * I - (eta * dotValue + sqrt(k)) * N; + } + + template + GLM_FUNC_QUALIFIER genType refract + ( + genType const & I, + genType const & N, + typename genType::value_type const & eta + ) + { + //It could be a vector + //GLM_STATIC_ASSERT(detail::type::is_float); + + typename genType::value_type dotValue = dot(N, I); + typename genType::value_type k = typename genType::value_type(1) - eta * eta * (typename genType::value_type(1) - dotValue * dotValue); + if(k < typename genType::value_type(0)) + return genType(0); + else + return eta * I - (eta * dotValue + sqrt(k)) * N; + } + +}//namespace glm diff --git a/glm/core/func_integer.hpp b/glm/core/func_integer.hpp new file mode 100755 index 0000000000..e97a8f94ba --- /dev/null +++ b/glm/core/func_integer.hpp @@ -0,0 +1,201 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_integer.hpp +/// @date 2010-03-17 / 2011-06-18 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.8 Integer Functions +/// +/// @defgroup core_func_integer Integer functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/// The notation [a, b] means the set of bits from bit-number a through bit-number +/// b, inclusive. The lowest-order bit is bit 0. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_integer +#define glm_core_func_integer GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_integer + /// @{ + + /// Adds 32-bit unsigned integer x and y, returning the sum + /// modulo pow(2, 32). The value carry is set to 0 if the sum was + /// less than pow(2, 32), or to 1 otherwise. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL uaddCarry man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genUType uaddCarry( + genUType const & x, + genUType const & y, + genUType & carry); + + /// Subtracts the 32-bit unsigned integer y from x, returning + /// the difference if non-negative, or pow(2, 32) plus the difference + /// otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL usubBorrow man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genUType usubBorrow( + genUType const & x, + genUType const & y, + genUType & borrow); + + /// Multiplies 32-bit integers x and y, producing a 64-bit + /// result. The 32 least-significant bits are returned in lsb. + /// The 32 most-significant bits are returned in msb. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL umulExtended man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + void umulExtended( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb); + + /// Multiplies 32-bit integers x and y, producing a 64-bit + /// result. The 32 least-significant bits are returned in lsb. + /// The 32 most-significant bits are returned in msb. + /// + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL imulExtended man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + void imulExtended( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb); + + /// Extracts bits [offset, offset + bits - 1] from value, + /// returning them in the least significant bits of the result. + /// For unsigned data types, the most significant bits of the + /// result will be set to zero. For signed data types, the + /// most significant bits will be set to the value of bit offset + base – 1. + /// + /// If bits is zero, the result will be zero. The result will be + /// undefined if offset or bits is negative, or if the sum of + /// offset and bits is greater than the number of bits used + /// to store the operand. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldExtract man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldExtract( + genIUType const & Value, + int const & Offset, + int const & Bits); + + /// Returns the insertion the bits least-significant bits of insert into base. + /// + /// The result will have bits [offset, offset + bits - 1] taken + /// from bits [0, bits – 1] of insert, and all other bits taken + /// directly from the corresponding bits of base. If bits is + /// zero, the result will simply be base. The result will be + /// undefined if offset or bits is negative, or if the sum of + /// offset and bits is greater than the number of bits used to + /// store the operand. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldInsert man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldInsert( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits); + + /// Returns the reversal of the bits of value. + /// The bit numbered n of the result will be taken from bit (bits - 1) - n of value, + /// where bits is the total number of bits used to represent value. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldReverse man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldReverse(genIUType const & value); + + /// Returns the number of bits set to 1 in the binary representation of value. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitCount man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type bitCount(genIUType const & Value); + + /// Returns the bit number of the least significant bit set to + /// 1 in the binary representation of value. + /// If value is zero, -1 will be returned. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL findLSB man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type findLSB(genIUType const & Value); + + /// Returns the bit number of the most significant bit in the binary representation of value. + /// For positive integers, the result will be the bit number of the most significant bit set to 1. + /// For negative integers, the result will be the bit number of the most significant + /// bit set to 0. For a value of zero or negative one, -1 will be returned. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL findMSB man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type findMSB(genIUType const & Value); + + /// @} +}//namespace glm + +#include "func_integer.inl" + +#endif//glm_core_func_integer + diff --git a/glm/core/func_integer.inl b/glm/core/func_integer.inl new file mode 100755 index 0000000000..934f5eca60 --- /dev/null +++ b/glm/core/func_integer.inl @@ -0,0 +1,602 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_integer.inl +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include "_vectorize.hpp" +#if(GLM_COMPILER & GLM_COMPILER_VC) +#include +#pragma intrinsic(_BitScanReverse) +#endif + +namespace glm +{ + // uaddCarry + template + GLM_FUNC_QUALIFIER genUType uaddCarry + ( + genUType const & x, + genUType const & y, + genUType & Carry + ) + { + detail::highp_uint_t Value64 = detail::highp_uint_t(x) + detail::highp_uint_t(y); + genUType Result = genUType(Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))); + Carry = (Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))) > 1 ? 1 : 0; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 uaddCarry + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Carry + ) + { + return detail::tvec2( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 uaddCarry + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Carry + ) + { + return detail::tvec3( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 uaddCarry + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Carry + ) + { + return detail::tvec4( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2]), + uaddCarry(x[3], y[3], Carry[3])); + } + + // usubBorrow + template + GLM_FUNC_QUALIFIER genUType usubBorrow + ( + genUType const & x, + genUType const & y, + genUType & Borrow + ) + { + Borrow = x >= y ? 0 : 1; + if(x > y) + return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); + else + return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 usubBorrow + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Borrow + ) + { + return detail::tvec2( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 usubBorrow + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Borrow + ) + { + return detail::tvec3( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 usubBorrow + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Borrow + ) + { + return detail::tvec4( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2]), + usubBorrow(x[3], y[3], Borrow[3])); + } + + // umulExtended + template + GLM_FUNC_QUALIFIER void umulExtended + ( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb + ) + { + detail::highp_uint_t ValueX64 = x; + detail::highp_uint_t ValueY64 = y; + detail::highp_uint_t Value64 = ValueX64 * ValueY64; + msb = *(genUType*)&genUType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); + lsb = *(genUType*)&genUType(Value64 >> detail::highp_uint_t(32)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 umulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 umulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 umulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb), + umulExtended(x[3], y[3], msb, lsb)); + } + + // imulExtended + template + GLM_FUNC_QUALIFIER void imulExtended + ( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb + ) + { + detail::highp_int_t ValueX64 = x; + detail::highp_int_t ValueY64 = y; + detail::highp_int_t Value64 = ValueX64 * ValueY64; + msb = *(genIType*)&genIType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); + lsb = *(genIType*)&genIType(Value64 >> detail::highp_uint_t(32)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 imulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 imulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 imulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb), + imulExtended(x[3], y[3], msb, lsb)); + } + + // bitfieldExtract + template + GLM_FUNC_QUALIFIER genIUType bitfieldExtract + ( + genIUType const & Value, + int const & Offset, + int const & Bits + ) + { + int GenSize = int(sizeof(genIUType)) << int(3); + + assert(Offset + Bits <= GenSize); + + genIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0); + genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits); + + return ShiftBack; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldExtract + ( + detail::tvec2 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldExtract + ( + detail::tvec3 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits), + bitfieldExtract(Value[2], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldExtract + ( + detail::tvec4 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits), + bitfieldExtract(Value[2], Offset, Bits), + bitfieldExtract(Value[3], Offset, Bits)); + } + + // bitfieldInsert + template + GLM_FUNC_QUALIFIER genIUType bitfieldInsert + ( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldInsert' only accept integer values"); + assert(Offset + Bits <= sizeof(genIUType)); + + if(Bits == 0) + return Base; + + genIUType Mask = 0; + for(int Bit = Offset; Bit < Offset + Bits; ++Bit) + Mask |= (1 << Bit); + + return (Base & ~Mask) | (Insert & Mask); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldInsert + ( + detail::tvec2 const & Base, + detail::tvec2 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldInsert + ( + detail::tvec3 const & Base, + detail::tvec3 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits), + bitfieldInsert(Base[2], Insert[2], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldInsert + ( + detail::tvec4 const & Base, + detail::tvec4 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits), + bitfieldInsert(Base[2], Insert[2], Offset, Bits), + bitfieldInsert(Base[3], Insert[3], Offset, Bits)); + } + + // bitfieldReverse + template + GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldReverse' only accept integer values"); + + genIUType Out = 0; + std::size_t BitSize = sizeof(genIUType) * 8; + for(std::size_t i = 0; i < BitSize; ++i) + if(Value & (genIUType(1) << i)) + Out |= genIUType(1) << (BitSize - 1 - i); + return Out; + } + + VECTORIZE_VEC(bitfieldReverse) + + // bitCount + template + GLM_FUNC_QUALIFIER int bitCount(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitCount' only accept integer values"); + + int Count = 0; + for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) + { + if(Value & (1 << i)) + ++Count; + } + return Count; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitCount + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + bitCount(value[0]), + bitCount(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitCount + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitCount + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2]), + bitCount(value[3])); + } + + // findLSB + template + GLM_FUNC_QUALIFIER int findLSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findLSB' only accept integer values"); + if(Value == 0) + return -1; + + genIUType Bit; + for(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){} + return Bit; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 findLSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findLSB(value[0]), + findLSB(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 findLSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 findLSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2]), + findLSB(value[3])); + } + + // findMSB +#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC)) + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + unsigned long Result(0); + _BitScanReverse(&Result, Value); + return int(Result); + } + +#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40)) + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + return __builtin_clz(Value); + } + +#else + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); + if(Value == 0) + return -1; + + genIUType bit = genIUType(-1); + for(genIUType tmp = Value; tmp; tmp >>= 1, ++bit){} + return bit; + } +#endif//(GLM_COMPILER) + + template + GLM_FUNC_QUALIFIER detail::tvec2 findMSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findMSB(value[0]), + findMSB(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 findMSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 findMSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2]), + findMSB(value[3])); + } +}//namespace glm diff --git a/glm/core/func_matrix.hpp b/glm/core/func_matrix.hpp new file mode 100755 index 0000000000..4eb348cd8b --- /dev/null +++ b/glm/core/func_matrix.hpp @@ -0,0 +1,150 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_matrix.hpp +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions +/// +/// @defgroup core_func_matrix Matrix functions +/// @ingroup core +/// +/// For each of the following built-in matrix functions, there is both a +/// single-precision floating point version, where all arguments and return values +/// are single precision, and a double-precision floating version, where all +/// arguments and return values are double precision. Only the single-precision +/// floating point version is shown. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_matrix +#define GLM_CORE_func_matrix GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_matrix + /// @{ + + /// Multiply matrix x by matrix y component-wise, i.e., + /// result[i][j] is the scalar product of x[i][j] and y[i][j]. + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL matrixCompMult man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + matType matrixCompMult( + matType const & x, + matType const & y); + + /// Treats the first parameter c as a column vector + /// and the second parameter r as a row vector + /// and does a linear algebraic matrix multiply c * r. + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL outerProduct man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + /// + /// @todo Clarify the declaration to specify that matType doesn't have to be provided when used. + template + matType outerProduct( + vecType const & c, + vecType const & r); + + /// Returns the transposed matrix of x + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL transpose man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename matType::transpose_type transpose( + matType const & x); + + /// Return the determinant of a mat2 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat2x2::value_type determinant( + detail::tmat2x2 const & m); + + /// Return the determinant of a mat3 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat3x3::value_type determinant( + detail::tmat3x3 const & m); + + /// Return the determinant of a mat4 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat4x4::value_type determinant( + detail::tmat4x4 const & m); + + /// Return the inverse of a mat2 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat2x2 inverse( + detail::tmat2x2 const & m); + + /// Return the inverse of a mat3 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat3x3 inverse( + detail::tmat3x3 const & m); + + /// Return the inverse of a mat4 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat4x4 inverse( + detail::tmat4x4 const & m); + + /// @} +}//namespace glm + +#include "func_matrix.inl" + +#endif//GLM_CORE_func_matrix diff --git a/glm/core/func_matrix.inl b/glm/core/func_matrix.inl new file mode 100755 index 0000000000..e3ed4bb56b --- /dev/null +++ b/glm/core/func_matrix.inl @@ -0,0 +1,584 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_matrix.inl +/// @date 2008-03-08 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include "_vectorize.hpp" + +namespace glm +{ + // matrixCompMult + template + GLM_FUNC_QUALIFIER matType matrixCompMult + ( + matType const & x, + matType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'matrixCompMult' only accept floating-point inputs"); + + matType result(matType::null); + for(typename matType::size_type i = 0; i < matType::row_size(); ++i) + result[i] = x[i] * y[i]; + return result; + } + + // outerProduct + template + GLM_FUNC_QUALIFIER detail::tmat2x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x2 m(detail::tmat2x2::null); + m[0][0] = c[0] * r[0]; + m[0][1] = c[1] * r[0]; + m[1][0] = c[0] * r[1]; + m[1][1] = c[1] * r[1]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x3 m(detail::tmat3x3::null); + for(typename detail::tmat3x3::size_type i(0); i < m.length(); ++i) + m[i] = c * r[i]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x4 m(detail::tmat4x4::null); + for(typename detail::tmat4x4::size_type i(0); i < m.length(); ++i) + m[i] = c * r[i]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x3 m(detail::tmat2x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x2 m(detail::tmat3x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x4 m(detail::tmat2x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x2 m(detail::tmat4x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x4 m(detail::tmat3x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[2][3] = c.w * r.z; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x3 m(detail::tmat4x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + m[3][2] = c.z * r.w; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 transpose + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x2 result(detail::tmat2x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 transpose + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x3 result(detail::tmat3x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 transpose + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x4 result(detail::tmat4x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + result[3][3] = m[3][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 transpose + ( + detail::tmat3x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x3 result(detail::tmat2x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 transpose + ( + detail::tmat2x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x2 result(detail::tmat3x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 transpose + ( + detail::tmat4x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x4 result(detail::tmat2x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 transpose + ( + detail::tmat2x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x2 result(detail::tmat4x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 transpose + ( + detail::tmat4x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x4 result(detail::tmat3x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 transpose + ( + detail::tmat3x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x3 result(detail::tmat4x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat2x2::value_type determinant + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + return m[0][0] * m[1][1] - m[1][0] * m[0][1]; + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat3x3::value_type determinant + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + return + + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat4x4::value_type determinant + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + + detail::tvec4 DetCof( + + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), + - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), + + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), + - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05)); + + return m[0][0] * DetCof[0] + + m[0][1] * DetCof[1] + + m[0][2] * DetCof[2] + + m[0][3] * DetCof[3]; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 inverse + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + //valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; + T Determinant = determinant(m); + + detail::tmat2x2 Inverse( + + m[1][1] / Determinant, + - m[0][1] / Determinant, + - m[1][0] / Determinant, + + m[0][0] / Determinant); + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 inverse + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + //valType Determinant = m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + // - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + // + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + + T Determinant = determinant(m); + + detail::tmat3x3 Inverse(detail::tmat3x3::null); + Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); + Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); + Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); + Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); + Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); + Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); + Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); + Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); + Inverse /= Determinant; + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 inverse + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; + T Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; + + T Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + T Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; + + T Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; + T Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; + + T Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; + T Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; + + T Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; + T Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; + + T Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; + T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; + + detail::tvec4 const SignA(+1, -1, +1, -1); + detail::tvec4 const SignB(-1, +1, -1, +1); + + detail::tvec4 Fac0(Coef00, Coef00, Coef02, Coef03); + detail::tvec4 Fac1(Coef04, Coef04, Coef06, Coef07); + detail::tvec4 Fac2(Coef08, Coef08, Coef10, Coef11); + detail::tvec4 Fac3(Coef12, Coef12, Coef14, Coef15); + detail::tvec4 Fac4(Coef16, Coef16, Coef18, Coef19); + detail::tvec4 Fac5(Coef20, Coef20, Coef22, Coef23); + + detail::tvec4 Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); + detail::tvec4 Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); + detail::tvec4 Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); + detail::tvec4 Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); + + detail::tvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); + detail::tvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); + detail::tvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); + detail::tvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); + + detail::tmat4x4 Inverse(Inv0, Inv1, Inv2, Inv3); + + detail::tvec4 Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); + + T Determinant = glm::dot(m[0], Row0); + + Inverse /= Determinant; + + return Inverse; + } +}//namespace glm diff --git a/glm/core/func_noise.hpp b/glm/core/func_noise.hpp new file mode 100755 index 0000000000..de1af949a1 --- /dev/null +++ b/glm/core/func_noise.hpp @@ -0,0 +1,87 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_noise.hpp +/// @date 2008-08-01 / 2011-06-18 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.13 Noise Functions +/// +/// @defgroup core_func_noise Noise functions +/// @ingroup core +/// +/// Noise functions are stochastic functions that can be used to increase visual +/// complexity. Values returned by the following noise functions give the +/// appearance of randomness, but are not truly random. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_noise +#define glm_core_func_noise GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_noise + /// @{ + + /// Returns a 1D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise1 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + typename genType::value_type noise1(genType const & x); + + /// Returns a 2D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise2 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec2 noise2(genType const & x); + + /// Returns a 3D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise3 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec3 noise3(genType const & x); + + /// Returns a 4D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise4 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec4 noise4(genType const & x); + + /// @} +}//namespace glm + +#include "func_noise.inl" + +#endif//glm_core_func_noise diff --git a/glm/core/func_noise.inl b/glm/core/func_noise.inl new file mode 100755 index 0000000000..113e2d3931 --- /dev/null +++ b/glm/core/func_noise.inl @@ -0,0 +1,364 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_noise.inl +/// @date 2008-08-01 / 2011-09-27 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T noise1(T const & x) + { + return noise1(glm::detail::tvec2(x, T(0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(T const & x) + { + return glm::detail::tvec2( + noise1(x + T(0.0)), + noise1(x + T(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(T const & x) + { + return glm::detail::tvec3( + noise1(x - T(1.0)), + noise1(x + T(0.0)), + noise1(x + T(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(T const & x) + { + return glm::detail::tvec4( + noise1(x - T(1.0)), + noise1(x + T(0.0)), + noise1(x + T(1.0)), + noise1(x + T(2.0))); + } + + template + GLM_FUNC_QUALIFIER T noise1(glm::detail::tvec2 const & v) + { + detail::tvec4 const C = detail::tvec4( + T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 + T( 0.366025403784439), // 0.5 * (sqrt(3.0) - 1.0) + T(-0.577350269189626), // -1.0 + 2.0 * C.x + T( 0.024390243902439)); // 1.0 / 41.0 + + // First corner + detail::tvec2 i = floor(v + dot(v, detail::tvec2(C[1]))); + detail::tvec2 x0 = v - i + dot(i, detail::tvec2(C[0])); + + // Other corners + //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 + //i1.y = 1.0 - i1.x; + detail::tvec2 i1 = (x0.x > x0.y) ? detail::tvec2(1, 0) : detail::tvec2(0, 1); + // x0 = x0 - 0.0 + 0.0 * C.xx ; + // x1 = x0 - i1 + 1.0 * C.xx ; + // x2 = x0 - 1.0 + 2.0 * C.xx ; + detail::tvec4 x12 = detail::tvec4(x0.x, x0.y, x0.x, x0.y) + detail::tvec4(C.x, C.x, C.z, C.z); + x12 = detail::tvec4(detail::tvec2(x12) - i1, x12.z, x12.w); + + // Permutations + i = mod(i, T(289)); // Avoid truncation effects in permutation + detail::tvec3 p = permute( + permute(i.y + detail::tvec3(T(0), i1.y, T(1))) + + i.x + detail::tvec3(T(0), i1.x, T(1))); + + detail::tvec3 m = max(T(0.5) - detail::tvec3( + dot(x0, x0), + dot(detail::tvec2(x12.x, x12.y), detail::tvec2(x12.x, x12.y)), + dot(detail::tvec2(x12.z, x12.w), detail::tvec2(x12.z, x12.w))), T(0)); + m = m * m ; + m = m * m ; + + // Gradients: 41 points uniformly over a line, mapped onto a diamond. + // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) + + detail::tvec3 x = T(2) * fract(p * C.w) - T(1); + detail::tvec3 h = abs(x) - T(0.5); + detail::tvec3 ox = floor(x + T(0.5)); + detail::tvec3 a0 = x - ox; + + // Normalise gradients implicitly by scaling m + // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); + m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); + + // Compute final noise value at P + detail::tvec3 g; + g.x = a0.x * x0.x + h.x * x0.y; + //g.yz = a0.yz * x12.xz + h.yz * x12.yw; + g.y = a0.y * x12.x + h.y * x12.y; + g.z = a0.z * x12.z + h.z * x12.w; + return T(130) * dot(m, g); + } + + template + GLM_FUNC_QUALIFIER T noise1(detail::tvec3 const & v) + { + detail::tvec2 const C(1.0 / 6.0, 1.0 / 3.0); + detail::tvec4 const D(0.0, 0.5, 1.0, 2.0); + + // First corner + detail::tvec3 i(floor(v + dot(v, detail::tvec3(C.y)))); + detail::tvec3 x0(v - i + dot(i, detail::tvec3(C.x))); + + // Other corners + detail::tvec3 g(step(detail::tvec3(x0.y, x0.z, x0.x), x0)); + detail::tvec3 l(T(1) - g); + detail::tvec3 i1(min(g, detail::tvec3(l.z, l.x, l.y))); + detail::tvec3 i2(max(g, detail::tvec3(l.z, l.x, l.y))); + + // x0 = x0 - 0.0 + 0.0 * C.xxx; + // x1 = x0 - i1 + 1.0 * C.xxx; + // x2 = x0 - i2 + 2.0 * C.xxx; + // x3 = x0 - 1.0 + 3.0 * C.xxx; + detail::tvec3 x1(x0 - i1 + C.x); + detail::tvec3 x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y + detail::tvec3 x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y + + // Permutations + i = mod289(i); + detail::tvec4 p(permute(permute(permute( + i.z + detail::tvec4(T(0), i1.z, i2.z, T(1))) + + i.y + detail::tvec4(T(0), i1.y, i2.y, T(1))) + + i.x + detail::tvec4(T(0), i1.x, i2.x, T(1)))); + + // Gradients: 7x7 points over a square, mapped onto an octahedron. + // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) + T n_ = T(0.142857142857); // 1.0/7.0 + detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); + + detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) + + detail::tvec4 x_(floor(j * ns.z)); + detail::tvec4 y_(floor(j - T(7) * x_)); // mod(j,N) + + detail::tvec4 x(x_ * ns.x + ns.y); + detail::tvec4 y(y_ * ns.x + ns.y); + detail::tvec4 h(T(1) - abs(x) - abs(y)); + + detail::tvec4 b0(x.x, x.y, y.x, y.y); + detail::tvec4 b1(x.z, x.w, y.z, y.w); + + // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; + // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; + detail::tvec4 s0(floor(b0) * T(2) + T(1)); + detail::tvec4 s1(floor(b1) * T(2) + T(1)); + detail::tvec4 sh(-step(h, detail::tvec4(0.0))); + + detail::tvec4 a0 = detail::tvec4(b0.x, b0.z, b0.y, b0.w) + detail::tvec4(s0.x, s0.z, s0.y, s0.w) * detail::tvec4(sh.x, sh.x, sh.y, sh.y); + detail::tvec4 a1 = detail::tvec4(b1.x, b1.z, b1.y, b1.w) + detail::tvec4(s1.x, s1.z, s1.y, s1.w) * detail::tvec4(sh.z, sh.z, sh.w, sh.w); + + detail::tvec3 p0(a0.x, a0.y, h.x); + detail::tvec3 p1(a0.z, a0.w, h.y); + detail::tvec3 p2(a1.x, a1.y, h.z); + detail::tvec3 p3(a1.z, a1.w, h.w); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + + // Mix final noise value + detail::tvec4 m = max(T(0.6) - detail::tvec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0)); + m = m * m; + return T(42) * dot(m * m, detail::tvec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); + } + + template + GLM_FUNC_QUALIFIER T noise1(detail::tvec4 const & v) + { + detail::tvec4 const C( + 0.138196601125011, // (5 - sqrt(5))/20 G4 + 0.276393202250021, // 2 * G4 + 0.414589803375032, // 3 * G4 + -0.447213595499958); // -1 + 4 * G4 + + // (sqrt(5) - 1)/4 = F4, used once below + T const F4 = T(0.309016994374947451); + + // First corner + detail::tvec4 i = floor(v + dot(v, vec4(F4))); + detail::tvec4 x0 = v - i + dot(i, vec4(C.x)); + + // Other corners + + // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) + detail::tvec4 i0; + detail::tvec3 isX = step(detail::tvec3(x0.y, x0.z, x0.w), detail::tvec3(x0.x)); + detail::tvec3 isYZ = step(detail::tvec3(x0.z, x0.w, x0.w), detail::tvec3(x0.y, x0.y, x0.z)); + // i0.x = dot(isX, vec3(1.0)); + //i0.x = isX.x + isX.y + isX.z; + //i0.yzw = T(1) - isX; + i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); + // i0.y += dot(isYZ.xy, vec2(1.0)); + i0.y += isYZ.x + isYZ.y; + //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); + i0.z += T(1) - isYZ.x; + i0.w += T(1) - isYZ.y; + i0.z += isYZ.z; + i0.w += T(1) - isYZ.z; + + // i0 now contains the unique values 0,1,2,3 in each channel + detail::tvec4 i3 = clamp(i0, 0.0, 1.0); + detail::tvec4 i2 = clamp(i0 - 1.0, 0.0, 1.0); + detail::tvec4 i1 = clamp(i0 - 2.0, 0.0, 1.0); + + // x0 = x0 - 0.0 + 0.0 * C.xxxx + // x1 = x0 - i1 + 0.0 * C.xxxx + // x2 = x0 - i2 + 0.0 * C.xxxx + // x3 = x0 - i3 + 0.0 * C.xxxx + // x4 = x0 - 1.0 + 4.0 * C.xxxx + detail::tvec4 x1 = x0 - i1 + C.x; + detail::tvec4 x2 = x0 - i2 + C.y; + detail::tvec4 x3 = x0 - i3 + C.z; + detail::tvec4 x4 = x0 + C.w; + + // Permutations + i = mod(i, T(289)); + T j0 = permute(permute(permute(permute(i.w) + i.z) + i.y) + i.x); + detail::tvec4 j1 = permute(permute(permute(permute( + i.w + detail::tvec4(i1.w, i2.w, i3.w, T(1))) + + i.z + detail::tvec4(i1.z, i2.z, i3.z, T(1))) + + i.y + detail::tvec4(i1.y, i2.y, i3.y, T(1))) + + i.x + detail::tvec4(i1.x, i2.x, i3.x, T(1))); + + // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope + // 7*7*6 = 294, which is close to the ring size 17*17 = 289. + detail::tvec4 ip = detail::tvec4(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); + + detail::tvec4 p0 = grad4(j0, ip); + detail::tvec4 p1 = grad4(j1.x, ip); + detail::tvec4 p2 = grad4(j1.y, ip); + detail::tvec4 p3 = grad4(j1.z, ip); + detail::tvec4 p4 = grad4(j1.w, ip); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + p4 *= taylorInvSqrt(dot(p4, p4)); + + // Mix contributions from the five corners + detail::tvec3 m0 = max(T(0.6) - detail::tvec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0)); + detail::tvec2 m1 = max(T(0.6) - detail::tvec2(dot(x3, x3), dot(x4, x4) ), T(0)); + m0 = m0 * m0; + m1 = m1 * m1; + return T(49) * + (dot(m0 * m0, detail::tvec3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + + dot(m1 * m1, detail::tvec2(dot(p3, x3), dot(p4, x4)))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec2 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec2(0.0)), + noise1(glm::detail::tvec2(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec3 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec3(0.0)), + noise1(glm::detail::tvec3(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec4 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec4(0.0)), + noise1(glm::detail::tvec4(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec2 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(0.0)), + noise1(x + glm::detail::tvec2(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec3 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(0.0)), + noise1(x + glm::detail::tvec3(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec4 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(0.0)), + noise1(x + glm::detail::tvec4(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec2 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(0.0)), + noise1(x + glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(2.0))); + } + + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec3 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(0.0)), + noise1(x + glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(2.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec4 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(0.0)), + noise1(x + glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(2.0))); + } + +}//namespace glm diff --git a/glm/core/func_packing.hpp b/glm/core/func_packing.hpp new file mode 100755 index 0000000000..1a1bde63ce --- /dev/null +++ b/glm/core/func_packing.hpp @@ -0,0 +1,194 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_packing.hpp +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions +/// +/// @defgroup core_func_packing Floating-Point Pack and Unpack Functions +/// @ingroup core +/// +/// These functions do not operate component-wise, rather as described in each case. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_packing +#define GLM_CORE_func_packing GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_packing + /// @{ + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packUnorm2x16: round(clamp(c, 0, +1) * 65535.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packUnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packUnorm2x16(detail::tvec2 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packSnorm2x16: round(clamp(v, -1, +1) * 32767.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packSnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packSnorm2x16(detail::tvec2 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packUnorm4x8: round(clamp(c, 0, +1) * 255.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packUnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packUnorm4x8(detail::tvec4 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packSnorm4x8: round(clamp(c, -1, +1) * 127.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packSnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packSnorm4x8(detail::tvec4 const & v); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackUnorm2x16: f / 65535.0 + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + /// @see GLSL unpackUnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackUnorm2x16(detail::uint32 const & p); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackSnorm2x16: clamp(f / 32767.0, -1, +1) + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + /// @see GLSL unpackSnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackSnorm2x16(detail::uint32 const & p); + + /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + /// + /// The conversion for unpacked fixed-point value f to floating point is done as follows: + /// unpackUnorm4x8: f / 255.0 + /// + /// The first component of the returned vector will be extracted from the least significant bits of the input; + /// the last component will be extracted from the most significant bits. + /// + /// @see GLSL unpackUnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec4 unpackUnorm4x8(detail::uint32 const & p); + + /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + /// + /// The conversion for unpacked fixed-point value f to floating point is done as follows: + /// unpackSnorm4x8: clamp(f / 127.0, -1, +1) + /// + /// The first component of the returned vector will be extracted from the least significant bits of the input; + /// the last component will be extracted from the most significant bits. + /// + /// @see GLSL unpackSnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec4 unpackSnorm4x8(detail::uint32 const & p); + + /// Returns a double-precision value obtained by packing the components of v into a 64-bit value. + /// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. + /// Otherwise, the bit- level representation of v is preserved. + /// The first vector component specifies the 32 least significant bits; + /// the second component specifies the 32 most significant bits. + /// + /// @see GLSL packDouble2x32 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + double packDouble2x32(detail::tvec2 const & v); + + /// Returns a two-component unsigned integer vector representation of v. + /// The bit-level representation of v is preserved. + /// The first component of the vector contains the 32 least significant bits of the double; + /// the second component consists the 32 most significant bits. + /// + /// @see GLSL unpackDouble2x32 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackDouble2x32(double const & v); + + + /// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector + /// to the 16-bit floating-point representation found in the OpenGL Specification, + /// and then packing these two 16- bit integers into a 32-bit unsigned integer. + /// The first vector component specifies the 16 least-significant bits of the result; + /// the second component specifies the 16 most-significant bits. + /// + /// @see GLSL packHalf2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + uint packHalf2x16(vec2 const & v); + + /// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, + /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, + /// and converting them to 32-bit floating-point values. + /// The first component of the vector is obtained from the 16 least-significant bits of v; + /// the second component is obtained from the 16 most-significant bits of v. + /// + /// @see GLSL unpackHalf2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + vec2 unpackHalf2x16(uint const & v); + + /// @} +}//namespace glm + +#include "func_packing.inl" + +#endif//GLM_CORE_func_packing + diff --git a/glm/core/func_packing.inl b/glm/core/func_packing.inl new file mode 100755 index 0000000000..48b6fbca35 --- /dev/null +++ b/glm/core/func_packing.inl @@ -0,0 +1,178 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_packing.inl +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2 const & v) + { + detail::uint16 A(detail::uint16(round(clamp(v.x, 0.0f, 1.0f) * 65535.0f))); + detail::uint16 B(detail::uint16(round(clamp(v.y, 0.0f, 1.0f) * 65535.0f))); + return detail::uint32((B << 16) | A); + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackUnorm2x16(detail::uint32 const & p) + { + detail::uint32 Mask16((1 << 16) - 1); + detail::uint32 A((p >> 0) & Mask16); + detail::uint32 B((p >> 16) & Mask16); + return detail::tvec2( + A * 1.0f / 65535.0f, + B * 1.0f / 65535.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packSnorm2x16(detail::tvec2 const & v) + { + union iu + { + detail::int16 i; + detail::uint16 u; + } A, B; + + detail::tvec2 Unpack = clamp(v ,-1.0f, 1.0f) * 32767.0f; + A.i = detail::int16(round(Unpack.x)); + B.i = detail::int16(round(Unpack.y)); + detail::uint32 Pack = (detail::uint32(B.u) << 16) | (detail::uint32(A.u) << 0); + return Pack; + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackSnorm2x16(detail::uint32 const & p) + { + union iu + { + detail::int16 i; + detail::uint16 u; + } A, B; + + detail::uint32 Mask16((1 << 16) - 1); + A.u = detail::uint16((p >> 0) & Mask16); + B.u = detail::uint16((p >> 16) & Mask16); + detail::tvec2 Pack(A.i, B.i); + + return clamp(Pack * 1.0f / 32767.0f, -1.0f, 1.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packUnorm4x8(detail::tvec4 const & v) + { + detail::uint8 A((detail::uint8)round(clamp(v.x, 0.0f, 1.0f) * 255.0f)); + detail::uint8 B((detail::uint8)round(clamp(v.y, 0.0f, 1.0f) * 255.0f)); + detail::uint8 C((detail::uint8)round(clamp(v.z, 0.0f, 1.0f) * 255.0f)); + detail::uint8 D((detail::uint8)round(clamp(v.w, 0.0f, 1.0f) * 255.0f)); + return detail::uint32((D << 24) | (C << 16) | (B << 8) | A); + } + + GLM_FUNC_QUALIFIER detail::tvec4 unpackUnorm4x8(detail::uint32 const & p) + { + detail::uint32 Mask8((1 << 8) - 1); + detail::uint32 A((p >> 0) & Mask8); + detail::uint32 B((p >> 8) & Mask8); + detail::uint32 C((p >> 16) & Mask8); + detail::uint32 D((p >> 24) & Mask8); + return detail::tvec4( + A * 1.0f / 255.0f, + B * 1.0f / 255.0f, + C * 1.0f / 255.0f, + D * 1.0f / 255.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packSnorm4x8(detail::tvec4 const & v) + { + union iu + { + detail::int8 i; + detail::uint8 u; + } A, B, C, D; + + detail::tvec4 Unpack = clamp(v ,-1.0f, 1.0f) * 127.0f; + A.i = detail::int8(round(Unpack.x)); + B.i = detail::int8(round(Unpack.y)); + C.i = detail::int8(round(Unpack.z)); + D.i = detail::int8(round(Unpack.w)); + detail::uint32 Pack = (detail::uint32(D.u) << 24) | (detail::uint32(C.u) << 16) | (detail::uint32(B.u) << 8) | (detail::uint32(A.u) << 0); + return Pack; + } + + GLM_FUNC_QUALIFIER detail::tvec4 unpackSnorm4x8(detail::uint32 const & p) + { + union iu + { + detail::int8 i; + detail::uint8 u; + } A, B, C, D; + + detail::uint32 Mask8((1 << 8) - 1); + A.u = detail::uint8((p >> 0) & Mask8); + B.u = detail::uint8((p >> 8) & Mask8); + C.u = detail::uint8((p >> 16) & Mask8); + D.u = detail::uint8((p >> 24) & Mask8); + detail::tvec4 Pack(A.i, B.i, C.i, D.i); + + return clamp(Pack * 1.0f / 127.0f, -1.0f, 1.0f); + } + + GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2 const & v) + { + return *(double*)&v; + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackDouble2x32(double const & v) + { + return *(detail::tvec2*)&v; + } + + GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2 const & v) + { + union helper + { + uint other; + struct + { + detail::hdata a, b; + } orig; + } Pack; + + Pack.orig.a = detail::toFloat16(v.x); + Pack.orig.b = detail::toFloat16(v.y); + return *(uint*)&Pack; + } + + GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v) + { + union helper + { + uint other; + struct + { + detail::hdata a, b; + } orig; + } Unpack; + Unpack.other = v; + + return vec2(detail::toFloat32(Unpack.orig.a), detail::toFloat32(Unpack.orig.b)); + } +}//namespace glm + diff --git a/glm/core/func_trigonometric.hpp b/glm/core/func_trigonometric.hpp new file mode 100755 index 0000000000..0dcbd77ca4 --- /dev/null +++ b/glm/core/func_trigonometric.hpp @@ -0,0 +1,203 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_trigonometric.hpp +/// @date 2008-08-01 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions +/// +/// @defgroup core_func_trigonometric Angle and Trigonometry Functions +/// @ingroup core +/// +/// Function parameters specified as angle are assumed to be in units of radians. +/// In no case will any of these functions result in a divide by zero error. If +/// the divisor of a ratio is 0, then results will be undefined. +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_trigonometric +#define GLM_CORE_func_trigonometric GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_trigonometric + /// @{ + + /// Converts degrees to radians and returns the result. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL radians man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType radians(genType const & degrees); + + /// Converts radians to degrees and returns the result. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL degrees man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType degrees(genType const & radians); + + /// The standard trigonometric sine function. + /// The values returned by this function will range from [-1, 1]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sin man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType sin(genType const & angle); + + /// The standard trigonometric cosine function. + /// The values returned by this function will range from [-1, 1]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL cos man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType cos(genType const & angle); + + /// The standard trigonometric tangent function. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL tan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType tan(genType const & angle); + + /// Arc sine. Returns an angle whose sine is x. + /// The range of values returned by this function is [-PI/2, PI/2]. + /// Results are undefined if |x| > 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL asin man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType asin(genType const & x); + + /// Arc cosine. Returns an angle whose sine is x. + /// The range of values returned by this function is [0, PI]. + /// Results are undefined if |x| > 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL acos man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType acos(genType const & x); + + /// Arc tangent. Returns an angle whose tangent is y/x. + /// The signs of x and y are used to determine what + /// quadrant the angle is in. The range of values returned + /// by this function is [-PI, PI]. Results are undefined + /// if x and y are both 0. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atan(genType const & y, genType const & x); + + /// Arc tangent. Returns an angle whose tangent is y_over_x. + /// The range of values returned by this function is [-PI/2, PI/2]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atan(genType const & y_over_x); + + /// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sinh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType sinh(genType const & angle); + + /// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL cosh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType cosh(genType const & angle); + + /// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL tanh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType tanh(genType const & angle); + + /// Arc hyperbolic sine; returns the inverse of sinh. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL asinh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType asinh(genType const & x); + + /// Arc hyperbolic cosine; returns the non-negative inverse + /// of cosh. Results are undefined if x < 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL acosh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType acosh(genType const & x); + + /// Arc hyperbolic tangent; returns the inverse of tanh. + /// Results are undefined if abs(x) >= 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atanh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atanh(genType const & x); + + /// @} +}//namespace glm + +#include "func_trigonometric.inl" + +#endif//GLM_CORE_func_trigonometric + + diff --git a/glm/core/func_trigonometric.inl b/glm/core/func_trigonometric.inl new file mode 100755 index 0000000000..72b19e5c5f --- /dev/null +++ b/glm/core/func_trigonometric.inl @@ -0,0 +1,246 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_trigonometric.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include "_vectorize.hpp" + +namespace glm +{ + // radians + template + GLM_FUNC_QUALIFIER genType radians + ( + genType const & degrees + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'radians' only accept floating-point input"); + + genType const pi = genType(3.1415926535897932384626433832795); + return degrees * (pi / genType(180)); + } + + VECTORIZE_VEC(radians) + + // degrees + template + GLM_FUNC_QUALIFIER genType degrees + ( + genType const & radians + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'degrees' only accept floating-point input"); + + const genType pi = genType(3.1415926535897932384626433832795); + return radians * (genType(180) / pi); + } + + VECTORIZE_VEC(degrees) + + // sin + template + GLM_FUNC_QUALIFIER genType sin + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sin' only accept floating-point input"); + + return ::std::sin(angle); + } + + VECTORIZE_VEC(sin) + + // cos + template + GLM_FUNC_QUALIFIER genType cos(genType const & angle) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cos' only accept floating-point input"); + + return ::std::cos(angle); + } + + VECTORIZE_VEC(cos) + + // tan + template + GLM_FUNC_QUALIFIER genType tan + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'tan' only accept floating-point input"); + + return ::std::tan(angle); + } + + VECTORIZE_VEC(tan) + + // asin + template + GLM_FUNC_QUALIFIER genType asin + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asin' only accept floating-point input"); + + return ::std::asin(x); + } + + VECTORIZE_VEC(asin) + + // acos + template + GLM_FUNC_QUALIFIER genType acos + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acos' only accept floating-point input"); + + return ::std::acos(x); + } + + VECTORIZE_VEC(acos) + + // atan + template + GLM_FUNC_QUALIFIER genType atan + ( + genType const & y, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); + + return ::std::atan2(y, x); + } + + VECTORIZE_VEC_VEC(atan) + + template + GLM_FUNC_QUALIFIER genType atan + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); + + return ::std::atan(x); + } + + VECTORIZE_VEC(atan) + + // sinh + template + GLM_FUNC_QUALIFIER genType sinh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sinh' only accept floating-point input"); + + return std::sinh(angle); + } + + VECTORIZE_VEC(sinh) + + // cosh + template + GLM_FUNC_QUALIFIER genType cosh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cosh' only accept floating-point input"); + + return std::cosh(angle); + } + + VECTORIZE_VEC(cosh) + + // tanh + template + GLM_FUNC_QUALIFIER genType tanh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'tanh' only accept floating-point input"); + + return std::tanh(angle); + } + + VECTORIZE_VEC(tanh) + + // asinh + template + GLM_FUNC_QUALIFIER genType asinh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asinh' only accept floating-point input"); + + return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); + } + + VECTORIZE_VEC(asinh) + + // acosh + template + GLM_FUNC_QUALIFIER genType acosh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acosh' only accept floating-point input"); + + if(x < genType(1)) + return genType(0); + return log(x + sqrt(x * x - genType(1))); + } + + VECTORIZE_VEC(acosh) + + // atanh + template + GLM_FUNC_QUALIFIER genType atanh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atanh' only accept floating-point input"); + + if(abs(x) >= genType(1)) + return 0; + return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); + } + + VECTORIZE_VEC(atanh) + +}//namespace glm diff --git a/glm/core/func_vector_relational.hpp b/glm/core/func_vector_relational.hpp new file mode 100755 index 0000000000..236fb31f03 --- /dev/null +++ b/glm/core/func_vector_relational.hpp @@ -0,0 +1,138 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_vector_relational.hpp +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions +/// +/// @defgroup core_func_vector_relational Vector Relational Functions +/// @ingroup core +/// +/// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to +/// operate on scalars and produce scalar Boolean results. For vector results, +/// use the following built-in functions. +/// +/// In all cases, the sizes of all the input and return vectors for any particular +/// call must match. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_vector_relational +#define GLM_CORE_func_vector_relational GLM_VERSION + +#include "_detail.hpp" + +namespace glm +{ + /// @addtogroup core_func_vector_relational + /// @{ + + /// Returns the component-wise comparison result of x < y. + /// + /// @tparam vecType Floating-point or integer vector types. + /// + /// @see GLSL lessThan man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type lessThan(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x <= y. + /// + /// @tparam vecType Floating-point or integer vector types. + /// + /// @see GLSL lessThanEqual man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type lessThanEqual(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x > y. + /// + /// @tparam vecType Floating-point or integer vector types. + /// + /// @see GLSL greaterThan man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type greaterThan(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x >= y. + /// + /// @tparam vecType Floating-point or integer vector types. + /// + /// @see GLSL greaterThanEqual man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type greaterThanEqual(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x == y. + /// + /// @tparam vecType Floating-point, integer or boolean vector types. + /// + /// @see GLSL equal man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type equal(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x != y. + /// + /// @tparam vecType Floating-point, integer or boolean vector types. + /// + /// @see GLSL notEqual man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type notEqual(vecType const & x, vecType const & y); + + /// Returns true if any component of x is true. + /// + /// @tparam vecType Boolean vector types. + /// + /// @see GLSL any man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template