本文整理汇总了C++中TextureParams::ReportUnused方法的典型用法代码示例。如果您正苦于以下问题:C++ TextureParams::ReportUnused方法的具体用法?C++ TextureParams::ReportUnused怎么用?C++ TextureParams::ReportUnused使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextureParams
的用法示例。
在下文中一共展示了TextureParams::ReportUnused方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
Reference<Texture<Spectrum> > MakeSpectrumTexture(const string &name,
const Transform &tex2world, const TextureParams &tp) {
Texture<Spectrum> *tex = NULL;
if (name == "constant")
tex = CreateConstantSpectrumTexture(tex2world, tp);
else if (name == "scale")
tex = CreateScaleSpectrumTexture(tex2world, tp);
else if (name == "mix")
tex = CreateMixSpectrumTexture(tex2world, tp);
else if (name == "bilerp")
tex = CreateBilerpSpectrumTexture(tex2world, tp);
else if (name == "imagemap")
tex = CreateImageSpectrumTexture(tex2world, tp);
else if (name == "uv")
tex = CreateUVSpectrumTexture(tex2world, tp);
else if (name == "checkerboard")
tex = CreateCheckerboardSpectrumTexture(tex2world, tp);
else if (name == "dots")
tex = CreateDotsSpectrumTexture(tex2world, tp);
else if (name == "fbm")
tex = CreateFBmSpectrumTexture(tex2world, tp);
else if (name == "wrinkled")
tex = CreateWrinkledSpectrumTexture(tex2world, tp);
else if (name == "marble")
tex = CreateMarbleSpectrumTexture(tex2world, tp);
else if (name == "windy")
tex = CreateWindySpectrumTexture(tex2world, tp);
else
Warning("Spectrum texture \"%s\" unknown.", name.c_str());
tp.ReportUnused();
return tex;
}
示例2: if
Reference<Material> MakeMaterial(const string &name,
const Transform &mtl2world,
const TextureParams &mp) {
Material *material = NULL;
if (name == "matte")
material = CreateMatteMaterial(mtl2world, mp);
else if (name == "plastic")
material = CreatePlasticMaterial(mtl2world, mp);
else if (name == "translucent")
material = CreateTranslucentMaterial(mtl2world, mp);
else if (name == "glass")
material = CreateGlassMaterial(mtl2world, mp);
else if (name == "mirror")
material = CreateMirrorMaterial(mtl2world, mp);
else if (name == "mix") {
string m1 = mp.FindString("namedmaterial1", "");
string m2 = mp.FindString("namedmaterial2", "");
Reference<Material> mat1 = graphicsState.namedMaterials[m1];
Reference<Material> mat2 = graphicsState.namedMaterials[m2];
if (!mat1) {
Error("Named material \"%s\" undefined. Using \"matte\"",
m1.c_str());
mat1 = MakeMaterial("matte", curTransform[0], mp);
}
if (!mat2) {
Error("Named material \"%s\" undefined. Using \"matte\"",
m2.c_str());
mat2 = MakeMaterial("matte", curTransform[0], mp);
}
material = CreateMixMaterial(mtl2world, mp, mat1, mat2);
}
else if (name == "metal")
material = CreateMetalMaterial(mtl2world, mp);
else if (name == "substrate")
material = CreateSubstrateMaterial(mtl2world, mp);
else if (name == "uber")
material = CreateUberMaterial(mtl2world, mp);
else if (name == "skin")
material = CreateSkinMaterial(mtl2world, mp);
else if (name == "skindj")
material = CreateSkinDJMaterial(mtl2world, mp);
else if (name == "subsurface")
material = CreateSubsurfaceMaterial(mtl2world, mp);
else if (name == "skinsubsurface")
material = CreateSkinSubsurfaceMaterial(mtl2world, mp);
else if (name == "kdsubsurface")
material = CreateKdSubsurfaceMaterial(mtl2world, mp);
else if (name == "measured")
material = CreateMeasuredMaterial(mtl2world, mp);
else if (name == "shinymetal")
material = CreateShinyMetalMaterial(mtl2world, mp);
else
Warning("Material \"%s\" unknown.", name.c_str());
mp.ReportUnused();
if (!material) Error("Unable to create material \"%s\"", name.c_str());
return material;
}
示例3: MakeSpectrumTexture
COREDLL Reference<Texture<Spectrum> > MakeSpectrumTexture(const string &name,
const Transform &tex2world, const TextureParams &tp) {
TexturePlugin *plugin = GetPlugin<TexturePlugin>(name, texturePlugins,
PluginSearchPath);
if (plugin) {
Reference<Texture<Spectrum> > ret =
plugin->CreateSpectrumTex(tex2world, tp);
tp.ReportUnused();
return ret;
}
return NULL;
}
示例4: MakeMaterial
COREDLL Reference<Material> MakeMaterial(const string &name,
const Transform &mtl2world,
const TextureParams &mp) {
MaterialPlugin *plugin = GetPlugin<MaterialPlugin>(name, materialPlugins,
PluginSearchPath);
if (plugin) {
Reference<Material> ret =
plugin->CreateMaterial(mtl2world, mp);
mp.ReportUnused();
return ret;
}
return NULL;
}
示例5: if
std::shared_ptr<Material> MakeMaterial(const std::string &name,
const TextureParams &mp) {
Material *material = nullptr;
if (name == "" || name == "none")
return nullptr;
else if (name == "matte")
material = CreateMatteMaterial(mp);
else if (name == "plastic")
material = CreatePlasticMaterial(mp);
else if (name == "translucent")
material = CreateTranslucentMaterial(mp);
else if (name == "glass")
material = CreateGlassMaterial(mp);
else if (name == "hair")
material = CreateHairMaterial(mp);
else if (name == "mirror")
material = CreateMirrorMaterial(mp);
else if (name == "mix") {
std::string m1 = mp.FindString("namedmaterial1", "");
std::string m2 = mp.FindString("namedmaterial2", "");
std::shared_ptr<Material> mat1 = graphicsState.namedMaterials[m1];
std::shared_ptr<Material> mat2 = graphicsState.namedMaterials[m2];
if (!mat1) {
Error("Named material \"%s\" undefined. Using \"matte\"",
m1.c_str());
mat1 = MakeMaterial("matte", mp);
}
if (!mat2) {
Error("Named material \"%s\" undefined. Using \"matte\"",
m2.c_str());
mat2 = MakeMaterial("matte", mp);
}
material = CreateMixMaterial(mp, mat1, mat2);
} else if (name == "metal")
material = CreateMetalMaterial(mp);
else if (name == "substrate")
material = CreateSubstrateMaterial(mp);
else if (name == "uber")
material = CreateUberMaterial(mp);
else if (name == "subsurface")
material = CreateSubsurfaceMaterial(mp);
else if (name == "kdsubsurface")
material = CreateKdSubsurfaceMaterial(mp);
else if (name == "fourier")
material = CreateFourierMaterial(mp);
else
Warning("Material \"%s\" unknown.", name.c_str());
if ((name == "subsurface" || name == "kdsubsurface") &&
(renderOptions->IntegratorName != "path" &&
(renderOptions->IntegratorName != "volpath")))
Warning(
"Subsurface scattering material \"%s\" used, but \"%s\" "
"integrator doesn't support subsurface scattering. "
"Use \"path\" or \"volpath\".",
name.c_str(), renderOptions->IntegratorName.c_str());
mp.ReportUnused();
if (!material) Error("Unable to create material \"%s\"", name.c_str());
return std::shared_ptr<Material>(material);
}