#include <H3DNetworkingUtils/RemoteMF.h>
Public Member Functions | |
virtual void | initialize () |
Initialize values. | |
Public Attributes | |
auto_ptr< MFSender > | toBeSent |
This field value is sent to the other application when it changes access type: inputOnly basic type: SFString default value:. | |
auto_ptr< BufferedMField< M > > | received |
This is received from the other application when the remote value changes This needs to be a BufferedMField because it gets changed in a thread that is not the graphics thread, and also may need to be buffered access type: outputOnly basic type: SFString default value:. | |
Static Public Attributes | |
static H3D::H3DNodeDatabase | database |
X3D interface. | |
Protected Member Functions | |
RemoteMF (H3D::X3DTypes::X3DType t, H3D::Inst< MFSender > _toBeSent=0, H3D::Inst< BufferedMField< M > > _received=0) | |
Constructor is protected so that it can not explicitly be called: rather it should be implicely called from an inheriting class's constructor This is since it is an abstract class. | |
virtual void | setSendOnChange (bool val) |
Start or stop the field being sent each time it is changed. | |
virtual void | checkForChange () |
Called from traverseSG in the graphics loop to check for any changes in the received field and to update the field appropriately Alternatively called from a dummy force function in the haptics loop to check for any changes in the received field and to update the field appropriately. | |
void | writeField () |
Write a field to the packet. | |
virtual void | writeValue (std::vector< typename M::value_type > const &val)=0 |
Must be supplied for specific instantiations, to send the correct parts of the value. | |
double | readDouble () |
Read a double from the socket or packet. | |
H3D::H3DFloat | readH3DFloat () |
Read a H3DFloat from the socket or packet. | |
void | writeDouble (const double &val) |
Write a double to the socket or packet. | |
void | writeH3DFloat (const H3DFloat &val) |
Write a H3DFloat to the socket or packet. | |
Classes | |
class | MFSender |
This class gets input values and sends them on trhe network. More... |
This node operates in stand-alone mode as a member of a RemoteClient or RemoteServer remoteFields field. It is, however, an abstract class. In order to work, the inheriting classes, RemoteMFVec3f, RemoteMFBool, RemoteMFRotation, need to be instantiated. They only differ from each other in the work that they do in reading and writing values.
Examples:
H3DNetworkingUtils::RemoteMF< M >::RemoteMF | ( | H3D::X3DTypes::X3DType | t, | |
H3D::Inst< MFSender > | _toBeSent = 0 , |
|||
H3D::Inst< BufferedMField< M > > | _received = 0 | |||
) | [protected] |
Constructor is protected so that it can not explicitly be called: rather it should be implicely called from an inheriting class's constructor
This is since it is an abstract class.
void RemoteMF::initialize | ( | ) | [inline, virtual] |
Initialize values.
Can't do this as we can't put in the 'typename M::value_type' namespace RemoteSFInternals { FIELDDB_ELEMENT( RemoteMF<typename M::value_type>, toBeSent, INPUT_ONLY ); FIELDDB_ELEMENT( RemoteMF<typename M::value_type>, received, OUTPUT_ONLY ); }.
Reimplemented from H3DNetworkingUtils::RemoteField.
References H3DNetworkingUtils::RemoteField::bufferStrategy, and H3DNetworkingUtils::RemoteMF< M >::received.
virtual void H3DNetworkingUtils::RemoteMF< M >::checkForChange | ( | ) | [inline, protected, virtual] |
Called from traverseSG in the graphics loop to check for any changes in the received field and to update the field appropriately
Alternatively called from a dummy force function in the haptics loop to check for any changes in the received field and to update the field appropriately.
Implements H3DNetworkingUtils::RemoteField.
virtual void H3DNetworkingUtils::RemoteMF< M >::writeValue | ( | std::vector< typename M::value_type > const & | val | ) | [protected, pure virtual] |
Must be supplied for specific instantiations, to send the correct parts of the value.
Referenced by H3DNetworkingUtils::RemoteMF< M >::writeField().