Packages
 In this topic

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.directX   Previous This
Package
Next

 


Class Direct3dRMMaterial

public class Direct3dRMMaterial implements IDirect3dRMMaterial
{
  // Methods
  public void getEmissive(float[] r, float[] g, float[] b);
  public float getPower();
  public void getSpecular(float[] r, float[] g, float[] b);
  public void setEmissive(float r, float g, float b);
  public void setPower(float power);
  public void setSpecular(float r, float g, float b);
}

Applications use the methods of the Direct3dRMMaterial class to interact with material objects.

The Direct3dRMMaterial class inherits the following methods from the Direct3dRMObject class:

addDestroyCallback
duplicate
deleteDestroyCallback
getAppData
getClassName
getName
setAppData
setName

The Direct3dRMMaterial object is obtained by calling the createMaterial method.

Methods

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 that the object emits.

Return Value:

No return value.

ParameterDescription
r The array variables that receive the red component of the emissive color.
g The array variables that receive the green component of the emissive color.
b The array variables that receive the blue component 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 The array variables that receive the red component of the color of the specular highlights when the method returns.
g The array variables that receive the green component of the color of the specular highlights when the method returns.
b The array variables that receive the blue component 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 The red component of the emissive color.
g The green component of the emissive color.
b The blue component 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 The new specular exponent.

See Also: getPower

setSpecular

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

Sets the color of the specular highlights of a material.

Return Value:

No return value.

ParameterDescription
r The red component of the specular highlight color.
g The green component of the specular highlight color.
b The blue component of the specular highlight color.

See Also: getSpecular

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.