com.visioglobe.libVisioDevKit
Class VgIEngine

java.lang.Object
  extended by com.visioglobe.libVisioDevKit.VgIEngine

public class VgIEngine
extends java.lang.Object

This interface provides an entry-point to retrieve objects from the Visioglobe engine.


Field Summary
protected  boolean swigCMemOwn
           
 
Constructor Summary
VgIEngine(long cPtr, boolean cMemoryOwn)
           
 
Method Summary
 void addPostDrawCallback(VgIEnginePostDrawCallbackRefPtr pCallback)
          This method is used to add a VgIEnginePostDrawCallback to the engine.
 void delete()
           
 VgIAnimationManager editAnimationManager()
           
 VgICamera editCamera()
           
 VgIDatabase editDatabase()
           
 VgFontManager editFontManager()
           
 VgInstanceFactory editInstanceFactory()
           
 VgLayerManager editLayerManager()
           
 VgILicenseManager editLicenseManager()
           
 VgLightRefPtr editLight(long pLightNum)
          This method gives read-write access to one of the engine lights.
 VgIResourceManager editResourceManager()
           
 VgITextureManager editTextureManager()
           
protected  void finalize()
           
static long getCPtr(VgIEngine obj)
           
 java.lang.String getErrorString(VgErrorCode pErrorCode)
           
 VgErrorCode getLastError()
           
 VgLightConstRefPtr getLight(long pLightNum)
          This method gives read-only access to one of the engine lights.
 long getNumLights()
          This method returns the number of lights in the scene.
 VgPositionToolbox getPositionToolbox()
           
 VgPostDrawCallbacks getPostDrawCallbacks()
           
 void reloadShaders()
          This method causes the engine to reinstantiate the shaders from source files.
 void removePostDrawCallback(VgIEnginePostDrawCallbackRefPtr pCallback)
          This method is used to remove a VgIEnginePostDrawCallback to the engine.
 void replaceNamedTexture(java.lang.String pResourceName, VgITextureRefPtr pTexture)
          This method is used to override a given texture resource (defined in the configuration file).
 void resetGraphicResources(boolean pIsContextLost)
          Resets all the GPU graphic resources.
 void setClearColor(VgColor pClearColor)
          This method is used to change the clear color of the view.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

swigCMemOwn

protected boolean swigCMemOwn
Constructor Detail

VgIEngine

public VgIEngine(long cPtr,
                 boolean cMemoryOwn)
Method Detail

getCPtr

public static long getCPtr(VgIEngine obj)

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

delete

public void delete()

addPostDrawCallback

public void addPostDrawCallback(VgIEnginePostDrawCallbackRefPtr pCallback)
This method is used to add a VgIEnginePostDrawCallback to the engine.

Parameters:
pCallback - the post draw callback.
Note:
Note that adding too many post draw callbacks (or having a post draw callback that takes time to execute) can lead to bad performance.

removePostDrawCallback

public void removePostDrawCallback(VgIEnginePostDrawCallbackRefPtr pCallback)
This method is used to remove a VgIEnginePostDrawCallback to the engine.

Parameters:
pCallback - the post draw callback.

getPostDrawCallbacks

public VgPostDrawCallbacks getPostDrawCallbacks()
Returns:
Registred post draw callbacks.

editDatabase

public VgIDatabase editDatabase()
Returns:
The database.

editCamera

public VgICamera editCamera()
Returns:
The camera.

editLicenseManager

public VgILicenseManager editLicenseManager()
Returns:
The license manager.

editTextureManager

public VgITextureManager editTextureManager()
Returns:
The texture manager.

editAnimationManager

public VgIAnimationManager editAnimationManager()
Returns:
The animation manager.

editResourceManager

public VgIResourceManager editResourceManager()
Returns:
The resource manager.

editLayerManager

public VgLayerManager editLayerManager()
Returns:
The layer manager.

editInstanceFactory

public VgInstanceFactory editInstanceFactory()
Returns:
The instance factory.

editFontManager

public VgFontManager editFontManager()
Returns:
The font manager.

getPositionToolbox

public VgPositionToolbox getPositionToolbox()
Returns:
The toolbox for positions.

getLastError

public VgErrorCode getLastError()
Returns:
The last error (an empty string is returned if no error occured).

getErrorString

public java.lang.String getErrorString(VgErrorCode pErrorCode)

resetGraphicResources

public void resetGraphicResources(boolean pIsContextLost)
Resets all the GPU graphic resources.

Parameters:
pIsContextLost - Use true to specify that the context has been lost, false otherwise. Note: if the context was not lost and you specify true, it will produce memory leaks in the GPU.

reloadShaders

public void reloadShaders()
This method causes the engine to reinstantiate the shaders from source files.


getLight

public VgLightConstRefPtr getLight(long pLightNum)
This method gives read-only access to one of the engine lights.

Parameters:
pLightNum - The index of the queried light.
Returns:
A VgConstRefPtr containing the pointer to the light, or NULL if there is no light with this index.

editLight

public VgLightRefPtr editLight(long pLightNum)
This method gives read-write access to one of the engine lights.

Parameters:
pLightNum - The index of the queried light.
Returns:
A VgRefPtr containing the pointer to the light, or NULL if there is no light with this index.

getNumLights

public long getNumLights()
This method returns the number of lights in the scene.

Returns:
The number of lights in the scene.

replaceNamedTexture

public void replaceNamedTexture(java.lang.String pResourceName,
                                VgITextureRefPtr pTexture)
This method is used to override a given texture resource (defined in the configuration file). If a resource exists by that name, it is replaced by the provided texture instance and all items in the scene referencing it are updated. If there is no matching texture nothing happens.

Parameters:
pResourceName - the name of the texture resource to override.
pTexture - The texture to override with.

setClearColor

public void setClearColor(VgColor pClearColor)
This method is used to change the clear color of the view. This has no effect if an opaque background image is used.

Parameters:
pClearColor - The new color to use for screen clearing.

VisioDevKit 2.0, Visioglobe® 2013