BenQ Mobile

javax.microedition.m3g
Class Material

java.lang.Object
  extended byjavax.microedition.m3g.Object3D
      extended byjavax.microedition.m3g.Material

public class Material
extends Object3D

An Appearance component encapsulating material attributes for lighting computations. Other attributes required for lighting are defined in Light, PolygonMode and VertexBuffer.


Field Summary
static int AMBIENT
          A parameter to setColor and getColor, specifying that the ambient color component is to be set or retrieved.
static int DIFFUSE
          A parameter to setColor and getColor, specifying that the diffuse color component is to be set or retrieved.
static int EMISSIVE
          A parameter to setColor and getColor, specifying that the emissive color component is to be set or retrieved.
static int SPECULAR
          A parameter to setColor and getColor, specifying that the specular color component is to be set or retrieved.
 
Constructor Summary
Material()
          Creates a Material object with default values.
 
Method Summary
 int getColor(int target)
          Gets the value of the specified color component of this Material.
 float getShininess()
          Gets the current shininess of this Material.
 boolean isVertexColorTrackingEnabled()
          Queries whether vertex color tracking is enabled.
 void setColor(int target, int ARGB)
          Sets the given value to the specified color component(s) of this Material.
 void setShininess(float shininess)
          Sets the shininess of this Material.
 void setVertexColorTrackingEnable(boolean enable)
          Enables or disables vertex color tracking.
 
Methods inherited from class javax.microedition.m3g.Object3D
addAnimationTrack, animate, duplicate, find, getAnimationTrack, getAnimationTrackCount, getReferences, getUserID, getUserObject, removeAnimationTrack, setUserID, setUserObject
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AMBIENT

public static final int AMBIENT
A parameter to setColor and getColor, specifying that the ambient color component is to be set or retrieved.

See Also:
Constant Field Values

DIFFUSE

public static final int DIFFUSE
A parameter to setColor and getColor, specifying that the diffuse color component is to be set or retrieved.

See Also:
Constant Field Values

EMISSIVE

public static final int EMISSIVE
A parameter to setColor and getColor, specifying that the emissive color component is to be set or retrieved.

See Also:
Constant Field Values

SPECULAR

public static final int SPECULAR
A parameter to setColor and getColor, specifying that the specular color component is to be set or retrieved.

See Also:
Constant Field Values
Constructor Detail

Material

public Material()
Creates a Material object with default values.

Method Detail

setColor

public void setColor(int target,
                     int ARGB)
Sets the given value to the specified color component(s) of this Material.


getColor

public int getColor(int target)
Gets the value of the specified color component of this Material.


setShininess

public void setShininess(float shininess)
Sets the shininess of this Material.


getShininess

public float getShininess()
Gets the current shininess of this Material.


setVertexColorTrackingEnable

public void setVertexColorTrackingEnable(boolean enable)
Enables or disables vertex color tracking.


isVertexColorTrackingEnabled

public boolean isVertexColorTrackingEnabled()
Queries whether vertex color tracking is enabled.


BenQ Mobile

Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner.
All Rights Reserved.
BenQ Corp. is a trademark licensee of Siemens AG.


For further information about Mobility Toolkit (MTK) visit our Developer Portal.