30#ifndef vtkRemoteSession_h
31#define vtkRemoteSession_h
34#include "vtkWebAssemblySessionModule.h"
38#include <emscripten/val.h>
40VTK_ABI_NAMESPACE_BEGIN
76 emscripten::val GetState(vtkTypeUInt32
object);
81 void Set(vtkTypeUInt32
object, emscripten::val properties);
86 emscripten::val Get(vtkTypeUInt32
object);
93 void SkipProperty(const
std::
string& className, const
std::
string& propertyName);
100 void UnSkipProperty(const
std::
string& className, const
std::
string& propertyName);
108 bool RegisterBlob(const
std::
string& hash, emscripten::val jsArray);
115 bool UnRegisterBlob(const
std::
string& hash);
122 emscripten::val GetBlob(const
std::
string& hash);
131 emscripten::val Invoke(vtkTypeUInt32
object, const
std::
string& methodName, emscripten::val args);
138 emscripten::val GetAllDependencies(vtkTypeUInt32
object);
144 void UpdateObjectFromState(emscripten::val state);
150 void UpdateStateFromObject(vtkTypeUInt32
object);
159 bool SetSize(vtkTypeUInt32
object,
int width,
int height);
166 bool Render(vtkTypeUInt32
object);
173 bool ResetCamera(vtkTypeUInt32
object);
180 bool StartEventLoop(vtkTypeUInt32
object);
187 bool StopEventLoop(vtkTypeUInt32
object);
195 bool BindRenderWindow(vtkTypeUInt32
object, const
std::
string canvasSelector);
204 unsigned long Observe(
205 vtkTypeUInt32
object, const
std::
string& eventName, emscripten::val jsFunction);
213 bool UnObserve(vtkTypeUInt32
object,
unsigned long tag);
220 void Export(const
std::
string& fileName);
227 void Import(const
std::
string& stateFileName, const
std::
string& blobFileName);
232 void UpdateObjectsFromStates();
237 void UpdateStatesFromObjects();
242 void PruneUnusedBlobs();
247 void PruneUnusedObjects();
252 void PruneUnusedStates();
263 std::
size_t GetTotalBlobMemoryUsage();
269 std::
size_t GetTotalVTKDataObjectMemoryUsage();
274 void PrintSceneManagerInformation();
280 void SetDeserializerLogVerbosity(const
std::
string& verbosityLevel);
286 void SetInvokerLogVerbosity(const
std::
string& verbosityLevel);
292 void SetObjectManagerLogVerbosity(const
std::
string& verbosityLevel);
298 void SetSerializerLogVerbosity(const
std::
string& verbosityLevel);
Provides a remote session interface wrapped around vtk.h for managing VTK objects and states in a Web...
bool RegisterState(emscripten::val state)
Registers a state with the session.
~vtkRemoteSession()
Destructor for vtkRemoteSession cleans up the session.
vtkRemoteSession()
Constructor for vtkRemoteSession initializes the session.
bool UnRegisterState(vtkTypeUInt32 object)
Unregisters a state associated with a VTK object handle.
#define VTK_DEPRECATED_IN_9_5_0(reason)
struct vtkSessionImpl * vtkSession