19 #ifndef vtkVRCollaborationClient_h
20 #define vtkVRCollaborationClient_h
25 #include "vtkRenderingVRModule.h"
27 #include "vtksys/CommandLineArguments.hxx"
40 class vtkVRCollaborationClientInternal;
67 bool GetStringVector(std::vector<std::string>& result);
68 void SetStringVector(std::vector<std::string>
const& in);
70 bool GetDoubleVector(std::vector<double>& result);
71 void SetDoubleVector(
double const* in, uint16_t
size);
72 void SetDouble(
double val);
73 bool GetDouble(
double& result);
75 bool GetInt32Vector(std::vector<int32_t>& result);
76 void SetInt32Vector(int32_t
const* in, uint16_t size);
77 void SetInt32(int32_t val);
78 bool GetInt32(int32_t& result);
82 std::shared_ptr<void>
Data;
90 void SendAMessage(
std::string const& msgType, std::vector<Argument>
const& args);
91 std::vector<Argument> GetMessageArguments();
96 virtual void Render();
107 virtual void AddArguments(vtksys::CommandLineArguments& arguments);
142 std::function<void(std::string const& data, vtkLogger::Verbosity)>
Callback;
147 void HandleCollabMessage();
149 void EraseIdleAvatars();
159 void SendLatestDevicePoses();
160 void UpdateAvatarPoseFromCamera();
165 static void EventCallback(
166 vtkObject*
object,
unsigned long event,
void* clientdata,
void* calldata);
185 std::map<std::string, vtkSmartPointer<vtkOpenGLAvatar>>
Avatars;
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