| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/qt3/remotelookat.h>

Public Types | |
| enum | State { MasterState, SlaveState, IndependentState, MasterRequestedState, SlaveRequestedState } |
| enum | Role { MasterRole, SlaveRole, IndependentRole } |
Public Member Functions | |
| RemoteLookAt (LookAt *target, TwoPointConnection *connection, Canvas *canvas) | |
| ~RemoteLookAt () | |
| VRS_SERIALIZABLE_CLASS_ENUM (State) | |
| State | getState () const |
| VRS_SERIALIZABLE_CLASS_ENUM (Role) | |
| void | sendRoleRequest (Role role) |
| void | answerRoleRequest (bool accept=true) |
| void | registerRoleChangeCB (Callback1< Role > *cb) |
| void | registerRoleChangeAnswerCB (Callback1< bool > *cb) |
| void | registerIndependentCB (Callback *cb) |
| VRS_TYPEINFO (RemoteLookAt, SharedObj) | |
| VRS::RemoteLookAt::RemoteLookAt | ( | LookAt * | target, | |
| TwoPointConnection * | connection, | |||
| Canvas * | canvas | |||
| ) |
< A remote lookat enables camera control via TCP/IP-network. To establish a RemoteLookAt connection between two computers, do:
| VRS::RemoteLookAt::~RemoteLookAt | ( | ) |
| VRS::RemoteLookAt::VRS_SERIALIZABLE_CLASS_ENUM | ( | State | ) |
| State VRS::RemoteLookAt::getState | ( | ) | const |
Returns the current state.
| VRS::RemoteLookAt::VRS_SERIALIZABLE_CLASS_ENUM | ( | Role | ) |
| void VRS::RemoteLookAt::sendRoleRequest | ( | Role | role | ) |
Sends a role-change request message to the connected application. The role is changed when the "accept" message arrives. If the role is "Independent", the role is applied without waiting for acknowledgement. Note: If a role request has been sent, it MUST be answered until the next request can be send.
| void VRS::RemoteLookAt::answerRoleRequest | ( | bool | accept = true |
) |
Called to accept an incoming role change request. If there is no request, it has no effect.
The role-change callback is called when the other participant sends a role-change request. In this case the application should ask the user, whether he want to accept the requested role change. By answerRoleRequest() the application should answer the request. The passed parameter informs whether the connected application wants to be master or slave.
Note: Only one callback can be active. A callback is unregistered by call registerRoleChangeCB(NULL). The same applies for registerRoleChangeAnswerCB().
| void VRS::RemoteLookAt::registerRoleChangeAnswerCB | ( | Callback1< bool > * | cb | ) |
The roleChangeAnswer callback is invoked when the RemoteLookAt receives an answer for a previously sent role-change request. The bool parameter is true if the request has been accepted, false otherwise.
| void VRS::RemoteLookAt::registerIndependentCB | ( | Callback * | cb | ) |
The IndependentCallback is called if the other participant has switched from master or slave mode to independent mode.
| VRS::RemoteLookAt::VRS_TYPEINFO | ( | RemoteLookAt | , | |
| SharedObj | ||||
| ) |