added vector interconversions

This commit is contained in:
2026-03-11 14:28:15 -04:00
parent 4fe50d12d0
commit 0003a9d6d2
6 changed files with 724 additions and 583 deletions

View File

@ -58,6 +58,7 @@ vec3::vec3(const vec2 rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = 0;
return;
}
@ -65,6 +66,7 @@ vec3::vec3(const vec4 rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
return;
}
@ -72,6 +74,7 @@ vec3::vec3(const vec2f rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = 0;
return;
}
@ -79,6 +82,7 @@ vec3::vec3(const vec3f rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
return;
}
@ -86,6 +90,7 @@ vec3::vec3(const vec4f rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
return;
}
@ -93,6 +98,7 @@ vec3::vec3(const vec2i rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = 0;
return;
}
@ -100,6 +106,7 @@ vec3::vec3(const vec3i rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
return;
}
@ -107,6 +114,7 @@ vec3::vec3(const vec4i rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
return;
}
@ -114,6 +122,8 @@ vec4::vec4(const vec2 rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = 0;
w = 0;
return;
}
@ -121,6 +131,8 @@ vec4::vec4(const vec3 rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
w = 0;
return;
}
@ -128,6 +140,8 @@ vec4::vec4(const vec2f rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = 0;
w = 0;
return;
}
@ -135,6 +149,8 @@ vec4::vec4(const vec3f rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
w = 0;
return;
}
@ -142,6 +158,8 @@ vec4::vec4(const vec4f rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
w = (double)rhs.w;
return;
}
@ -149,6 +167,8 @@ vec4::vec4(const vec2i rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = 0;
w = 0;
return;
}
@ -156,6 +176,8 @@ vec4::vec4(const vec3i rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
w = 0;
return;
}
@ -163,6 +185,8 @@ vec4::vec4(const vec4i rhs)
{
x = (double)rhs.x;
y = (double)rhs.y;
z = (double)rhs.z;
w = (double)rhs.w;
return;
}
@ -226,6 +250,7 @@ vec3f::vec3f(const vec2 rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = 0;
return;
}
@ -233,6 +258,7 @@ vec3f::vec3f(const vec3 rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
return;
}
@ -240,6 +266,7 @@ vec3f::vec3f(const vec4 rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
return;
}
@ -247,6 +274,7 @@ vec3f::vec3f(const vec2f rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = 0;
return;
}
@ -254,6 +282,7 @@ vec3f::vec3f(const vec4f rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
return;
}
@ -261,6 +290,7 @@ vec3f::vec3f(const vec2i rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = 0;
return;
}
@ -268,6 +298,7 @@ vec3f::vec3f(const vec3i rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
return;
}
@ -275,6 +306,7 @@ vec3f::vec3f(const vec4i rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
return;
}
@ -282,6 +314,8 @@ vec4f::vec4f(const vec2 rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = 0;
w = 0;
return;
}
@ -289,6 +323,8 @@ vec4f::vec4f(const vec3 rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
w = 0;
return;
}
@ -296,6 +332,8 @@ vec4f::vec4f(const vec4 rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
w = (float)rhs.w;
return;
}
@ -303,6 +341,8 @@ vec4f::vec4f(const vec2f rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = 0;
w = 0;
return;
}
@ -310,6 +350,8 @@ vec4f::vec4f(const vec3f rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
w = 0;
return;
}
@ -317,6 +359,8 @@ vec4f::vec4f(const vec2i rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = 0;
w = 0;
return;
}
@ -324,6 +368,8 @@ vec4f::vec4f(const vec3i rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
w = 0;
return;
}
@ -331,6 +377,8 @@ vec4f::vec4f(const vec4i rhs)
{
x = (float)rhs.x;
y = (float)rhs.y;
z = (float)rhs.z;
w = (float)rhs.w;
return;
}
@ -394,6 +442,7 @@ vec3i::vec3i(const vec2 rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = 0;
return;
}
@ -401,6 +450,7 @@ vec3i::vec3i(const vec3 rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
return;
}
@ -408,6 +458,7 @@ vec3i::vec3i(const vec4 rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
return;
}
@ -415,6 +466,7 @@ vec3i::vec3i(const vec2f rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = 0;
return;
}
@ -422,6 +474,7 @@ vec3i::vec3i(const vec3f rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
return;
}
@ -429,6 +482,7 @@ vec3i::vec3i(const vec4f rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
return;
}
@ -436,6 +490,7 @@ vec3i::vec3i(const vec2i rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = 0;
return;
}
@ -443,6 +498,7 @@ vec3i::vec3i(const vec4i rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
return;
}
@ -450,6 +506,8 @@ vec4i::vec4i(const vec2 rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = 0;
w = 0;
return;
}
@ -457,6 +515,8 @@ vec4i::vec4i(const vec3 rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
w = 0;
return;
}
@ -464,6 +524,8 @@ vec4i::vec4i(const vec4 rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
w = (int)rhs.w;
return;
}
@ -471,6 +533,8 @@ vec4i::vec4i(const vec2f rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = 0;
w = 0;
return;
}
@ -478,6 +542,8 @@ vec4i::vec4i(const vec3f rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
w = 0;
return;
}
@ -485,6 +551,8 @@ vec4i::vec4i(const vec4f rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
w = (int)rhs.w;
return;
}
@ -492,6 +560,8 @@ vec4i::vec4i(const vec2i rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = 0;
w = 0;
return;
}
@ -499,6 +569,8 @@ vec4i::vec4i(const vec3i rhs)
{
x = (int)rhs.x;
y = (int)rhs.y;
z = (int)rhs.z;
w = 0;
return;
}