本文整理汇总了Java中com.badlogic.gdx.graphics.g3d.Material.remove方法的典型用法代码示例。如果您正苦于以下问题:Java Material.remove方法的具体用法?Java Material.remove怎么用?Java Material.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.graphics.g3d.Material
的用法示例。
在下文中一共展示了Material.remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: turnOffLights
import com.badlogic.gdx.graphics.g3d.Material; //导入方法依赖的package包/类
public void turnOffLights() {
for (Material mat : lightMaterials) {
if (mat.has(ColorAttribute.Emissive)) {
mat.remove(ColorAttribute.Emissive);
}
}
}
示例2: applyToMaterial
import com.badlogic.gdx.graphics.g3d.Material; //导入方法依赖的package包/类
/**
* Applies this material asset to the libGDX material.
*
* @param material
* @return
*/
public Material applyToMaterial(Material material) {
if (diffuseColor != null) {
material.set(new ColorAttribute(ColorAttribute.Diffuse, diffuseColor));
}
if (diffuseTexture != null) {
material.set(new TextureAttribute(TextureAttribute.Diffuse, diffuseTexture.getTexture()));
} else {
material.remove(TextureAttribute.Diffuse);
}
material.set(new FloatAttribute(FloatAttribute.Shininess, shininess));
return material;
}
示例3: addAttributeForm
import com.badlogic.gdx.graphics.g3d.Material; //导入方法依赖的package包/类
private void addAttributeForm(Attribute attribute, final Material material) {
if (attribute instanceof ColorAttribute) {
final ColorAttribute colorAttribute = (ColorAttribute) attribute;
String type = ColorAttribute.getAttributeAlias(colorAttribute.type);
ColorForm.ColorChangeListener colorChangeListener = new ColorForm.ColorChangeListener() {
@Override
public void onColorChange(float r, float g, float b) {
//replace(material, colorAttribute, attribute);
listener.onMaterialChange(material);
}
};
final ColorForm colorAttributeForm = new ColorForm(
getSkin(), "ColorAttribute " + type, colorAttribute.color, colorChangeListener, new RemoveTableListener() {
@Override
public void onRemove(Table table) {
material.remove(colorAttribute.type);
listener.onMaterialChange(material);
removeActor(table);
pack();
listener.onMaterialChange(material);
}
});
add(colorAttributeForm).colspan(2).left().fill();
row();
}
pack();
}
示例4: removeAtmosphericScattering
import com.badlogic.gdx.graphics.g3d.Material; //导入方法依赖的package包/类
public void removeAtmosphericScattering(Material mat) {
mat.remove(AtmosphereAttribute.CameraHeight);
}