Commit for Pull
This commit is contained in:
@@ -92,12 +92,12 @@ Mesh MeshClass::GetMeshData(MObject object)
|
||||
double biTangent[3];
|
||||
double biNormal[3];
|
||||
VertexLayout thisVertex;
|
||||
MFloatVectorArray biTangents;
|
||||
MFloatVectorArray Tangents;
|
||||
MFloatVectorArray biNormals;
|
||||
|
||||
std::map<int, WeightInfo> vertexWeights = GetWeightData();
|
||||
|
||||
mesh.getTangents(biTangents, MSpace::kObject, NULL);
|
||||
mesh.getTangents(Tangents, MSpace::kObject, NULL);
|
||||
mesh.getBinormals(biNormals, MSpace::kObject, NULL);
|
||||
|
||||
MItMeshFaceVertex faceVert(object);
|
||||
@@ -123,12 +123,12 @@ Mesh MeshClass::GetMeshData(MObject object)
|
||||
thisVertex.Normal[1] = normal[1];
|
||||
thisVertex.Normal[2] = normal[2];
|
||||
|
||||
MFloatVector biTangent = biTangents[faceVert.tangentId()];
|
||||
MFloatVector Tangent = Tangents[faceVert.tangentId()];
|
||||
//MVector tmp = faceVert.getTangent(MSpace::kObject, NULL);
|
||||
//tmp.get(biTangent);
|
||||
thisVertex.BiTangent[0] = biTangent[0];
|
||||
thisVertex.BiTangent[1] = biTangent[1];
|
||||
thisVertex.BiTangent[2] = biTangent[2];
|
||||
thisVertex.Tangent[0] = Tangent[0];
|
||||
thisVertex.Tangent[1] = Tangent[1];
|
||||
thisVertex.Tangent[2] = Tangent[2];
|
||||
|
||||
MFloatVector biNormal = biNormals[faceVert.tangentId()];
|
||||
//faceVert.getBinormal().get(biNormal);
|
||||
|
||||
@@ -12,8 +12,8 @@ class VertexLayout : public OutputData
|
||||
public:
|
||||
float Pos[3];
|
||||
float Normal[3];
|
||||
float Tangent[3];
|
||||
float BiNormal[3];
|
||||
float BiTangent[3];
|
||||
float Uv[2];
|
||||
float BoneIndices[4];
|
||||
float BoneWeights[4];
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
{
|
||||
out.write((char*)&Pos, sizeof(float) * 3);
|
||||
out.write((char*)&Normal, sizeof(float) * 3);
|
||||
out.write((char*)&BiNormal, sizeof(float) * 3);
|
||||
out.write((char*)&Tangent, sizeof(float) * 3);
|
||||
out.write((char*)&BiTangent, sizeof(float) * 3);
|
||||
out.write((char*)&Uv, sizeof(float) * 2);
|
||||
out.write((char*)&BoneIndices, sizeof(float) * 4);
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
{
|
||||
out << Pos[0] << " " << Pos[1] << " " << Pos[2] << endl;
|
||||
out << Normal[0] << " " << Normal[1] << " " << Normal[2] << endl;
|
||||
out << BiNormal[0] << " " << BiNormal[1] << " " << BiNormal[2] << endl;
|
||||
out << Tangent[0] << " " << Tangent[1] << " " << Tangent[2] << endl;
|
||||
out << BiTangent[0] << " " << BiTangent[1] << " " << BiTangent[2] << endl;
|
||||
out << Uv[0] << " " << Uv[1] << endl;
|
||||
out << BoneIndices[0] << " " << BoneIndices[1] << " " << BoneIndices[2] << " " << BoneIndices[3] << endl;
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
return
|
||||
this->Pos[0] == right.Pos[0] && this->Pos[1] == right.Pos[1] && this->Pos[2] == right.Pos[2] &&
|
||||
this->Normal[0] == right.Normal[0] && this->Normal[1] == right.Normal[1] && this->Normal[2] == right.Normal[2] &&
|
||||
this->BiNormal[0] == right.BiNormal[0] && this->BiNormal[1] == right.BiNormal[1] && this->BiNormal[2] == right.BiNormal[2] &&
|
||||
this->Tangent[0] == right.Tangent[0] && this->Tangent[1] == right.Tangent[1] && this->Tangent[2] == right.Tangent[2] &&
|
||||
this->BiTangent[0] == right.BiTangent[0] && this->BiTangent[1] == right.BiTangent[1] && this->BiTangent[2] == right.BiTangent[2] &&
|
||||
this->Uv[0] == right.Uv[0] && this->Uv[1] == right.Uv[1] &&
|
||||
this->BoneIndices[0] == right.BoneIndices[0] && this->BoneIndices[1] == right.BoneIndices[1] && this->BoneIndices[2] == right.BoneIndices[2] && this->BoneIndices[3] == right.BoneIndices[3] &&
|
||||
|
||||
Reference in New Issue
Block a user