MSVC fix-up

This commit is contained in:
Charles J. Cliffe 2015-08-10 17:27:48 -04:00
parent 1fd380d2fb
commit e1016e5cc5
5 changed files with 13 additions and 3 deletions

View File

@ -23,7 +23,9 @@ namespace CubicVR {
__float a,b,c,d,e,f,g,h,i;
// __float operator [] (unsigned i) const { return ((__float *)this)[i]; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
operator __float*() const { return (__float *)this; }
mat3(__float ai,__float bi,__float ci,__float di,__float ei,__float fi,__float gi,__float hi,__float ii) {

View File

@ -25,7 +25,10 @@ namespace CubicVR {
__float a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;
// __float operator [] (unsigned i) const { return ((__float *)this)[i]; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
operator __float*() const { return (__float *)this; }
mat4(__float ai,__float bi,__float ci,__float di,__float ei,__float fi,__float gi,__float hi,__float ii,__float ji,__float ki,__float li,__float mi,__float ni,__float oi,__float pi) {
a = ai; b = bi; c = ci; d = di; e = ei; f = fi; g = gi; h = hi; i = ii; j = ji; k = ki; l = li; m = mi; n = ni; o = oi; p = pi;

View File

@ -25,8 +25,9 @@ namespace CubicVR {
__float& v() { return y; }
// __float operator [] (unsigned i) const { return ((__float *)this)[i]; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
vec2 (__float xi,__float yi) { x = xi; y = yi; }
vec2 () { x = y = 0.0f; }

View File

@ -29,7 +29,9 @@ namespace CubicVR {
__float& g() { return y; }
__float& b() { return z; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
vec3 (__float xi,__float yi,__float zi) { x = xi; y = yi; z = zi; }
vec3 () { x = y = z = 0.0f; }

View File

@ -28,7 +28,9 @@ namespace CubicVR {
__float& a() { return w; }
// __float operator [] (unsigned i) const { return ((__float *)this)[i]; }
#ifndef _WIN32
__float& operator [] (unsigned i) { return ((__float *)this)[i]; }
#endif
vec4 (__float xi,__float yi,__float zi,__float wi) { x = xi; y = yi; z = zi; w = wi; }
vec4 () { x = y = z = w = 0.0f; }