mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 08:39:45 +00:00
Rename getMatrix->getMatrix3 and getVector->getVector3
This commit is contained in:
parent
d30f64650a
commit
dddf1b4ee5
5 changed files with 24 additions and 24 deletions
|
@ -110,7 +110,7 @@ public:
|
||||||
if(nif->getInt())
|
if(nif->getInt())
|
||||||
nif->getFloats(normals, verts*3);
|
nif->getFloats(normals, verts*3);
|
||||||
|
|
||||||
center = nif->getVector();
|
center = nif->getVector3();
|
||||||
radius = nif->getFloat();
|
radius = nif->getFloat();
|
||||||
|
|
||||||
if(nif->getInt())
|
if(nif->getInt())
|
||||||
|
@ -214,12 +214,12 @@ public:
|
||||||
for(int i=0; i<count; i++)
|
for(int i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
/*float time =*/ nif->getFloat();
|
/*float time =*/ nif->getFloat();
|
||||||
nif->getVector(); // This isn't really shared between type 1
|
nif->getVector3(); // This isn't really shared between type 1
|
||||||
// and type 2, most likely
|
// and type 2, most likely
|
||||||
if(type == 2)
|
if(type == 2)
|
||||||
{
|
{
|
||||||
nif->getVector();
|
nif->getVector3();
|
||||||
nif->getVector();
|
nif->getVector3();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -400,8 +400,8 @@ public:
|
||||||
|
|
||||||
void read(NIFFile *nif)
|
void read(NIFFile *nif)
|
||||||
{
|
{
|
||||||
trafo.rotation = nif->getMatrix();
|
trafo.rotation = nif->getMatrix3();
|
||||||
trafo.trans = nif->getVector();
|
trafo.trans = nif->getVector3();
|
||||||
trafo.scale = nif->getFloat();
|
trafo.scale = nif->getFloat();
|
||||||
|
|
||||||
int boneNum = nif->getInt();
|
int boneNum = nif->getInt();
|
||||||
|
@ -412,8 +412,8 @@ public:
|
||||||
{
|
{
|
||||||
BoneInfo &bi = bones[i];
|
BoneInfo &bi = bones[i];
|
||||||
|
|
||||||
bi.trafo.rotation = nif->getMatrix();
|
bi.trafo.rotation = nif->getMatrix3();
|
||||||
bi.trafo.trans = nif->getVector();
|
bi.trafo.trans = nif->getVector3();
|
||||||
bi.trafo.scale = nif->getFloat();
|
bi.trafo.scale = nif->getFloat();
|
||||||
bi.unknown = nif->getVector4();
|
bi.unknown = nif->getVector4();
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,9 @@ struct NiLight : Effect
|
||||||
void read(NIFFile *nif)
|
void read(NIFFile *nif)
|
||||||
{
|
{
|
||||||
dimmer = nif->getFloat();
|
dimmer = nif->getFloat();
|
||||||
ambient = nif->getVector();
|
ambient = nif->getVector3();
|
||||||
diffuse = nif->getVector();
|
diffuse = nif->getVector3();
|
||||||
specular = nif->getVector();
|
specular = nif->getVector3();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
SLight light;
|
SLight light;
|
||||||
|
|
|
@ -134,7 +134,7 @@ public:
|
||||||
unsigned short getUShort() { return read_le16(); }
|
unsigned short getUShort() { return read_le16(); }
|
||||||
int getInt() { return read_le32(); }
|
int getInt() { return read_le32(); }
|
||||||
float getFloat() { return read_le32f(); }
|
float getFloat() { return read_le32f(); }
|
||||||
Ogre::Vector3 getVector()
|
Ogre::Vector3 getVector3()
|
||||||
{
|
{
|
||||||
float a[3];
|
float a[3];
|
||||||
for(size_t i = 0;i < 3;i++)
|
for(size_t i = 0;i < 3;i++)
|
||||||
|
@ -148,7 +148,7 @@ public:
|
||||||
a[i] = getFloat();
|
a[i] = getFloat();
|
||||||
return Ogre::Vector4(a);
|
return Ogre::Vector4(a);
|
||||||
}
|
}
|
||||||
Ogre::Matrix3 getMatrix()
|
Ogre::Matrix3 getMatrix3()
|
||||||
{
|
{
|
||||||
Ogre::Real a[3][3];
|
Ogre::Real a[3][3];
|
||||||
for(size_t i = 0;i < 3;i++)
|
for(size_t i = 0;i < 3;i++)
|
||||||
|
@ -161,10 +161,10 @@ public:
|
||||||
Transformation getTrafo()
|
Transformation getTrafo()
|
||||||
{
|
{
|
||||||
Transformation t;
|
Transformation t;
|
||||||
t.pos = getVector();
|
t.pos = getVector3();
|
||||||
t.rotation = getMatrix();
|
t.rotation = getMatrix3();
|
||||||
t.scale = getFloat();
|
t.scale = getFloat();
|
||||||
t.velocity = getVector();
|
t.velocity = getVector3();
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,9 +63,9 @@ public:
|
||||||
if(hasBounds)
|
if(hasBounds)
|
||||||
{
|
{
|
||||||
nif->getInt(); // always 1
|
nif->getInt(); // always 1
|
||||||
boundPos = nif->getVector();
|
boundPos = nif->getVector3();
|
||||||
boundRot = nif->getMatrix();
|
boundRot = nif->getMatrix3();
|
||||||
boundXYZ = nif->getVector();
|
boundXYZ = nif->getVector3();
|
||||||
}
|
}
|
||||||
|
|
||||||
parent = NULL;
|
parent = NULL;
|
||||||
|
|
|
@ -172,10 +172,10 @@ struct S_MaterialProperty
|
||||||
|
|
||||||
void read(NIFFile *nif)
|
void read(NIFFile *nif)
|
||||||
{
|
{
|
||||||
ambient = nif->getVector();
|
ambient = nif->getVector3();
|
||||||
diffuse = nif->getVector();
|
diffuse = nif->getVector3();
|
||||||
specular = nif->getVector();
|
specular = nif->getVector3();
|
||||||
emissive = nif->getVector();
|
emissive = nif->getVector3();
|
||||||
glossiness = nif->getFloat();
|
glossiness = nif->getFloat();
|
||||||
alpha = nif->getFloat();
|
alpha = nif->getFloat();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue