add remaining specializations

hopefully i didnt mess this up too bad
pull/328/head
Gargaj 2014-08-08 12:56:11 +02:00
parent b712bf1770
commit fa99aa0d3a
1 changed files with 41 additions and 0 deletions

View File

@ -100,6 +100,38 @@ T Read(IOStream * stream)
return t; return t;
} }
template <>
aiVector3D Read<aiVector3D>(IOStream * stream)
{
aiVector3D v;
v.x = Read<float>(stream);
v.y = Read<float>(stream);
v.z = Read<float>(stream);
return v;
}
template <>
aiColor4D Read<aiColor4D>(IOStream * stream)
{
aiColor4D c;
c.r = Read<float>(stream);
c.g = Read<float>(stream);
c.b = Read<float>(stream);
c.a = Read<float>(stream);
return c;
}
template <>
aiQuaternion Read<aiQuaternion>(IOStream * stream)
{
aiQuaternion v;
v.w = Read<float>(stream);
v.x = Read<float>(stream);
v.y = Read<float>(stream);
v.z = Read<float>(stream);
return v;
}
template <> template <>
aiString Read<aiString>(IOStream * stream) aiString Read<aiString>(IOStream * stream)
{ {
@ -109,6 +141,15 @@ aiString Read<aiString>(IOStream * stream)
return s; return s;
} }
template <>
aiVertexWeight Read<aiVertexWeight>(IOStream * stream)
{
aiVertexWeight w;
w.mVertexId = Read<unsigned int>(stream);
w.mWeight = Read<float>(stream);
return w;
}
template <> template <>
aiMatrix4x4 Read<aiMatrix4x4>(IOStream * stream) aiMatrix4x4 Read<aiMatrix4x4>(IOStream * stream)
{ {