本文整理汇总了C++中StdMat2::SetTexmapAmt方法的典型用法代码示例。如果您正苦于以下问题:C++ StdMat2::SetTexmapAmt方法的具体用法?C++ StdMat2::SetTexmapAmt怎么用?C++ StdMat2::SetTexmapAmt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StdMat2
的用法示例。
在下文中一共展示了StdMat2::SetTexmapAmt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assignTextureToMaterial
//------------------------------
void MaterialCreator::assignTextureToMaterial( Mtl* material, int slot, BitmapTex* texture )
{
if ( !material )
return;
assert( (slot >= 0) && (slot < NTEXMAPS) );
// Assign it to the material
material->SetSubTexmap(slot, texture);
// For diffuse textures, view them in the viewport
if (slot == ID_DI)
{
// From Sparks Knowledge-base: "Topic: How to Activate a Texmap in viewport using API ??"
material->SetActiveTexmap(texture);
material->SetMtlFlag(MTL_TEX_DISPLAY_ENABLED);
material->NotifyDependents(FOREVER, (PartID) PART_ALL, REFMSG_CHANGE);
}
// Read in the transparency mode for opacity textures
if (slot == ID_OP)
{
// BOOL isAlphaTranslucency = effect->GetTransparencyMode() == FCDEffectStandard::A_ONE;
// texture->SetAlphaAsMono(isAlphaTranslucency);
// texture->SetAlphaAsRGB(!isAlphaTranslucency);
}
if (material->ClassID().PartA() == DMTL2_CLASS_ID || material->ClassID().PartA() == DMTL_CLASS_ID)
{
StdMat2* stdMat = (StdMat2*) material;
// Override the default amount set here, the final amount will
// be decided by the amount multipliers on the textures them selves
stdMat->SetTexmapAmt(slot, 1.0f, 0);
}
}