19#ifndef vtkVRCollaborationClient_h
20#define vtkVRCollaborationClient_h
25#include "vtkRenderingVRModule.h"
27#include "vtksys/CommandLineArguments.hxx"
40class vtkVRCollaborationClientInternal;
82 std::shared_ptr<void>
Data;
90 void SendAMessage(std::string
const& msgType, std::vector<Argument>
const& args);
92 void SendPoseMessage(std::string
const& msgType,
int index,
double pos[3],
double dir[3]);
166 vtkObject*
object,
unsigned long event,
void* clientdata,
void* calldata);
185 std::map<std::string, vtkSmartPointer<vtkOpenGLAvatar>>
Avatars;
supports function callbacks
a simple class to control print indentation
Allocate and hold a VTK object.
abstract base class for most VTK objects
Hold a reference to a vtkObjectBase instance.
void SetDoubleVector(double const *in, uint16_t size)
bool GetStringVector(std::vector< std::string > &result)
bool GetDouble(double &result)
std::shared_ptr< void > Data
void SetStringVector(std::vector< std::string > const &in)
bool GetInt32(int32_t &result)
void SetInt32Vector(int32_t const *in, uint16_t size)
bool GetString(std::string &result)
void SetInt32(int32_t val)
bool GetDoubleVector(std::vector< double > &result)
void SetDouble(double val)
void SetString(std::string const &in)
bool GetInt32Vector(std::vector< int32_t > &result)
static vtkVRCollaborationClient * New()
bool AvatarIdle(std::string id)
static void EventCallback(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SendAMessage(std::string const &msgType, std::vector< Argument > const &args)
method signatures to send messages with Arguments and extract them out of messages
std::map< std::string, double[vtkEventDataNumberOfDevices]> AvatarUpdateTime
vtkOpenGLRenderWindow * RenderWindow
void HandleCollabMessage()
vtkVRCollaborationClient & operator=(const vtkVRCollaborationClient &)=delete
vtkVRCollaborationClient()
vtkVRCollaborationClient(const vtkVRCollaborationClient &)=delete
void SetCollabPort(int val)
~vtkVRCollaborationClient() override
void SetCollabSession(std::string const &val)
void SendAMessage(std::string const &msgType)
method signatures to send messages with Arguments and extract them out of messages
vtkVRCollaborationClientInternal * Internal
void SetCollabName(std::string const &val)
virtual bool Initialize(vtkOpenGLRenderer *)
vtkOpenGLRenderer * Renderer
std::function< double()> ScaleCallback
std::function< void(std::string const &data, vtkLogger::Verbosity)> Callback
double YourLastAvatarUpdateTime
virtual void HandleBroadcastMessage(std::string const &otherID, std::string const &type)
void SetCollabHost(std::string const &val)
std::string CollabSession
std::map< std::string, vtkSmartPointer< vtkOpenGLAvatar > > Avatars
vtkNew< vtkTransform > TempTransform
vtkOpenGLRenderer * GetRenderer()
virtual void AddArguments(vtksys::CommandLineArguments &arguments)
vtkCallbackCommand * EventCommand
void SendPoseMessage(std::string const &msgType, int index, double pos[3], double dir[3])
method signatures to send messages with Arguments and extract them out of messages
void UpdateAvatarPoseFromCamera()
void Log(vtkLogger::Verbosity verbosity, std::string const &msg)
std::vector< Argument > GetMessageArguments()
method signatures to send messages with Arguments and extract them out of messages
void SendLatestDevicePoses()
void SetScaleCallback(std::function< double()> cb)
void SetLogCallback(std::function< void(std::string const &data, vtkLogger::Verbosity verbosity)> cb)
vtkSmartPointer< vtkOpenGLAvatar > GetAvatar(std::string id)
std::array< double, 4 > Orientation
std::array< double, 3 > Position
const int vtkEventDataNumberOfDevices