Removed multiple component selection code
This commit is contained in:
@@ -197,7 +197,6 @@ int test_vec3_swizzle3_2()
|
||||
//u = v.rgb; //Illegal
|
||||
//u = v.stp; //Illegal
|
||||
|
||||
#if(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
u = v.xx; Error += (u.x == 1.0f && u.y == 1.0f) ? 0 : 1;
|
||||
u = v.xy; Error += (u.x == 1.0f && u.y == 2.0f) ? 0 : 1;
|
||||
u = v.xz; Error += (u.x == 1.0f && u.y == 3.0f) ? 0 : 1;
|
||||
@@ -243,7 +242,6 @@ int test_vec3_swizzle3_2()
|
||||
v.zx = u; Error += (v.x == 2.0f && v.y == 1.0f && v.z == 1.0f) ? 0 : 1;
|
||||
v.zy = u; Error += (v.x == 2.0f && v.y == 2.0f && v.z == 1.0f) ? 0 : 1;
|
||||
//v.zz = u; //Illegal
|
||||
#endif//(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
|
||||
return Error;
|
||||
}
|
||||
@@ -257,7 +255,6 @@ int test_vec3_swizzle3_3()
|
||||
|
||||
u = v; Error += (u.x == 1.0f && u.y == 2.0f && u.z == 3.0f) ? 0 : 1;
|
||||
|
||||
#if(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
u = v.xyz; Error += (u.x == 1.0f && u.y == 2.0f && u.z == 3.0f) ? 0 : 1;
|
||||
u = v.zyx; Error += (u.x == 3.0f && u.y == 2.0f && u.z == 1.0f) ? 0 : 1;
|
||||
u.zyx = v; Error += (u.x == 3.0f && u.y == 2.0f && u.z == 1.0f) ? 0 : 1;
|
||||
@@ -269,7 +266,7 @@ int test_vec3_swizzle3_3()
|
||||
u = v.stp; Error += (u.x == 1.0f && u.y == 2.0f && u.z == 3.0f) ? 0 : 1;
|
||||
u = v.pts; Error += (u.x == 3.0f && u.y == 2.0f && u.z == 1.0f) ? 0 : 1;
|
||||
u.pts = v; Error += (u.x == 3.0f && u.y == 2.0f && u.z == 1.0f) ? 0 : 1;
|
||||
#endif//(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
@@ -282,7 +279,6 @@ int test_vec3_swizzle_operators()
|
||||
u = glm::vec3(1, 2, 3);
|
||||
v = glm::vec3(10, 20, 30);
|
||||
|
||||
#if(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
// Swizzle, swizzle binary operators
|
||||
q = u.xyz + v.xyz; Error += (q == (u + v)) ? 0 : 1;
|
||||
q = (u.zyx + v.zyx).zyx; Error += (q == (u + v)) ? 0 : 1;
|
||||
@@ -304,7 +300,6 @@ int test_vec3_swizzle_operators()
|
||||
q = (u.xyz * v); Error += (q == (u * v)) ? 0 : 1;
|
||||
q = (u.xxx * v); Error += (q == u.x * v) ? 0 : 1;
|
||||
q = (u.xyz / v); Error += (q == (u / v)) ? 0 : 1;
|
||||
#endif//(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
|
||||
// Compile errors
|
||||
//q = (u.yz * v.xyz);
|
||||
@@ -324,7 +319,6 @@ int test_vec3_swizzle_functions()
|
||||
// glm::dot(u.xy, v.xy); <--- Compile error
|
||||
// glm::dot(u.xy(), v.xy()); <--- Compiles correctly
|
||||
|
||||
#if(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
float r;
|
||||
|
||||
// vec2
|
||||
@@ -351,7 +345,6 @@ int test_vec3_swizzle_functions()
|
||||
r = glm::dot(s, t); Error += (int(r) == 300) ? 0 : 1;
|
||||
r = glm::dot(s.xyzw(), t.xyzw()); Error += (int(r) == 300) ? 0 : 1;
|
||||
r = glm::dot(s.xyz(), t.xyz()); Error += (int(r) == 140) ? 0 : 1;
|
||||
#endif//(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
|
||||
return Error;
|
||||
}
|
||||
@@ -360,7 +353,6 @@ int test_vec3_swizzle_partial()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
#if(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
glm::vec3 A(1, 2, 3);
|
||||
|
||||
{
|
||||
@@ -377,7 +369,6 @@ int test_vec3_swizzle_partial()
|
||||
glm::vec3 B(A.xyz);
|
||||
Error += A == B ? 0 : 1;
|
||||
}
|
||||
#endif//(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,6 @@ int test_vec4_swizzle_partial()
|
||||
|
||||
glm::vec4 A(1, 2, 3, 4);
|
||||
|
||||
#if(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
{
|
||||
glm::vec4 B(A.xy, A.zw);
|
||||
Error += A == B ? 0 : 1;
|
||||
@@ -242,7 +241,6 @@ int test_vec4_swizzle_partial()
|
||||
glm::vec4 B(1.0f, A.yzw);
|
||||
Error += A == B ? 0 : 1;
|
||||
}
|
||||
#endif//(GLM_SUPPORT_SWIZZLE_OPERATOR())
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user