MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
FieldSync.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2007, MeVis Medical Solutions AG
4
**
5
** The user may use this file in accordance with the license agreement provided with
6
** the Software or, alternatively, in accordance with the terms contained in a
7
** written agreement between the user and MeVis Medical Solutions AG.
8
**
9
** For further information use the contact form at https://www.mevislab.de/contact
10
**
11
**************************************************************************************/
12
13
#ifndef FIELD_SYNC_H
14
#define FIELD_SYNC_H
15
18
19
#include <Inventor/SbPList.h>
20
21
class
SoField;
22
class
SoFieldSensor;
23
class
SoSensor;
24
class
SoFieldContainer;
25
26
//=============================================================
29
30
//=============================================================
31
class
FieldSyncEntry
32
{
33
public
:
35
FieldSyncEntry
(SoField* f1, SoField* f2);
36
38
~FieldSyncEntry
();
39
41
void
fieldSensor
(SoFieldSensor* s);
42
44
static
void
fieldSensorCB
(
void
* data, SoSensor* s);
45
46
private
:
48
void
copyFieldValue(SoField* src, SoField* dst, SoFieldSensor* dstSensor);
49
51
SoFieldSensor* _sensor1;
53
SoFieldSensor* _sensor2;
54
};
55
56
//=============================================================
58
59
//=============================================================
60
class
FieldSync
61
{
62
public
:
64
FieldSync
(SoFieldContainer* src, SoFieldContainer* dst,
const
SbStringList& fields);
65
66
~FieldSync
();
67
68
private
:
70
SbPList _entries;
71
};
72
73
#endif
FieldSyncEntry::FieldSyncEntry
FieldSyncEntry(SoField *f1, SoField *f2)
create field sync for fields f1 and f2
FieldSyncEntry::~FieldSyncEntry
~FieldSyncEntry()
destructor
FieldSyncEntry::fieldSensor
void fieldSensor(SoFieldSensor *s)
called by sensors when f1 or f2 change
FieldSyncEntry::fieldSensorCB
static void fieldSensorCB(void *data, SoSensor *s)
forward callback to fieldSensor()
FieldSync::~FieldSync
~FieldSync()
FieldSync::FieldSync
FieldSync(SoFieldContainer *src, SoFieldContainer *dst, const SbStringList &fields)
create a two way synchronization between src and dst for all fields given in fields
MeVisLab
Standard
Sources
Inventor
SoViewers
FieldSync.h
Generated by
1.18.0