crystalspace.jbind.impl.mesh.lighting
Class csLightingInfo

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.mesh.lighting.csLightingInfo
All Implemented Interfaces:
iBase, iLightingInfo, iPointer

public class csLightingInfo
extends csBase
implements iLightingInfo

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csLightingInfo(iPointer nPointer)
           
 
Method Summary
 csColor getDynamicAmbientLight()
          Get dynamic ambient light.
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
 void initializeDefault(boolean clear)
          Initialize the lighting information to some default (mostly black);.
protected  boolean isNativePointerValidSafe(long pointer)
           
 void lightChanged(iLight light)
          Indicate that some light has changed.
 void lightDisconnect(iLight light)
          Indicate that some light no longer affects this mesh.
 void prepareLighting()
          Finally prepare the lighting for use.
 boolean readFromCache(iCacheManager cache_mgr)
          Read the lighting information from the cache.
 void setDynamicAmbientLight(csColor color)
          Sets dynamic ambient light for this object.
 boolean writeToCache(iCacheManager cache_mgr)
          Write the lighting information to the cache.
 
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

csLightingInfo

public csLightingInfo(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)

getDynamicAmbientLight

public csColor getDynamicAmbientLight()
Description copied from interface: iLightingInfo
Get dynamic ambient light. Implemented in csBezierMesh::LightingInfo, and csThing::LightingInfo.

Specified by:
getDynamicAmbientLight in interface iLightingInfo
Returns:
See Also:
iLightingInfo.getDynamicAmbientLight()

initializeDefault

public void initializeDefault(boolean clear)
Description copied from interface: iLightingInfo
Initialize the lighting information to some default (mostly black);. If clear is true then the lighting is really cleared to black. Otherwise the lighting system is just warned that lighting information is going to be added. This is useful in case a single light is added. Implemented in csBezierMesh::LightingInfo, and csThing::LightingInfo.

Specified by:
initializeDefault in interface iLightingInfo
Parameters:
clear -
See Also:
iLightingInfo.initializeDefault(boolean)

lightChanged

public void lightChanged(iLight light)
Description copied from interface: iLightingInfo
Indicate that some light has changed. This function will be called by the lighting system whenever a light that affects this mesh is changed in some way. Implemented in csBezierMesh::LightingInfo, and csThing::LightingInfo.

Specified by:
lightChanged in interface iLightingInfo
Parameters:
light -
See Also:
iLightingInfo.lightChanged(crystalspace.jbind.interfaces.iengine.light.iLight)

lightDisconnect

public void lightDisconnect(iLight light)
Description copied from interface: iLightingInfo
Indicate that some light no longer affects this mesh. Implemented in csBezierMesh::LightingInfo, and csThing::LightingInfo.

Specified by:
lightDisconnect in interface iLightingInfo
Parameters:
light -
See Also:
iLightingInfo.lightDisconnect(crystalspace.jbind.interfaces.iengine.light.iLight)

prepareLighting

public void prepareLighting()
Description copied from interface: iLightingInfo
Finally prepare the lighting for use. This function must be called last. Implemented in csBezierMesh::LightingInfo, and csThing::LightingInfo.

Specified by:
prepareLighting in interface iLightingInfo
See Also:
iLightingInfo.prepareLighting()

readFromCache

public boolean readFromCache(iCacheManager cache_mgr)
Description copied from interface: iLightingInfo
Read the lighting information from the cache. Call this instead of InitializeDefault();. Returns false if there was a problem. This function will read the data from the current VFS dir. Implemented in csBezierMesh::LightingInfo, and csThing::LightingInfo.

Specified by:
readFromCache in interface iLightingInfo
Parameters:
cache_mgr -
Returns:
See Also:
iLightingInfo.readFromCache(crystalspace.jbind.interfaces.iutil.cache.iCacheManager)

setDynamicAmbientLight

public void setDynamicAmbientLight(csColor color)
Description copied from interface: iLightingInfo
Sets dynamic ambient light for this object. Implemented in csBezierMesh::LightingInfo, and csThing::LightingInfo.

Specified by:
setDynamicAmbientLight in interface iLightingInfo
Parameters:
color -
See Also:
iLightingInfo.setDynamicAmbientLight(crystalspace.jbind.impl.csutil.cscolor.csColor)

writeToCache

public boolean writeToCache(iCacheManager cache_mgr)
Description copied from interface: iLightingInfo
Write the lighting information to the cache. Returns false if there was a problem. This function will write the data to the current VFS dir. Implemented in csBezierMesh::LightingInfo, and csThing::LightingInfo.

Specified by:
writeToCache in interface iLightingInfo
Parameters:
cache_mgr -
Returns:
See Also:
iLightingInfo.writeToCache(crystalspace.jbind.interfaces.iutil.cache.iCacheManager)