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