org.xith3d.effects.bumpmapping
Class AssemblyBumpMappingFactory

java.lang.Object
  extended by org.xith3d.effects.bumpmapping.BumpMappingFactory
      extended by org.xith3d.effects.bumpmapping.AssemblyBumpMappingFactory

public class AssemblyBumpMappingFactory
extends BumpMappingFactory

The BumpmappingFactory is capable of preparing a Shape3D for Bumpmapping. the underlying methods to calculate tangets/bitangets and to load the appropriate shaders are also public to use them for different perposes.


Constructor Summary
AssemblyBumpMappingFactory()
           
 
Method Summary
 AssemblyFragmentShader getFragmentProgram()
           
 AssemblyVertexShader getVertexProgram()
           
 void prepareForBumpMapping(Shape3D shape, Texture normalMapTex)
          Prepares the given Shape3D for BumpMapping.
 
Methods inherited from class org.xith3d.effects.bumpmapping.BumpMappingFactory
getBiTangentsTextureUnit, getBiTangentsVertexAttribute, getLight, getNormalMapTextureUnit, getStoreIndex1, getStoreIndex2, getTangentsFactory, getTangentsStoreMode, getTangentsTextureUnit, getTangentsVertexAttribute, loadNormalMap, prepareForBumpMapping, setBiTangentsTextureUnit, setBiTangentsVertexAttribute, setLight, setNormalMapTextureUnit, setTangentsStoreMode, setTangentsTextureUnit, setTangentsVertexAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssemblyBumpMappingFactory

public AssemblyBumpMappingFactory()
Method Detail

getVertexProgram

public AssemblyVertexShader getVertexProgram()
                                      throws java.io.IOException
Returns:
the (cached) VertexProgram that calculates bumpmapping.
Throws:
java.io.IOException

getFragmentProgram

public AssemblyFragmentShader getFragmentProgram()
                                          throws java.io.IOException
Returns:
the (cached) FragmentProgram that calculates bumpmapping.
Throws:
java.io.IOException

prepareForBumpMapping

public void prepareForBumpMapping(Shape3D shape,
                                  Texture normalMapTex)
                           throws java.io.IOException
Prepares the given Shape3D for BumpMapping.
This calculates the tangets and bitangets and stores them in the texture units 1 and 2.
It also attaches a vertex- and fragment shader to calculate bumpmapping.

Specified by:
prepareForBumpMapping in class BumpMappingFactory
Throws:
java.io.IOException