com.supermap.data
类 Material3DPBR
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.Material3D
-
- com.supermap.data.Material3DPBR
-
- 所有已实现的接口:
- IDisposable
public class Material3DPBR extends Material3D
PBR材质类。该类用于对模型添加PBR材质时,设置材质信息时使用。
-
-
构造器概要
构造器 构造器和说明 Material3DPBR()Material3DPBR(Material3DPBR material3DPBR)PBR材质对象拷贝。
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 Material3DPBRclone()voiddisplayExceptionMessage(long handle, String message)句柄判空公共方法voiddispose()释放所占资源。floatgetAlphaCutoff()当alphaMode为Mask时,着色器根据这个值和baseColor的Alpha值进行比较决定是否丢弃PBRAlphaModeTypegetAlphaMode()获取UGAlphaMode枚举值double[]getBaseColor()获取物体的基本颜色因子intgetBaseColorTextureCoordIndex()获取模型基础纹理的纹理坐标序号.intgetBaseColorTextureIndex()物体基本颜色的纹理在纹理数组中的序号.TextureMotionParametergetBaseColorTextureOffsetMotionParameter()获取物体的基本颜色纹理平移运动的参数,U、V方向的速度可正可负,周期需大于等于零。TextureMotionParametergetBaseColorTextureTilingMotionParameter()获取物体的基本颜色纹理缩放运动的参数,U、V方向的速度可正可负,周期需大于等于零。double[]getEmissiveFactor()获取控制自发光强度的因子。intgetEmissiveTextureCoordIndex()获取自发光纹理的纹理坐标在纹理坐标数组中的序号。intgetEmissiveTextureIndex()获取自发光纹理在纹理数组中的序号。TextureMotionParametergetEmissiveTextureOffsetMotionParameter()获取自发光纹理平移运动的参数,U、V方向的速度可正可负,周期需大于等于零。TextureMotionParametergetEmissiveTextureTilingMotionParameter()获取自发光纹理缩放运动的参数,U、V方向的速度可正可负,周期需大于等于零。intgetMaskTextureCoordIndex()获取掩膜纹理的纹理坐标在纹理坐标数组中的序号intgetMaskTextureIndex()获取掩膜纹理在纹理数组中的序号 RGB纹理floatgetMetallicFactor()控制金属性强弱的因子.intgetMetallicRoughnessTextureCoordIndex()金属度和粗糙性纹理的纹理坐标在数组中的序号intgetMetallicRoughnessTextureIndex()金属度和粗糙性纹理在纹理数组中的序号(R通道存储金属度,G通道存储粗糙度).intgetNormalTextureCoordIndex()获取法线纹理的纹理坐标在纹理坐标数组中的序号。intgetNormalTextureIndex()获取法线纹理在纹理数组中的序号,物体表面的凹凸细节 float格式RGB纹理。floatgetNormalTextureScale()获取法线纹理的缩放因子。intgetOcclusionTextureCoordIndex()获取遮挡图的纹理坐标在纹理坐标数组中的序号。intgetOcclusionTextureIndex()获取遮挡图在纹理数组中的序号,用于物体表面凹凸性对光照的影响,比如缝隙处就暗 float灰度纹理。floatgetOcclusionTextureStrength()获取遮挡图的缩放因子floatgetRoughnessFactor()控制粗糙性强弱的因子booleanisDoubleSided()是否双面渲染的结果voidsetAlphaCutoff(float result)设置当alphaMode为Mask时,决定释放丢弃voidsetAlphaMode(PBRAlphaModeType modeType)设置UGAlphaMode的枚举 PBRAM_UnKnown = 0, //!voidsetBaseColor(double[] color)设置物体的基本颜色因子.voidsetBaseColorTextureCoordIndex(int result)设置模型基础纹理的纹理坐标序号.voidsetBaseColorTextureIndex(int result)设置物体基本颜色的纹理在纹理数组中的序号.voidsetBaseColorTextureOffsetMotionParameter(TextureMotionParameter parameters)设置物体的基本颜色纹理平移运动的参数,U、V方向的速度可正可负,周期需大于等于零。voidsetBaseColorTextureTilingMotionParameter(TextureMotionParameter parameters)设置物体的基本颜色纹理缩放运动的参数,U、V方向的速度可正可负,周期需大于等于零。voidsetDoubleSided(boolean result)设置是否双面渲染voidsetEmissiveFactor(double[] result)设置控制自发光强度的因子。voidsetEmissiveTextureCoordIndex(int result)设置自发光纹理的纹理坐标在纹理坐标数组中的序号。voidsetEmissiveTextureIndex(int result)设置自发光纹理在纹理数组中的序号。voidsetEmissiveTextureOffsetMotionParameter(TextureMotionParameter parameters)设置自发光纹理平移运动的参数,U、V方向的速度可正可负,周期需大于等于零。voidsetEmissiveTextureTilingMotionParameter(TextureMotionParameter parameters)设置自发光纹理缩放运动的参数,U、V方向的速度可正可负,周期需大于等于零。voidsetMaskTextureCoordIndex(int maskTextureIndex)设置掩膜纹理的纹理坐标在纹理坐标数组中的序号voidsetMaskTextureIndex(int maskTextureIndex)新设置掩膜纹理在纹理数组中的序号 RGB纹理voidsetMetallicFactor(float result)设置控制金属性强弱的因子.voidsetMetallicRoughnessTextureCoordIndex(int result)设置金属度和粗糙性纹理的纹理坐标在数组中的序号.voidsetMetallicRoughnessTextureIndex(int result)设置金属度和粗糙性纹理在纹理数组中的序号.voidsetNormalTextureCoordIndex(int result)设置法线纹理的纹理坐标在纹理坐标数组中的序号。voidsetNormalTextureIndex(int result)设置法线纹理在纹理数组中的序号。voidsetNormalTextureScale(float result)设置法线纹理的缩放因子。voidsetOcclusionTextureCoordIndex(int result)设置遮挡图的纹理坐标在纹理坐标数组中的序号。voidsetOcclusionTextureIndex(int result)设置遮挡图在纹理数组中的序号。voidsetOcclusionTextureStrength(float result)设置遮挡图的缩放因子voidsetRoughnessFactor(float result)设置控制粗糙性强弱的因子。-
从类继承的方法 com.supermap.data.Material3D
addTexture, addTexture, check, fromJSON, fromJSON, getMaterialColor, getMaterialType, getMatrix, getName, getTexture, getTexture, getTextureCount, getTextures, getTextureWrapMode, removeTexture, removeTextures, setMaterialColor, setName, setPosition, setRotate, setScale, setTexture, setTextures, setTextureWrapMode, toJSON, updateTexture
-
-
-
-
构造器详细资料
-
Material3DPBR
public Material3DPBR()
-
Material3DPBR
public Material3DPBR(Material3DPBR material3DPBR)
PBR材质对象拷贝。- 参数:
material3DPBR- PBR材质对象。
-
-
方法详细资料
-
dispose
public void dispose()
释放所占资源。- 指定者:
dispose在接口中IDisposable- 覆盖:
dispose在类中Material3D
-
clone
public Material3DPBR clone()
-
getEmissiveFactor
public double[] getEmissiveFactor()
获取控制自发光强度的因子。- 参数:
- -
-
setEmissiveFactor
public void setEmissiveFactor(double[] result)
设置控制自发光强度的因子。- 参数:
result- 设置向量的三个分量x,y,z。 result[0] = x; result[1] = y; result[2] = z;
-
getEmissiveTextureIndex
public int getEmissiveTextureIndex()
获取自发光纹理在纹理数组中的序号。- 参数:
- -
-
setEmissiveTextureIndex
public void setEmissiveTextureIndex(int result)
设置自发光纹理在纹理数组中的序号。- 参数:
result- 自发光纹理在纹理数组中的序号。
-
setEmissiveTextureCoordIndex
public void setEmissiveTextureCoordIndex(int result)
设置自发光纹理的纹理坐标在纹理坐标数组中的序号。- 参数:
result- 自发光纹理的纹理坐标在纹理坐标数组中的序号。
-
getEmissiveTextureCoordIndex
public int getEmissiveTextureCoordIndex()
获取自发光纹理的纹理坐标在纹理坐标数组中的序号。- 参数:
- -
-
getNormalTextureIndex
public int getNormalTextureIndex()
获取法线纹理在纹理数组中的序号,物体表面的凹凸细节 float格式RGB纹理。- 参数:
- -
-
setNormalTextureIndex
public void setNormalTextureIndex(int result)
设置法线纹理在纹理数组中的序号。- 参数:
result- 法线纹理在纹理数组中的序号。
-
getNormalTextureCoordIndex
public int getNormalTextureCoordIndex()
获取法线纹理的纹理坐标在纹理坐标数组中的序号。- 参数:
- -
-
setNormalTextureCoordIndex
public void setNormalTextureCoordIndex(int result)
设置法线纹理的纹理坐标在纹理坐标数组中的序号。- 参数:
result- 法线纹理的纹理坐标在纹理坐标数组中的序号。
-
getNormalTextureScale
public float getNormalTextureScale()
获取法线纹理的缩放因子。- 参数:
- -
-
setNormalTextureScale
public void setNormalTextureScale(float result)
设置法线纹理的缩放因子。- 参数:
result- 法线纹理的缩放因子
-
getOcclusionTextureIndex
public int getOcclusionTextureIndex()
获取遮挡图在纹理数组中的序号,用于物体表面凹凸性对光照的影响,比如缝隙处就暗 float灰度纹理。- 参数:
- -
-
setOcclusionTextureIndex
public void setOcclusionTextureIndex(int result)
设置遮挡图在纹理数组中的序号。- 参数:
result- 遮挡图在纹理数组中的序号。
-
getOcclusionTextureCoordIndex
public int getOcclusionTextureCoordIndex()
获取遮挡图的纹理坐标在纹理坐标数组中的序号。- 参数:
- -
-
setOcclusionTextureCoordIndex
public void setOcclusionTextureCoordIndex(int result)
设置遮挡图的纹理坐标在纹理坐标数组中的序号。- 参数:
result- 遮挡图的纹理坐标在纹理坐标数组中的序号
-
getOcclusionTextureStrength
public float getOcclusionTextureStrength()
获取遮挡图的缩放因子- 参数:
- -
-
setOcclusionTextureStrength
public void setOcclusionTextureStrength(float result)
设置遮挡图的缩放因子- 参数:
result- 遮挡图的缩放因子
-
getAlphaMode
public PBRAlphaModeType getAlphaMode()
获取UGAlphaMode枚举值- 参数:
- -
-
setAlphaMode
public void setAlphaMode(PBRAlphaModeType modeType)
设置UGAlphaMode的枚举 PBRAM_UnKnown = 0, //! \brief 片元中alpha值输出为1.0, PBRAM_OPAQUE = 1, //! \brief 片元进行alpha过滤 PBRAM_MASK = 2, //! \brief 片元的alpha值输出baseColor的alpha值 PBRAM_BLEND = 3,
-
getAlphaCutoff
public float getAlphaCutoff()
当alphaMode为Mask时,着色器根据这个值和baseColor的Alpha值进行比较决定是否丢弃- 参数:
- -
-
setAlphaCutoff
public void setAlphaCutoff(float result)
设置当alphaMode为Mask时,决定释放丢弃- 参数:
result-
-
isDoubleSided
public boolean isDoubleSided()
是否双面渲染的结果- 参数:
- -
-
setDoubleSided
public void setDoubleSided(boolean result)
设置是否双面渲染- 参数:
result- 是否双面渲染
-
getBaseColor
public double[] getBaseColor()
获取物体的基本颜色因子- 参数:
- -
-
setBaseColor
public void setBaseColor(double[] color)
设置物体的基本颜色因子.- 参数:
color- 设置三维4阶向量 RGB和透明度
-
getBaseColorTextureIndex
public int getBaseColorTextureIndex()
物体基本颜色的纹理在纹理数组中的序号.- 参数:
- -
-
setBaseColorTextureIndex
public void setBaseColorTextureIndex(int result)
设置物体基本颜色的纹理在纹理数组中的序号.- 参数:
result- 物体基本颜色的纹理在纹理数组中的序号
-
getBaseColorTextureCoordIndex
public int getBaseColorTextureCoordIndex()
获取模型基础纹理的纹理坐标序号.- 返回:
-
setBaseColorTextureCoordIndex
public void setBaseColorTextureCoordIndex(int result)
设置模型基础纹理的纹理坐标序号.- 参数:
result- 模型基础纹理的纹理坐标序号
-
getMetallicRoughnessTextureIndex
public int getMetallicRoughnessTextureIndex()
金属度和粗糙性纹理在纹理数组中的序号(R通道存储金属度,G通道存储粗糙度).- 参数:
- -
-
setMetallicRoughnessTextureIndex
public void setMetallicRoughnessTextureIndex(int result)
设置金属度和粗糙性纹理在纹理数组中的序号.- 参数:
result- 金属度和粗糙性纹理在纹理数组中的序号
-
getMetallicRoughnessTextureCoordIndex
public int getMetallicRoughnessTextureCoordIndex()
金属度和粗糙性纹理的纹理坐标在数组中的序号- 参数:
- -
-
setMetallicRoughnessTextureCoordIndex
public void setMetallicRoughnessTextureCoordIndex(int result)
设置金属度和粗糙性纹理的纹理坐标在数组中的序号.- 参数:
result- 金属度和粗糙性纹理的纹理坐标在数组中的序号
-
getMetallicFactor
public float getMetallicFactor()
控制金属性强弱的因子.- 参数:
- -
-
setMetallicFactor
public void setMetallicFactor(float result)
设置控制金属性强弱的因子.- 参数:
result- 控制金属性强弱的因子
-
getRoughnessFactor
public float getRoughnessFactor()
控制粗糙性强弱的因子- 参数:
- -
-
setRoughnessFactor
public void setRoughnessFactor(float result)
设置控制粗糙性强弱的因子。- 参数:
result- 控制粗糙性强弱的因子
-
displayExceptionMessage
public void displayExceptionMessage(long handle, String message)句柄判空公共方法- 参数:
handle- 对象句柄message- 异常信息
-
getBaseColorTextureOffsetMotionParameter
public TextureMotionParameter getBaseColorTextureOffsetMotionParameter()
获取物体的基本颜色纹理平移运动的参数,U、V方向的速度可正可负,周期需大于等于零。- 返回:
- 物体的基本颜色纹理平移运动的参数
-
setBaseColorTextureOffsetMotionParameter
public void setBaseColorTextureOffsetMotionParameter(TextureMotionParameter parameters)
设置物体的基本颜色纹理平移运动的参数,U、V方向的速度可正可负,周期需大于等于零。- 参数:
parameters- 物体的基本颜色纹理平移运动的参数
-
getBaseColorTextureTilingMotionParameter
public TextureMotionParameter getBaseColorTextureTilingMotionParameter()
获取物体的基本颜色纹理缩放运动的参数,U、V方向的速度可正可负,周期需大于等于零。- 返回:
- 物体的基本颜色纹理缩放运动的参数
-
setBaseColorTextureTilingMotionParameter
public void setBaseColorTextureTilingMotionParameter(TextureMotionParameter parameters)
设置物体的基本颜色纹理缩放运动的参数,U、V方向的速度可正可负,周期需大于等于零。- 参数:
parameters- 物体的基本颜色纹理缩放运动的参数
-
getEmissiveTextureTilingMotionParameter
public TextureMotionParameter getEmissiveTextureTilingMotionParameter()
获取自发光纹理缩放运动的参数,U、V方向的速度可正可负,周期需大于等于零。- 返回:
- 自发光纹理缩放运动的参数
-
setEmissiveTextureTilingMotionParameter
public void setEmissiveTextureTilingMotionParameter(TextureMotionParameter parameters)
设置自发光纹理缩放运动的参数,U、V方向的速度可正可负,周期需大于等于零。- 参数:
parameters- 自发光纹理缩放运动的参数
-
getEmissiveTextureOffsetMotionParameter
public TextureMotionParameter getEmissiveTextureOffsetMotionParameter()
获取自发光纹理平移运动的参数,U、V方向的速度可正可负,周期需大于等于零。- 返回:
- 自发光纹理平移运动的参数
-
setEmissiveTextureOffsetMotionParameter
public void setEmissiveTextureOffsetMotionParameter(TextureMotionParameter parameters)
设置自发光纹理平移运动的参数,U、V方向的速度可正可负,周期需大于等于零。- 参数:
parameters- 自发光纹理平移运动的参数
-
getMaskTextureIndex
public int getMaskTextureIndex()
获取掩膜纹理在纹理数组中的序号 RGB纹理
-
setMaskTextureIndex
public void setMaskTextureIndex(int maskTextureIndex)
新设置掩膜纹理在纹理数组中的序号 RGB纹理
-
getMaskTextureCoordIndex
public int getMaskTextureCoordIndex()
获取掩膜纹理的纹理坐标在纹理坐标数组中的序号
-
setMaskTextureCoordIndex
public void setMaskTextureCoordIndex(int maskTextureIndex)
设置掩膜纹理的纹理坐标在纹理坐标数组中的序号
-
-
Copyright © 2021–2025 SuperMap. All rights reserved.