Hi.

As I'm porting my system to OpenSG 2.0 I noticed the following:

It is possible to get a (non const) Pointer to a Field from  
FieldContainer with ->editSF<whatever>, and from this pointer, a (non  
const) reference to the stored value with getValue. Everytime one  
accesses ->editSF, there's an internal call to editSField. However, I  
want to keep that reference and work on it directly - but therefore,  
editSField of FieldContainer should be public, not protected.

A small example that makes it (hopefully) clearer what I mean...

SField<Vec3f> *f = trans->editSFTranslation(); //sets the changed flag  
with editSField(...Mask) internally...
Vec3f& tvec = f->getValue();
tvec[0] = 50; //changing tvec here is ok, as the field is marked as  
changed....

commitChanges();

//changing tvec here has no effect...
tvec[0] = 0;
//...so this is what I need, but it is protected...
trans->editSField(OSG::ComponentTransform::ScaleFieldMask);

Could you move this to public please? (Same for the MF ...)

Btw., I sent an STL loader for 2.0 to the list a couple of weeks ago,  
but I hasn't appeared in the repository yet - anything wrong with it?  
It seems to work fine here...

Thanks,
Dominik

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to