gestalt.shape
Class Material

java.lang.Object
  extended by gestalt.shape.Material
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
JoglMaterial

public class Material
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 Color ambient
           
 int blendmode
           
 Color color
           
 boolean depthmask
           
 boolean depthtest
           
 Color diffuse
           
 boolean disableTextureCoordinates
           
 Color emission
           
 boolean enabled
           
 boolean ignoreplugins
           
 boolean lit
           
static int NORMALIZE_MODE
           
 boolean normalizenormals
           
 float shininess
           
 boolean smoothshading
           
 Color specular
           
 boolean transparent
           
static boolean VERBOSE
           
 boolean wireframe
           
 
Constructor Summary
Material()
           
 
Method Summary
 void addPlugin(MaterialPlugin thePlugin)
           
 TexturePlugin addTexture()
           
 void addTexture(TexturePlugin theTexture)
          this method does essentially the same as 'addPlugin'.
 void begin(GLContext theRenderContext)
           
 TexturePlugin createTexture(Bitmap theBitmap)
           
 void end(GLContext theRenderContext)
           
 Color getColor()
           
 java.util.Vector<MaterialPlugin> plugins()
           
 boolean removePlugin(MaterialPlugin thePlugin)
           
 boolean removeTexture()
          this method does essentially the same as 'removePlugin'.
 boolean replacePlugin(MaterialPlugin theOldPlugin, MaterialPlugin theNewPlugin)
           
 void replaceTexture(TexturePlugin theTexture)
           
 void setCustomBlendFunction(int theSource, int theDestination)
          used in conjunction with blendmode 'MATERIAL_BLEND_CUSTOM'
 TexturePlugin texture()
          search for the texture plugin in the plugins container.
returns 'null' if no texture plugin is available.
it is adviced to get the texture once and than cache the reference, as each call to this method invokes a search through the plugin container.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMALIZE_MODE

public static final int NORMALIZE_MODE
See Also:
Constant Field Values

VERBOSE

public static boolean VERBOSE

enabled

public boolean enabled

color

public Color color

wireframe

public boolean wireframe
To do:
maybe move this to texture.

blendmode

public int blendmode

depthtest

public boolean depthtest

depthmask

public boolean depthmask

transparent

public boolean transparent

smoothshading

public boolean smoothshading

normalizenormals

public boolean normalizenormals

disableTextureCoordinates

public boolean disableTextureCoordinates

ambient

public Color ambient

diffuse

public Color diffuse

specular

public Color specular

emission

public Color emission

shininess

public float shininess

lit

public boolean lit

ignoreplugins

public boolean ignoreplugins
Constructor Detail

Material

public Material()
Method Detail

plugins

public java.util.Vector<MaterialPlugin> plugins()

getColor

public Color getColor()

begin

public void begin(GLContext theRenderContext)

end

public void end(GLContext theRenderContext)

texture

public TexturePlugin texture()
search for the texture plugin in the plugins container.
returns 'null' if no texture plugin is available.
it is adviced to get the texture once and than cache the reference, as each call to this method invokes a search through the plugin container.
 TexturePlugin myTexture = myShape.material.texture();
 myTexture.load(...
 

Returns:
TexturePlugin

addTexture

public void addTexture(TexturePlugin theTexture)
this method does essentially the same as 'addPlugin'. it is just there for semantic reasons.

Parameters:
theTexture - TexturePlugin

removeTexture

public boolean removeTexture()
this method does essentially the same as 'removePlugin'. it is just there for semantic reasons.


replaceTexture

public void replaceTexture(TexturePlugin theTexture)
Parameters:
theTexture - TexturePlugin

createTexture

public TexturePlugin createTexture(Bitmap theBitmap)
Parameters:
theBitmap - Bitmap
Returns:
TexturePlugin

addTexture

public TexturePlugin addTexture()
Returns:
TexturePlugin

setCustomBlendFunction

public void setCustomBlendFunction(int theSource,
                                   int theDestination)
used in conjunction with blendmode 'MATERIAL_BLEND_CUSTOM'

Parameters:
theSource - int
theDestination - int

addPlugin

public void addPlugin(MaterialPlugin thePlugin)

replacePlugin

public boolean replacePlugin(MaterialPlugin theOldPlugin,
                             MaterialPlugin theNewPlugin)

removePlugin

public boolean removePlugin(MaterialPlugin thePlugin)


processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009