crystalspace.jbind.impl.engine.texture
Class csTextureWrapper

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.engine.texture.csTextureWrapper
All Implemented Interfaces:
iBase, iPointer, iTextureWrapper

public class csTextureWrapper
extends csBase
implements iTextureWrapper

Author:
qan To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csTextureWrapper(iPointer nPointer)
           
 
Method Summary
 iTextureWrapper Clone()
          Create a clone this texture wrapper, using the same texture handle.
 int getFlags()
          Return the flags which are used to register the texture.
 iImage getImageFile()
          Get the iImage.
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 int[] getKeyColor()
          Query the transparent color.
 java.lang.String getName()
          Return the name of the interface
 iTextureHandle getTextureHandle()
          Get the texture handle.
 iTextureCallback getUseCallback()
          Get the use callback.
 int getVersion()
          Return the version of the interface
static void initSCF()
           
protected  boolean isNativePointerValidSafe()
           
 boolean isVisitRequired()
          Return true if it is needed to call Visit();.
 boolean keepImage()
          If this flag is true then the image will be kept even after calling Register.
 iObject queryObject()
          Get the iObject for this texture.
 void register(iTextureManager txtmng)
          Register the texture with the texture manager.
 void setFlags(int flags)
          Set the flags which are used to register the texture.
 void setImageFile(iImage Image)
          Change the base iImage.
 void setKeepImage(boolean k)
          Set the keep image flag.
 void setKeyColor(int red, int green, int blue)
          Set the transparent color.
 void setTextureHandle(iTextureHandle tex)
          Change the texture handle.
 void setUseCallback(iTextureCallback callback)
          Set a callback which is called just before the texture is used.
 void visit()
          Visit this texture.
 
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, isNativePointerValidSafe, 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

csTextureWrapper

public csTextureWrapper(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

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

initSCF

public static void initSCF()

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe()

Clone

public iTextureWrapper Clone()
Description copied from interface: iTextureWrapper
Create a clone this texture wrapper, using the same texture handle.

Specified by:
Clone in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.Clone()

getFlags

public int getFlags()
Description copied from interface: iTextureWrapper
Return the flags which are used to register the texture.

Specified by:
getFlags in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.getFlags()

getImageFile

public iImage getImageFile()
Description copied from interface: iTextureWrapper
Get the iImage.

Specified by:
getImageFile in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.getImageFile()

getKeyColor

public int[] getKeyColor()
Description copied from interface: iTextureWrapper
Query the transparent color.

Specified by:
getKeyColor in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.getKeyColor()

getTextureHandle

public iTextureHandle getTextureHandle()
Description copied from interface: iTextureWrapper
Get the texture handle. Referenced by csShaderVariable::SetValue();.

Specified by:
getTextureHandle in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.getTextureHandle()

getUseCallback

public iTextureCallback getUseCallback()
Description copied from interface: iTextureWrapper
Get the use callback. If there are multiple use callbacks you can use this function to chain.

Specified by:
getUseCallback in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.getUseCallback()

isVisitRequired

public boolean isVisitRequired()
Description copied from interface: iTextureWrapper
Return true if it is needed to call Visit();.

Specified by:
isVisitRequired in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.isVisitRequired()

keepImage

public boolean keepImage()
Description copied from interface: iTextureWrapper
If this flag is true then the image will be kept even after calling Register. If this flag is false then Register(); will remove the image pointer from this texture wrapper. False by default.

Specified by:
keepImage in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.keepImage()

queryObject

public iObject queryObject()
Description copied from interface: iTextureWrapper
Get the iObject for this texture.

Specified by:
queryObject in interface iTextureWrapper
Returns:
See Also:
iTextureWrapper.queryObject()

register

public void register(iTextureManager txtmng)
Description copied from interface: iTextureWrapper
Register the texture with the texture manager.

Specified by:
register in interface iTextureWrapper
Parameters:
txtmng -
See Also:
iTextureWrapper.register(crystalspace.jbind.interfaces.ivideo.txtmgr.iTextureManager)

setFlags

public void setFlags(int flags)
Description copied from interface: iTextureWrapper
Set the flags which are used to register the texture.

Specified by:
setFlags in interface iTextureWrapper
Parameters:
flags -
See Also:
iTextureWrapper.setFlags(int)

setImageFile

public void setImageFile(iImage Image)
Description copied from interface: iTextureWrapper
Change the base iImage. The changes will not be visible until the texture is registered again.

Specified by:
setImageFile in interface iTextureWrapper
Parameters:
Image -
See Also:
iTextureWrapper.setImageFile(crystalspace.jbind.interfaces.igraphic.image.iImage)

setKeepImage

public void setKeepImage(boolean k)
Description copied from interface: iTextureWrapper
Set the keep image flag. See KeepImage(); function for explanation.

Specified by:
setKeepImage in interface iTextureWrapper
Parameters:
k -
See Also:
iTextureWrapper.setKeepImage(boolean)

setKeyColor

public void setKeyColor(int red,
                        int green,
                        int blue)
Description copied from interface: iTextureWrapper
Set the transparent color.

Specified by:
setKeyColor in interface iTextureWrapper
Parameters:
red -
green -
blue -
See Also:
iTextureWrapper.setKeyColor(int, int, int)

setTextureHandle

public void setTextureHandle(iTextureHandle tex)
Description copied from interface: iTextureWrapper
Change the texture handle. The changes will immediatly be visible. This will also change the key color and registration flags to those of the new texture and the iImage to 0.

Specified by:
setTextureHandle in interface iTextureWrapper
Parameters:
tex -
See Also:
iTextureWrapper.setTextureHandle(crystalspace.jbind.interfaces.ivideo.texture.iTextureHandle)

setUseCallback

public void setUseCallback(iTextureCallback callback)
Description copied from interface: iTextureWrapper
Set a callback which is called just before the texture is used. This is mainly useful for procedural textures which can then choose to update their image.

Specified by:
setUseCallback in interface iTextureWrapper
Parameters:
callback -
See Also:
iTextureWrapper.setUseCallback(crystalspace.jbind.interfaces.iengine.texture.iTextureCallback)

visit

public void visit()
Description copied from interface: iTextureWrapper
Visit this texture. This should be called by the engine right before using the texture. It is responsible for calling the use callback if there is one.

Specified by:
visit in interface iTextureWrapper
See Also:
iTextureWrapper.visit()