SAP 3D Visual Enterprise applications SDK
IDVLClient Class Reference

#include <DVLClient.h>

Public Member Functions

virtual void OnNodeSelectionChanged (IDVLScene *pScene, size_t uNumberOfSelectedNodes, DVLID idFirstSelectedNode)
 
virtual void OnNodeVisibilityChanged (IDVLScene *pScene, DVLID id, bool bNewVisibility)
 
virtual void LogMessage (DVLCLIENTLOGTYPE type, const char *szSource, const char *szText)
 
virtual void OnStepEvent (DVLSTEPEVENT type, DVLID stepId)
 
virtual void OnURLClick (const char *url, DVLID nodeId)
 
virtual bool NotifyFileLoadProgress (float fProgress)
 
virtual void NotifyFrameStarted ()
 
virtual void NotifyFrameFinished ()
 
virtual const char * GetDebugInfoString ()
 
virtual bool RequestCallback (void *pCallbackParam)
 
virtual void NotifySceneGeometryLoaded (IDVLScene *pScene)
 

Detailed Description

This class defines the main interface for interaction between DVL and the client

Default implementations of all methods do nothing. You may override them if you'd like to get some information from the core, like logging messages or selection events.

Member Function Documentation

§ GetDebugInfoString()

virtual const char* IDVLClient::GetDebugInfoString ( )
inlinevirtual

If DVLRENDEROPTION_SHOW_DEBUG_INFO is ON, this method will be used to display custom information in the top of rendered image together with debug info from the renderer.

Return values
NULLif you don't need to display any custom text
ANSIstring with custom text if you need to display something. Note: you are responsible to allocating and releasing the string buffer.

§ LogMessage()

virtual void IDVLClient::LogMessage ( DVLCLIENTLOGTYPE  type,
const char *  szSource,
const char *  szText 
)
inlinevirtual

Called when library wants to report a warning, error, etc

Parameters
typeType of the message, see DVLCLIENTLOGTYPE
szSourceText representation of the message source, see DVLLOGSOURCE_XXX defines. Can be NULL.
szTextThe text message in UTF-8. Can be NULL.
Note
The default implementation does nothing

§ NotifyFileLoadProgress()

virtual bool IDVLClient::NotifyFileLoadProgress ( float  fProgress)
inlinevirtual

Called to notify about file loading progress (which may be quite time consuming) and to check if user wants to abort file loading

Parameters
fProgressA value from 0.0f to 1.0f indicating the progress
Note
The method will be called several times with fProgress == 0.0f while the hierarchy is loading
Return values
trueOK to proceed with file loading
falseIf the loading needs to be canceled (for example, user abort in UI)

§ NotifyFrameFinished()

virtual void IDVLClient::NotifyFrameFinished ( )
inlinevirtual

Called to notify when frame rendering has finished

Note
The default implementation does nothing

§ NotifyFrameStarted()

virtual void IDVLClient::NotifyFrameStarted ( )
inlinevirtual

Called to notify when frame rendering has started

Note
The default implementation does nothing

§ NotifySceneGeometryLoaded()

virtual void IDVLClient::NotifySceneGeometryLoaded ( IDVLScene pScene)
inlinevirtual

Called once all scene geometry has been loaded into GPU.

Note: This notification is called only when geometry streaming is disabled on the target platform (like in JavaScript). On all other platforms this is never called, as they stream geometry data instead of preloading it.

§ OnNodeSelectionChanged()

virtual void IDVLClient::OnNodeSelectionChanged ( IDVLScene pScene,
size_t  uNumberOfSelectedNodes,
DVLID  idFirstSelectedNode 
)
inlinevirtual

Called when selection list changes. There are three possible scenarios:

  • Selection list is empty, in such case uNumberOfSelectedNodes == 0, idFirstSelectedNode == DVLID_INVALID
  • Selection list has exactly 1 node, in such case uNumberOfSelectedNodes == 1, idFirstSelectedNode equals to DVLID of selected node
  • Selection list has more than 1 nodes, in such case uNumberOfSelectedNodes gives total count and idFirstSelectedNode == DVLID_INVALID. You need to call IDVLScene::RetrieveSceneInfo() with DVLSCENEINFO_SELECTED flag to get a full list.
Note
The default implementation does nothing

§ OnNodeVisibilityChanged()

virtual void IDVLClient::OnNodeVisibilityChanged ( IDVLScene pScene,
DVLID  id,
bool  bNewVisibility 
)
inlinevirtual

Called when node visibility changes as a result of viewport activation or query execution.

Note
The default implementation does nothing

§ OnStepEvent()

virtual void IDVLClient::OnStepEvent ( DVLSTEPEVENT  type,
DVLID  stepId 
)
inlinevirtual

Called to notify about the updated step status

Parameters
typeThe type of the event that happened to the step
stepIdThe identifier of the step. See the DVLSTEPEVENT enum comments for details
Note
The default implementation does nothing

§ OnURLClick()

virtual void IDVLClient::OnURLClick ( const char *  url,
DVLID  nodeId 
)
inlinevirtual

Called to notify about the URL click

Parameters
urlThe URL
nodeIdThe identifier of the node
Note
The default implementation does nothing

§ RequestCallback()

virtual bool IDVLClient::RequestCallback ( void *  pCallbackParam)
inlinevirtual

If DVL calls IDVLClient::RequestCallback(void *pCallbackParam) method, then the client must execute IDVLCore::ExecuteCallback() with the same "pCallbackParam" parameter as soon as possible. This technique is usually used for supporting UI updates during long operations (like LoadScene) on platforms without multithreading support.

Return values
trueIf the caller agrees to issue a IDVLCore::ExecuteCallback() call to as soon as possible
falseIf the caller will not execute IDVLCore::ExecuteCallback(). This usually means error and DVL will act accordingly. For example, failing .vds file load, etc.

The documentation for this class was generated from the following file: