| 57 | namespace Assimp { |
| 58 | |
| 59 | aiColor4D AMFImporter::SPP_Material::GetColor(const float /*pX*/, const float /*pY*/, const float /*pZ*/) const { |
| 60 | aiColor4D tcol; |
| 61 | |
| 62 | // Check if stored data are supported. |
| 63 | if (!Composition.empty()) { |
| 64 | throw DeadlyImportError("IME. GetColor for composition"); |
| 65 | } |
| 66 | |
| 67 | if (Color->Composed) { |
| 68 | throw DeadlyImportError("IME. GetColor, composed color"); |
| 69 | } |
| 70 | |
| 71 | tcol = Color->Color; |
| 72 | |
| 73 | // Check if default color must be used |
| 74 | if ((tcol.r == 0) && (tcol.g == 0) && (tcol.b == 0) && (tcol.a == 0)) { |
| 75 | tcol.r = 0.5f; |
| 76 | tcol.g = 0.5f; |
| 77 | tcol.b = 0.5f; |
| 78 | tcol.a = 1; |
| 79 | } |
| 80 | |
| 81 | return tcol; |
| 82 | } |
| 83 | |
| 84 | void AMFImporter::PostprocessHelper_CreateMeshDataArray(const AMFMesh &nodeElement, std::vector<aiVector3D> &vertexCoordinateArray, |
| 85 | std::vector<AMFColor *> &pVertexColorArray) const { |