8 #ifndef vtkVRCollaborationClient_h
9 #define vtkVRCollaborationClient_h
14 #include "vtkRenderingVRModule.h"
16 #include "vtksys/CommandLineArguments.hxx"
24 VTK_ABI_NAMESPACE_BEGIN
30 class vtkVRCollaborationClientInternal;
57 bool GetStringVector(std::vector<std::string>& result);
58 void SetStringVector(std::vector<std::string>
const& in);
60 bool GetDoubleVector(std::vector<double>& result);
61 void SetDoubleVector(
double const* in, uint16_t
size);
62 void SetDouble(
double val);
63 bool GetDouble(
double& result);
65 bool GetInt32Vector(std::vector<int32_t>& result);
66 void SetInt32Vector(int32_t
const* in, uint16_t size);
67 void SetInt32(int32_t val);
68 bool GetInt32(int32_t& result);
72 std::shared_ptr<void>
Data;
80 void SendAMessage(
std::string const& msgType, std::vector<Argument>
const& args);
81 std::vector<Argument> GetMessageArguments();
86 virtual void Render();
97 virtual void AddArguments(vtksys::CommandLineArguments& arguments);
132 std::function<void(std::string const& data, vtkLogger::Verbosity)>
Callback;
137 void HandleCollabMessage();
139 void EraseIdleAvatars();
149 void SendLatestDevicePoses();
150 void UpdateAvatarPoseFromCamera();
155 static void EventCallback(
156 vtkObject*
object,
unsigned long event,
void* clientdata,
void* calldata);
175 std::map<std::string, vtkSmartPointer<vtkOpenGLAvatar>>
Avatars;
182 VTK_ABI_NAMESPACE_END
vtkCallbackCommand * EventCommand
double YourLastAvatarUpdateTime
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkVRCollaborationClientInternal * Internal
void SetCollabPort(int val)
void SetCollabName(std::string const &val)
void SetCollabSession(std::string const &val)
Hold a reference to a vtkObjectBase instance.
std::map< std::string, vtkSmartPointer< vtkOpenGLAvatar > > Avatars
const int vtkEventDataNumberOfDevices
vtkOpenGLRenderWindow * RenderWindow
vtkOpenGLRenderer * Renderer
std::string CollabSession
supports function callbacks
vtkOpenGLRenderer * GetRenderer()
a simple class to control print indentation
void SetLogCallback(std::function< void(std::string const &data, vtkLogger::Verbosity verbosity)> cb)
std::function< void(std::string const &data, vtkLogger::Verbosity)> Callback
void SetScaleCallback(std::function< double()> cb)
std::map< std::string, double[vtkEventDataNumberOfDevices]> AvatarUpdateTime
std::function< double()> ScaleCallback
std::shared_ptr< void > Data
void SetCollabHost(std::string const &val)
std::array< double, 3 > Position
std::array< double, 4 > Orientation
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkNew< vtkTransform > TempTransform