diff --git a/external/cubicvr2/math/mat3.h b/external/cubicvr2/math/mat3.h index e96b0db..8f5ab22 100644 --- a/external/cubicvr2/math/mat3.h +++ b/external/cubicvr2/math/mat3.h @@ -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) { diff --git a/external/cubicvr2/math/mat4.h b/external/cubicvr2/math/mat4.h index b46409c..0059cd8 100644 --- a/external/cubicvr2/math/mat4.h +++ b/external/cubicvr2/math/mat4.h @@ -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; diff --git a/external/cubicvr2/math/vec2.h b/external/cubicvr2/math/vec2.h index d7a7aad..24011c7 100644 --- a/external/cubicvr2/math/vec2.h +++ b/external/cubicvr2/math/vec2.h @@ -25,8 +25,9 @@ namespace CubicVR { __float& v() { return y; } // __float operator [] (unsigned i) const { return ((__float *)this)[i]; } - __float& operator [] (unsigned i) { 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; } diff --git a/external/cubicvr2/math/vec3.h b/external/cubicvr2/math/vec3.h index 9dcdca6..220bf60 100644 --- a/external/cubicvr2/math/vec3.h +++ b/external/cubicvr2/math/vec3.h @@ -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; } diff --git a/external/cubicvr2/math/vec4.h b/external/cubicvr2/math/vec4.h index 5975079..ad795c1 100644 --- a/external/cubicvr2/math/vec4.h +++ b/external/cubicvr2/math/vec4.h @@ -28,8 +28,10 @@ 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; }