hmi.graphics.collada.scenegraph
Class MaterialTranslator
java.lang.Object
hmi.graphics.collada.scenegraph.MaterialTranslator
public final class MaterialTranslator
- extends Object
Translates Collada materials and effects
- Author:
- Job Zwiers
|
Method Summary |
static Map<String,ParamValue> |
addNewparams(Map<String,ParamValue> map,
List<Newparam> params)
|
static Map<String,ParamValue> |
applySetparams(Map<String,ParamValue> paramMap,
List<Setparam> setParams)
|
static String |
colladaWrapTypeToGTextureWrapType(String colladaWrapType)
Converts a Collada texture wrap type to an OpenGL style wrap type. |
private static String |
convertShaderType(FixedFunctionShader.ShaderType type,
String[] texCoordChannels,
Map<String,String> bindings,
InstanceMaterial im)
|
private static Map<String,String> |
fixedFunctionShaderSetting(Collada collada,
FixedFunctionShader shader,
Map<String,ParamValue> paramMap,
InstanceMaterial im,
GMaterial gmaterial)
create gmaterial settings from the specified shader, using possible parameter setting. |
private static GTexture |
getGTexture(Collada collada,
CommonTexture texture,
Map<String,ParamValue> paramMap)
|
static Map<String,ParamValue> |
getSetparamMap(List<Setparam> params)
|
static MaterialTranslator.GMaterialPlusChannelBindings |
materialToGMaterial(Collada collada,
Material material,
InstanceMaterial im)
|
static MaterialTranslator.GMaterialPlusChannelBindings |
primitiveToGMaterial(Collada collada,
PrimitiveMeshElement prim,
BindMaterial bindMaterial)
Returns a GMaterial object for the specified material id, combined with channel bindings |
private static void |
setMayaProfileSettings(MayaProfile mayaProfile,
GTexture gtex)
|
private static String |
translateChannelToTEXCOORD(String channel,
InstanceMaterial im)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WRAPTYPE_CONVERSION
private static final Map<String,String> WRAPTYPE_CONVERSION
MaterialTranslator
private MaterialTranslator()
primitiveToGMaterial
public static MaterialTranslator.GMaterialPlusChannelBindings primitiveToGMaterial(Collada collada,
PrimitiveMeshElement prim,
BindMaterial bindMaterial)
- Returns a GMaterial object for the specified material id, combined with channel bindings
getSetparamMap
public static Map<String,ParamValue> getSetparamMap(List<Setparam> params)
addNewparams
public static Map<String,ParamValue> addNewparams(Map<String,ParamValue> map,
List<Newparam> params)
applySetparams
public static Map<String,ParamValue> applySetparams(Map<String,ParamValue> paramMap,
List<Setparam> setParams)
materialToGMaterial
public static MaterialTranslator.GMaterialPlusChannelBindings materialToGMaterial(Collada collada,
Material material,
InstanceMaterial im)
colladaWrapTypeToGTextureWrapType
public static String colladaWrapTypeToGTextureWrapType(String colladaWrapType)
- Converts a Collada texture wrap type to an OpenGL style wrap type.
translateChannelToTEXCOORD
private static String translateChannelToTEXCOORD(String channel,
InstanceMaterial im)
fixedFunctionShaderSetting
private static Map<String,String> fixedFunctionShaderSetting(Collada collada,
FixedFunctionShader shader,
Map<String,ParamValue> paramMap,
InstanceMaterial im,
GMaterial gmaterial)
- create gmaterial settings from the specified shader, using possible parameter setting. Store the result in gmaterial.
getGTexture
private static GTexture getGTexture(Collada collada,
CommonTexture texture,
Map<String,ParamValue> paramMap)
setMayaProfileSettings
private static void setMayaProfileSettings(MayaProfile mayaProfile,
GTexture gtex)
convertShaderType
private static String convertShaderType(FixedFunctionShader.ShaderType type,
String[] texCoordChannels,
Map<String,String> bindings,
InstanceMaterial im)