Package com.ms.com.directX Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class d3drmMaterial

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.

GetEmissive

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.

ParameterDescription
r, g, and b Array variables that receive the red, green, and blue components of the emissive color.

See Also: SetEmissive


GetPower

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


GetSpecular

public void GetSpecular(float[] r, float[] g, float[] b);

Retrieves the color of the specular highlights of a material.

Return Value:

No return value.

ParameterDescription
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


SetEmissive

public void SetEmissive(float r, float g, float b);

Sets the emissive property of a material.

Return Value:

No return value.

ParameterDescription
r, g, and b Red, green, and blue components of the emissive color.

See Also: GetEmissive


SetPower

public void SetPower(float power);

Sets the power used for the specular exponent in a material.

Return Value:

No return value.

ParameterDescription
power New specular exponent.

See Also: GetPower


SetSpecular

public void SetSpecular(float r, float g, float b);

Sets the color of the specular highlights for a material.

Return Value:

No return value.

ParameterDescription
r, g, and b Red, green, and blue components of the color of the specular highlights.

See Also: GetSpecular



Top© 1996 Microsoft Corporation. All rights reserved.