crystalspace.jbind.impl.engine.region
Class csRegion

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.engine.region.csRegion
All Implemented Interfaces:
iBase, iPointer, iRegion

public class csRegion
extends csBase
implements iRegion

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csRegion(iPointer nPointer)
           
 
Method Summary
 void add(iObject obj)
          Add an object to this region.
 void clear()
          Clear this region without removing the entities in it.
 void deleteAll()
          Delete all entities in this region.
 iCameraPosition findCameraPosition(java.lang.String iName)
          Find a camera position in this region by name.
 iCollection findCollection(java.lang.String iName)
          Find a collection in this region by name.
 iMaterialWrapper findMaterial(java.lang.String iName)
          Find a material in this region by name.
 iMeshFactoryWrapper findMeshFactory(java.lang.String iName)
          Find a mesh factory in this region by name.
 iMeshWrapper findMeshObject(java.lang.String iName)
          Find a sprite in this region by name.
 iSector findSector(java.lang.String iName)
          Find a sector in this region by name.
 iTextureWrapper findTexture(java.lang.String iName)
          Find a texture in this region by name.
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
 boolean isInRegion(iObject obj)
          Check if some object is in this region.
protected  boolean isNativePointerValidSafe(long pointer)
           
 boolean prepare()
          Prepare all objects in this region.
 boolean prepareTextures()
          Prepare all textures and materials in this region.
 iObject queryObject()
          Get the iObject for this region.
 boolean shineLights()
          Do lighting calculations (or read from 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

csRegion

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

add

public void add(iObject obj)
Description copied from interface: iRegion
Add an object to this region.

Specified by:
add in interface iRegion
Parameters:
obj -
See Also:
iRegion.add(crystalspace.jbind.interfaces.iutil.object.iObject)

clear

public void clear()
Description copied from interface: iRegion
Clear this region without removing the entities in it. The entities will simply get unconnected from this region.

Specified by:
clear in interface iRegion
See Also:
iRegion.clear()

deleteAll

public void deleteAll()
Description copied from interface: iRegion
Delete all entities in this region.

Specified by:
deleteAll in interface iRegion
See Also:
iRegion.deleteAll()

findCameraPosition

public iCameraPosition findCameraPosition(java.lang.String iName)
Description copied from interface: iRegion
Find a camera position in this region by name.

Specified by:
findCameraPosition in interface iRegion
Returns:
See Also:
iRegion.findCameraPosition(java.lang.String)

findCollection

public iCollection findCollection(java.lang.String iName)
Description copied from interface: iRegion
Find a collection in this region by name.

Specified by:
findCollection in interface iRegion
Parameters:
iName -
Returns:
See Also:
iRegion.findCollection(java.lang.String)

findMaterial

public iMaterialWrapper findMaterial(java.lang.String iName)
Description copied from interface: iRegion
Find a material in this region by name.

Specified by:
findMaterial in interface iRegion
Parameters:
iName -
Returns:
See Also:
iRegion.findMaterial(java.lang.String)

findMeshFactory

public iMeshFactoryWrapper findMeshFactory(java.lang.String iName)
Description copied from interface: iRegion
Find a mesh factory in this region by name.

Specified by:
findMeshFactory in interface iRegion
Parameters:
iName -
Returns:
See Also:
iRegion.findMeshFactory(java.lang.String)

findMeshObject

public iMeshWrapper findMeshObject(java.lang.String iName)
Description copied from interface: iRegion
Find a sprite in this region by name.

Specified by:
findMeshObject in interface iRegion
Parameters:
iName -
Returns:
See Also:
iRegion.findMeshObject(java.lang.String)

findSector

public iSector findSector(java.lang.String iName)
Description copied from interface: iRegion
Find a sector in this region by name.

Specified by:
findSector in interface iRegion
Parameters:
iName -
Returns:
See Also:
iRegion.findSector(java.lang.String)

findTexture

public iTextureWrapper findTexture(java.lang.String iName)
Description copied from interface: iRegion
Find a texture in this region by name.

Specified by:
findTexture in interface iRegion
Parameters:
iName -
Returns:
See Also:
iRegion.findTexture(java.lang.String)

isInRegion

public boolean isInRegion(iObject obj)
Description copied from interface: iRegion
Check if some object is in this region. The speed of this function is independent of the number of objects in this region (i.e. very fast).

Specified by:
isInRegion in interface iRegion
Parameters:
obj -
Returns:
See Also:
iRegion.isInRegion(crystalspace.jbind.interfaces.iutil.object.iObject)

prepare

public boolean prepare()
Description copied from interface: iRegion
Prepare all objects in this region. This has to be called directly after loading new objects. This function is equivalent to calling PrepareTextures() followed by ShineLights().

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

prepareTextures

public boolean prepareTextures()
Description copied from interface: iRegion
Prepare all textures and materials in this region.

Specified by:
prepareTextures in interface iRegion
Returns:
See Also:
iRegion.prepareTextures()

queryObject

public iObject queryObject()
Description copied from interface: iRegion
Get the iObject for this region.

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

shineLights

public boolean shineLights()
Description copied from interface: iRegion
Do lighting calculations (or read from cache).

Specified by:
shineLights in interface iRegion
Returns:
See Also:
iRegion.shineLights()