diff --git a/components/nif/data.hpp b/components/nif/data.hpp index 118e21e54..ad670bc5e 100644 --- a/components/nif/data.hpp +++ b/components/nif/data.hpp @@ -110,7 +110,7 @@ public: if(nif->getInt()) nif->getFloats(normals, verts*3); - center = nif->getVector(); + center = nif->getVector3(); radius = nif->getFloat(); if(nif->getInt()) @@ -214,12 +214,12 @@ public: for(int i=0; igetFloat(); - nif->getVector(); // This isn't really shared between type 1 - // and type 2, most likely + nif->getVector3(); // This isn't really shared between type 1 + // and type 2, most likely if(type == 2) { - nif->getVector(); - nif->getVector(); + nif->getVector3(); + nif->getVector3(); } } } @@ -400,8 +400,8 @@ public: void read(NIFFile *nif) { - trafo.rotation = nif->getMatrix(); - trafo.trans = nif->getVector(); + trafo.rotation = nif->getMatrix3(); + trafo.trans = nif->getVector3(); trafo.scale = nif->getFloat(); int boneNum = nif->getInt(); @@ -412,8 +412,8 @@ public: { BoneInfo &bi = bones[i]; - bi.trafo.rotation = nif->getMatrix(); - bi.trafo.trans = nif->getVector(); + bi.trafo.rotation = nif->getMatrix3(); + bi.trafo.trans = nif->getVector3(); bi.trafo.scale = nif->getFloat(); bi.unknown = nif->getVector4(); diff --git a/components/nif/effect.hpp b/components/nif/effect.hpp index 1a2ecace8..850415dad 100644 --- a/components/nif/effect.hpp +++ b/components/nif/effect.hpp @@ -45,9 +45,9 @@ struct NiLight : Effect void read(NIFFile *nif) { dimmer = nif->getFloat(); - ambient = nif->getVector(); - diffuse = nif->getVector(); - specular = nif->getVector(); + ambient = nif->getVector3(); + diffuse = nif->getVector3(); + specular = nif->getVector3(); } }; SLight light; diff --git a/components/nif/nif_file.hpp b/components/nif/nif_file.hpp index 0218795e0..a21882c6d 100644 --- a/components/nif/nif_file.hpp +++ b/components/nif/nif_file.hpp @@ -134,7 +134,7 @@ public: unsigned short getUShort() { return read_le16(); } int getInt() { return read_le32(); } float getFloat() { return read_le32f(); } - Ogre::Vector3 getVector() + Ogre::Vector3 getVector3() { float a[3]; for(size_t i = 0;i < 3;i++) @@ -148,7 +148,7 @@ public: a[i] = getFloat(); return Ogre::Vector4(a); } - Ogre::Matrix3 getMatrix() + Ogre::Matrix3 getMatrix3() { Ogre::Real a[3][3]; for(size_t i = 0;i < 3;i++) @@ -161,10 +161,10 @@ public: Transformation getTrafo() { Transformation t; - t.pos = getVector(); - t.rotation = getMatrix(); + t.pos = getVector3(); + t.rotation = getMatrix3(); t.scale = getFloat(); - t.velocity = getVector(); + t.velocity = getVector3(); return t; } diff --git a/components/nif/node.hpp b/components/nif/node.hpp index 240dbe540..64ef1e3e9 100644 --- a/components/nif/node.hpp +++ b/components/nif/node.hpp @@ -63,9 +63,9 @@ public: if(hasBounds) { nif->getInt(); // always 1 - boundPos = nif->getVector(); - boundRot = nif->getMatrix(); - boundXYZ = nif->getVector(); + boundPos = nif->getVector3(); + boundRot = nif->getMatrix3(); + boundXYZ = nif->getVector3(); } parent = NULL; diff --git a/components/nif/property.hpp b/components/nif/property.hpp index 1b455b14f..b24e49b47 100644 --- a/components/nif/property.hpp +++ b/components/nif/property.hpp @@ -172,10 +172,10 @@ struct S_MaterialProperty void read(NIFFile *nif) { - ambient = nif->getVector(); - diffuse = nif->getVector(); - specular = nif->getVector(); - emissive = nif->getVector(); + ambient = nif->getVector3(); + diffuse = nif->getVector3(); + specular = nif->getVector3(); + emissive = nif->getVector3(); glossiness = nif->getFloat(); alpha = nif->getFloat(); }