30 #ifndef vtkRemoteSession_h
31 #define vtkRemoteSession_h
34 #include "vtkWebAssemblySessionModule.h"
36 #include <emscripten/val.h>
38 VTK_ABI_NAMESPACE_BEGIN
59 bool RegisterState(emscripten::val state);
66 bool UnRegisterState(vtkTypeUInt32
object);
74 bool Set(vtkTypeUInt32
object, emscripten::val properties);
81 emscripten::val Get(vtkTypeUInt32
object);
103 bool RegisterBlob(
const std::string& hash, emscripten::val jsArray);
126 emscripten::val Invoke(vtkTypeUInt32
object,
const std::string& methodName, emscripten::val args);
133 emscripten::val GetAllDependencies(vtkTypeUInt32
object);
140 bool UpdateObjectFromState(emscripten::val state);
146 void UpdateStateFromObject(vtkTypeUInt32
object);
155 bool SetSize(vtkTypeUInt32
object,
int width,
int height);
162 bool Render(vtkTypeUInt32
object);
169 bool ResetCamera(vtkTypeUInt32
object);
178 vtkTypeUInt8
mode, vtkTypeUInt32 requiredFeatures, vtkTypeUInt32 optionalFeatures);
190 bool StartEventLoop(vtkTypeUInt32
object);
197 bool StopEventLoop(vtkTypeUInt32
object);
205 bool BindRenderWindow(vtkTypeUInt32
object,
const std::string canvasSelector);
214 unsigned long Observe(
215 vtkTypeUInt32
object,
const std::string& eventName, emscripten::val jsFunction);
223 bool UnObserve(vtkTypeUInt32
object,
unsigned long tag);
230 bool UnObserveAll(vtkTypeUInt32
object);
235 void UnObserveAllObjects();
254 void UpdateObjectsFromStates();
259 void UpdateStatesFromObjects();
264 void PruneUnusedBlobs();
269 void PruneUnusedObjects();
274 void PruneUnusedStates();
285 std::size_t GetTotalBlobMemoryUsage();
291 std::size_t GetTotalVTKDataObjectMemoryUsage();
298 std::string PrintObjectToString(vtkTypeUInt32
object);
303 void PrintSceneManagerInformation();
309 void SetDeserializerLogVerbosity(
const std::string& verbosityLevel);
315 void SetInvokerLogVerbosity(
const std::string& verbosityLevel);
321 void SetObjectManagerLogVerbosity(
const std::string& verbosityLevel);
327 void SetSerializerLogVerbosity(
const std::string& verbosityLevel);
332 VTK_ABI_NAMESPACE_END
struct vtkSessionImpl * vtkSession
struct vtkSessionImpl * vtkSession
Provides a remote session interface wrapped around vtk.h for managing VTK objects and states in a Web...