Hello Christoph,
Christoph Schäfer wrote:
> Gerrit Voss schrieb:
>> On Sun, 2008-12-14 at 18:40 +0100, Christoph Schäfer wrote:
[SNIP]
>> Source/System/FieldContainer/Base/testChangedCallback.cpp
>>
> Following this example I now try to access the changed field (I suppose
> it's the one identified by whichfield). I tried the following code
> hoping whichfield contains the typ id of the changed field:
not quite, it is a bitmask indicating which field(s) changed, comparing
against the SomeContainer::<FieldName>Mask constants every container
defines lets you find out which field(s) are meant.
> void DefaultNodeObserver::processEvent( OSG::FieldContainer *pObj,
> OSG::BitVector whichField )
> {
> OSG::GetFieldHandlePtr _fieldHandleP;
>
> for (int i = 0; i < pObj->getNumFields(); i++)
somewhat oddly fields are numbered starting at 1, so you need to go from
1 to i <= pObj->getNumFields(). The member fields of a container are
described by types derived from FieldDescriptionBase.
Hope it helps,
Cassten
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users