35 lines
569 B
Objective-C
35 lines
569 B
Objective-C
//
|
|
// myGL.h
|
|
// SkyRoads
|
|
//
|
|
// Created by Joshua Moerman on 12/22/12.
|
|
// Copyright (c) 2012 Vadovas. All rights reserved.
|
|
//
|
|
|
|
#ifndef SkyRoads_myGL_h
|
|
#define SkyRoads_myGL_h
|
|
|
|
#import <GLKit/GLKit.h>
|
|
#include <array>
|
|
|
|
namespace gl {
|
|
typedef std::array<GLfloat, 7> Vertex;
|
|
typedef std::array<Vertex, 8> Quad; //degenerate
|
|
|
|
Vertex translate(Vertex v, GLfloat x, GLfloat y, GLfloat z){
|
|
v[0] += x;
|
|
v[1] += y;
|
|
v[2] += z;
|
|
return v;
|
|
}
|
|
|
|
Vertex scale(Vertex v, GLfloat x, GLfloat y, GLfloat z){
|
|
v[0] *= x;
|
|
v[1] *= y;
|
|
v[2] *= z;
|
|
return v;
|
|
}
|
|
}
|
|
|
|
|
|
#endif
|