crystalspace.jbind.impl.video.material
Class csMaterialHandle

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.video.material.csMaterialHandle
All Implemented Interfaces:
iBase, iMaterialHandle, iPointer

public class csMaterialHandle
extends csBase
implements iMaterialHandle

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csMaterialHandle(iPointer nPointer)
           
 
Method Summary
 void getFlatColor(csRGBpixel oColor)
          Get the flat color.
 java.lang.String getName()
          Return the name of the interface
 float[] getReflection()
          Get light reflection parameters for this material.
 iShader getShader(int type)
          Get shader associated with a shader type.
 iTextureHandle getTexture()
          Get a texture from the material.
 int getVersion()
          Return the version of the interface
protected  boolean isNativePointerValidSafe(long pointer)
           
 void prepare()
          Prepare this material.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csMaterialHandle

public csMaterialHandle(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase
See Also:
iBase.getVersion()

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase
See Also:
iBase.getName()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
csNativeObject.isNativePointerValidSafe(long)

getFlatColor

public void getFlatColor(csRGBpixel oColor)
Description copied from interface: iMaterialHandle
Get the flat color. If the material has a texture assigned, this will return the mean texture color.

Specified by:
getFlatColor in interface iMaterialHandle
Parameters:
oColor -
See Also:
iMaterialHandle.getFlatColor(crystalspace.jbind.impl.csgfx.rgbpixel.csRGBpixel)

getReflection

public float[] getReflection()
Description copied from interface: iMaterialHandle
Get light reflection parameters for this material.

Specified by:
getReflection in interface iMaterialHandle
Returns:
See Also:
iMaterialHandle.getReflection()

getShader

public iShader getShader(int type)
Description copied from interface: iMaterialHandle
Get shader associated with a shader type.

Specified by:
getShader in interface iMaterialHandle
Parameters:
type -
Returns:
See Also:
iMaterialHandle.getShader(int)

getTexture

public iTextureHandle getTexture()
Description copied from interface: iMaterialHandle
Get a texture from the material.

Specified by:
getTexture in interface iMaterialHandle
Returns:
See Also:
iMaterialHandle.getTexture()

prepare

public void prepare()
Description copied from interface: iMaterialHandle
Prepare this material. The material wrapper (remembered during RegisterMaterial();); is queried again for material parameters and a new material descriptor (internal to the texture manager); is associated with given material handle.

Specified by:
prepare in interface iMaterialHandle
See Also:
iMaterialHandle.prepare()