Package com.ms.com.directX |
![]() Previous |
![]() Microsoft Packages |
![]() Index |
![]() Next |
Applications use the methods of the d3drmMaterial class to interact with material objects.
public class d3drmMaterial implements Id3drmMaterial { public void InternalSetObject(IUnknown lpdd); public IUnknown InternalGetObject(); public void AddDestroyCallback(Id3drmCallback fn, IUnknown Arg); public void DeleteDestroyCallback(Id3drmCallback fn, IUnknown args); public d3drmMaterial Clone(); public void SetAppData(int data); public int GetAppData(); public void SetName(String name); public String GetName(); public String GetClassName(); public void SetPower(float power); public void SetSpecular(float r, float g, float b); public void SetEmissive(float r, float g, float b); public float GetPower(); public void GetSpecular(float[] r, float[] g, float[] b); public void GetEmissive(float[] r, float[] g, float[] b); }
The methods can be organized into the following groups:
Emission | GetEmissive |
SetEmissive | |
Power for specular exponent | GetPower |
SetPower | |
Specular | GetSpecular |
SetSpecular |
In addition, the d3drmMaterial class inherits the following methods from the d3drmObject class:
AddDestroyCallback |
Clone |
DeleteDestroyCallback |
GetAppData |
GetClassName |
GetName |
SetAppData |
SetName |
The d3drmMaterial object is obtained by calling the CreateMaterial method.
public void GetEmissive(float[] r, float[] g, float[] b);Retrieves the setting for the emissive property of a material. The setting of this property is the color and intensity of the light the object emits.
Return Value:
No return value.
Parameter Description r, g, and b Array variables that receive the red, green, and blue components of the emissive color. See Also: SetEmissive
public float GetPower();Retrieves the power used for the specular exponent in the given material.
Return Value:
Returns the value specifying the power of the specular exponent.
See Also: SetPower
public void GetSpecular(float[] r, float[] g, float[] b);Retrieves the color of the specular highlights of a material.
Return Value:
No return value.
Parameter Description r, g, and b Array variables that receive the red, green, and blue components of the color of the specular highlights when the method returns. See Also: SetSpecular
public void SetEmissive(float r, float g, float b);Sets the emissive property of a material.
Return Value:
No return value.
Parameter Description r, g, and b Red, green, and blue components of the emissive color. See Also: GetEmissive
public void SetPower(float power);Sets the power used for the specular exponent in a material.
Return Value:
No return value.
Parameter Description power New specular exponent. See Also: GetPower
public void SetSpecular(float r, float g, float b);Sets the color of the specular highlights for a material.
Return Value:
No return value.
Parameter Description r, g, and b Red, green, and blue components of the color of the specular highlights. See Also: GetSpecular