com.mascotcapsule.micro3d.v3
Class Effect3D

java.lang.Object
  extended bycom.mascotcapsule.micro3d.v3.Effect3D

public class Effect3D
extends java.lang.Object

This class maintains rendering effect data. It maintains the status of light data, shading type and semitransparent function use.


Field Summary
static int NORMAL_SHADING
          The shading type that indicates normal shading.
static int TOON_SHADING
          The shading type that indicates toon shading.
 
Constructor Summary
Effect3D()
          Generates the rendering data object.
Effect3D(Light light, int shading, boolean isEnableTrans, Texture tex)
          Generates the rendering data object.
 
Method Summary
 Light getLight()
          Gets the light data settings.
 int getShading()
          Deprecated. Method to be eliminated in the near future.
 int getShadingType()
          Gets the shading type settings.
 Texture getSphereMap()
          Deprecated. Method to be eliminated in the near future.
 Texture getSphereTexture()
          Gets the texture settings for the environment mapping.
 int getThreshold()
          Deprecated. Method to be eliminated in the near future.
 int getThresholdHigh()
          Deprecated. Method to be eliminated in the near future.
 int getThresholdLow()
          Deprecated. Method to be eliminated in the near future.
 int getToonHigh()
          Gets the toon shading settings of the "RGB setting when the level is above the threshold value."
 int getToonLow()
          Gets the toon shading settings of the "RGB settings when the level is below the threshold value."
 int getToonThreshold()
          Gets the toon shading threshold value settings.
 boolean isSemiTransparentEnabled()
          Deprecated. Method to be eliminated in the near future.
 boolean isTransparency()
          Gets the status settings for semitransparent function.
 void setLight(Light light)
          Sets the light data.
 void setSemiTransparentEnabled(boolean isEnable)
          Deprecated. Method to be eliminated in the near future.
 void setShading(int shading)
          Deprecated. Method to be eliminated in the near future.
 void setShadingType(int shading)
          Sets the shading type.
 void setSphereMap(Texture tex)
          Deprecated. Method to be eliminated in the near future.
 void setSphereTexture(Texture tex)
          Sets the texture for environment mapping.
 void setThreshold(int threshold, int high, int low)
          Deprecated. Method to be eliminated in the near future.
 void setToonParams(int threshold, int high, int low)
          Sets the level of the toon shading threshold value.
 void setTransparency(boolean isEnable)
          Sets the status of the semitransparent function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL_SHADING

public static final int NORMAL_SHADING
The shading type that indicates normal shading.

See Also:
Constant Field Values

TOON_SHADING

public static final int TOON_SHADING
The shading type that indicates toon shading.

See Also:
Constant Field Values
Constructor Detail

Effect3D

public Effect3D()
Generates the rendering data object. The status is set to no light, NORMAL_SHADING?Asemitransparent function enabled, and no environment texture.


Effect3D

public Effect3D(Light light,
                int shading,
                boolean isEnableTrans,
                Texture tex)
Generates the rendering data object.

Parameters:
light - Light data (if null, no light data used)
shading - Shading type
isEnableTrans - True if semitransparent is used
tex - Environment texture (if null, will not be used)
Throws:
java.lang.IllegalArgumentException - When the argument shading is false. Or, when the texture tex is not for environment mapping (but for the model).
Method Detail

getLight

public final Light getLight()
Gets the light data settings.

Returns:
Light data. If no setting, returns a null.

setLight

public final void setLight(Light light)
Sets the light data.

Parameters:
light - Light data. Provides a null if light data is not used.

getShading

public final int getShading()
Deprecated. Method to be eliminated in the near future.

See Also:
getShadingType()

getShadingType

public final int getShadingType()
Gets the shading type settings.

Returns:
Shading type

setShading

public final void setShading(int shading)
Deprecated. Method to be eliminated in the near future.

See Also:
setShadingType(int)

setShadingType

public final void setShadingType(int shading)
Sets the shading type.

Parameters:
shading - Shading type
Throws:
java.lang.IllegalArgumentException - When argument shading is false.

getThreshold

public final int getThreshold()
Deprecated. Method to be eliminated in the near future.

See Also:
getToonThreshold()

getToonThreshold

public final int getToonThreshold()
Gets the toon shading threshold value settings.

Returns:
Toon shading threshold value(0?`255)

getThresholdHigh

public final int getThresholdHigh()
Deprecated. Method to be eliminated in the near future.

See Also:
getToonHigh()

getToonHigh

public final int getToonHigh()
Gets the toon shading settings of the "RGB setting when the level is above the threshold value."

Returns:
RGB setting (0?`255) when the level is above the threshold value

getThresholdLow

public final int getThresholdLow()
Deprecated. Method to be eliminated in the near future.

See Also:
getToonLow()

getToonLow

public final int getToonLow()
Gets the toon shading settings of the "RGB settings when the level is below the threshold value."

Returns:
RGB setting (0?`255) when the level is below the threshold value

setThreshold

public final void setThreshold(int threshold,
                               int high,
                               int low)
Deprecated. Method to be eliminated in the near future.

See Also:
setToonParams(int, int, int)

setToonParams

public final void setToonParams(int threshold,
                                int high,
                                int low)
Sets the level of the toon shading threshold value.

Parameters:
threshold - Threshold level(0?`255)
high - RGB setting (0?`255, 255 is 100%) when level is above threshold
low - RGB setting (0?`255, 255 is 100%) when level is below threshold
Throws:
java.lang.IllegalArgumentException - When an argument is a value outside its limits.

isSemiTransparentEnabled

public final boolean isSemiTransparentEnabled()
Deprecated. Method to be eliminated in the near future.

See Also:
getShadingType()

isTransparency

public final boolean isTransparency()
Gets the status settings for semitransparent function.

Returns:
Is the semitransparent function enabled? (Enabled if true)

setSemiTransparentEnabled

public final void setSemiTransparentEnabled(boolean isEnable)
Deprecated. Method to be eliminated in the near future.

See Also:
setTransparency(boolean)

setTransparency

public final void setTransparency(boolean isEnable)
Sets the status of the semitransparent function.

Parameters:
isEnable - Is semitransparent function enabled? (Enabled if true)

getSphereMap

public final Texture getSphereMap()
Deprecated. Method to be eliminated in the near future.

See Also:
getSphereTexture()

getSphereTexture

public final Texture getSphereTexture()
Gets the texture settings for the environment mapping.

Returns:
Texture for environment mapping (null if no settings)

setSphereMap

public final void setSphereMap(Texture tex)
Deprecated. Method to be eliminated in the near future.

See Also:
setSphereTexture(com.mascotcapsule.micro3d.v3.Texture)

setSphereTexture

public final void setSphereTexture(Texture tex)
Sets the texture for environment mapping.

Parameters:
tex - Texture for environment mapping (null if no settings)
Throws:
java.lang.IllegalArgumentException - When the texture tex is not for environment mapping (but for the model).