MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / appendTextureInfo

Method appendTextureInfo

dae2ma/src/DAE2MAEffectImporter.cpp:732–761  ·  view source on GitHub ↗

--------------------------

Source from the content-addressed store, hash-verified

730
731 // --------------------------
732 void EffectImporter::appendTextureInfo (
733 const COLLADAFW::Effect* effect,
734 const COLLADAFW::Texture &texture,
735 const ShaderType& shaderType,
736 const ShaderAttribute& shaderAttribute,
737 MayaDM::Lambert* shaderNode )
738 {
739 // Get the effect id.
740 const COLLADAFW::UniqueId& effectId = effect->getUniqueId ();
741
742 // Get the current sampler id.
743 const COLLADAFW::SamplerID& samplerId = texture.getSamplerId ();
744
745 // Get the id of the texture map, that should be used by this texture. It must be bounded
746 // to a set of texture coordinates, when the material is bounded to the geometry.
747 const COLLADAFW::TextureMapId& textureMapId = texture.getTextureMapId ();
748
749 // Save the samplerId to this effect, so we can do the connection one time later.
750 TextureInfo textureInfo;
751 textureInfo.setEffectId ( effectId );
752 textureInfo.setSamplerId ( samplerId );
753 textureInfo.setShaderType ( shaderType );
754 textureInfo.setShaderAttribute ( shaderAttribute );
755 textureInfo.setShaderNode ( *shaderNode );
756 textureInfo.setTextureMapId ( textureMapId );
757
758 // Push the shader node attribute data in the map to the effect.
759 mEffectTextureInfosMap [ effectId ].push_back ( textureInfo );
760
761 }
762
763 // --------------------------
764 void EffectImporter::createTexturePlacements (

Callers

nothing calls this directly

Calls 10

getUniqueIdMethod · 0.80
getSamplerIdMethod · 0.80
getTextureMapIdMethod · 0.80
setEffectIdMethod · 0.80
setShaderAttributeMethod · 0.80
setShaderNodeMethod · 0.80
setSamplerIdMethod · 0.45
setShaderTypeMethod · 0.45
setTextureMapIdMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected