Hi Antonio,
On Wed, 2006-04-05 at 20:02 +0200, Antonio B. wrote:
>
> Thanks Gerrit but this not is that I wants.
> I have a method in my MFEditor class named changeValByStr()
>
> void changeValByStr(Field *mf, std::string strVal, UInt32 pos)
> {
> //In this method I want to change the value of mf[pos] with the
> value //represented by strVal string. mf is MField<DataTypeT>
> }
>
> Of course, 'strVal' is a string representation of a DataTypeT of 'mf',
>
> For example:
> if 'mf' is MField<Color3f> then strVal="0 0.4567 0";
> if 'mf' is MField<Matrix> then strVal="1 0 0 0 4 5 6.657 7 8 9
> ....";
> ... and so on;
> My MFEditor class is only for MField<BaseType> (MFUInt8, ...., MFVect3i,...,
> MFPnt4f, ..., MFMatrix, MFColor3f...) and not for MFFieldContainerPtr.
>
> The only method to modify a MField by string is:
> ((MFFieldContainerPtr *)mf)->pushValueByStr(strVal.c_str());
> But this append a new element. Instead I want to change the 'pos' element of
> mf with strVal value.
>
> How can I do?
At this point I don't think there's an easy way to do that. I know
Andreas has editors for MFields in VRED, but I don't know how he did
those.
Andreas?
Dirk
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users