MCPcopy Create free account
hub / github.com/XJTU-Graphics/dandelion / GetColor

Method GetColor

deps/assimp/code/AssetLib/AMF/AMFImporter_Postprocess.cpp:59–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57namespace Assimp {
58
59aiColor4D 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
84void AMFImporter::PostprocessHelper_CreateMeshDataArray(const AMFMesh &nodeElement, std::vector<aiVector3D> &vertexCoordinateArray,
85 std::vector<AMFColor *> &pVertexColorArray) const {

Callers 5

TESTFunction · 0.80
EncodeLightsPropertyMethod · 0.80
CompareScenesMethod · 0.80
TESTFunction · 0.80

Calls 2

DeadlyImportErrorFunction · 0.85
emptyMethod · 0.45

Tested by 3

TESTFunction · 0.64
CompareScenesMethod · 0.64
TESTFunction · 0.64