<div dir="ltr">Thanks Robert,<div><br></div><div>> <span style="font-size:12.8px">Getting the coords of glyphs is something we'd need to add to</span></div><span style="font-size:12.8px">osgText::Text, such as Text::getGlyphCorners(int characterPosition,</span><br style="font-size:12.8px"><span style="font-size:12.8px">osg::Vec3& bottomLeft,   osg::Vec3& bottomRight etc.).</span><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Right. This will do it.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 16, 2017 at 6:03 PM, Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nick,<br>
<br>
Thanks for the links and explanation.<br>
<br>
The new implementation is completely different, it simply not an issue<br>
of making an old API public again, there is no way you can map the old<br>
to the new implementation for backwards compatibility as they are so<br>
different.  The new implementation shares a single vertex array for<br>
the whole osgText::Text object, the old implementation uses mutliple<br>
vertex arrays for different texture atlas and view combinations.<br>
<br>
Getting the coords of glyphs is something we'd need to add to<br>
osgText::Text, such as Text::getGlyphCorners(int characterPosition,<br>
osg::Vec3& bottomLeft,   osg::Vec3& bottomRight etc.).<br>
<br>
Robert.<br>
<br>
On 16 November 2017 at 16:54, Trajce Nikolov NICK<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:trajce.nikolov.nick@gmail.com">trajce.nikolov.nick@gmail.com</a><wbr>> wrote:<br>
> Hi Robert,<br>
><br>
> that is part of a code I wrote that has history :-) and now is part of the<br>
> OpenIG project. Originally this was written like 6-7 (???) years ago and was<br>
> part of the osgWidget::Input too ( I had submission then for this ). The<br>
> purpose was to have a Line Edit as is known in any UI. OpenIG is using it<br>
> for typing commands as from terminal and here is the whole code<br>
> <a href="https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Core-OpenIG/Terminal.cpp" rel="noreferrer" target="_blank">https://github.com/CCSI-CSSI/<wbr>MuseOpenIG/blob/master/Core-<wbr>OpenIG/Terminal.cpp</a><br>
> ....<br>
><br>
> This particular snippet Curtis is mentioning was changed over time (simple<br>
> changes that are handled with #ifdefs) and now we have the same case - I am<br>
> aware of the recent osgText refactors but don't know the details. The<br>
> purpose of this snippet is to get the glyphs coords of the edited text in<br>
> order to set the cursor position. That simple :-).<br>
><br>
> The mentioned snippet is using the API for a decade that now become broken,<br>
> so I will vote to make it back compatible again - if it will be a simple<br>
> addition what I believe it is the case<br>
><br>
> Please let me know your thoughts and what will be the best effort to fix<br>
> this issue<br>
><br>
> Thanks a bunch as always!<br>
><br>
> Cheers,<br>
> NIck<br>
><br>
> On Wed, Nov 15, 2017 at 10:35 PM, Robert Osfield <<a href="mailto:robert.osfield@gmail.com">robert.osfield@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi Curtis,<br>
>><br>
>> It might be that we need to add some extra API to osgText to help you<br>
>> do what you want to do.  As a general trend I would much rather have<br>
>> users no need to grapple with the internal implementation details of<br>
>> classes to do their work, if this requires some amendments to the<br>
>> public interface or just providing some advice to solve it another way<br>
>> then this will be preferable.<br>
>><br>
>> At this point I can't really provide any specific advice as to what<br>
>> would be appropriate in hour case as the small code snippet really<br>
>> doesn't tell me anything about the what you are and why.  Could you<br>
>> provide a small compilable code example that illustrates what you were<br>
>> doing with older versions of the OSG.  From this I should be able to<br>
>> work out what you were doing and why, and then work out what would be<br>
>> appropriate to do next.<br>
>><br>
>> Robert.<br>
>><br>
>> On 15 November 2017 at 19:29, Curtis Rubel <<a href="mailto:crubel@compro.net">crubel@compro.net</a>> wrote:<br>
>> > Hello community,<br>
>> ><br>
>> >    I was attempting to test the latest release of OSG 3.5.8 and am now<br>
>> > getting<br>
>> > some compiler errors.<br>
>> ><br>
>> > error: ‘const struct osgText::Text::GlyphQuads’ has no member named<br>
>> > ‘getCoords’<br>
>> ><br>
>> > coords.insert(coords.end(),gq.<wbr>getCoords()->begin(),gq.<wbr>getCoords()->end());<br>
>> ><br>
>> > Snippet of the code in question:<br>
>> ><br>
>> > Code:<br>
>> ><br>
>> ><br>
>> > std::vector<osg::Vec2>                          coords;<br>
>> ><br>
>> > osgText::Text::<wbr>TextureGlyphQuadMap& tgqm =<br>
>> > const_cast<osgText::Text::<wbr>TextureGlyphQuadMap&>(_text-><wbr>getTextureGlyphQuadMap());<br>
>> ><br>
>> > const osgText::Text::GlyphQuads& gq = tgqmi->second;<br>
>> ><br>
>> ><br>
>> > coords.insert(coords.end(),gq.<wbr>getCoords()->begin(),gq.<wbr>getCoords()->end());<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > We are using this code to control onscreen text command line input.<br>
>> > What would be the proper way to fix this code under the newer versions<br>
>> > of OSG to<br>
>> > accomplish the same, if it is still possible in some way?<br>
>> ><br>
>> > Any hints would be appreciated.<br>
>> ><br>
>> > Thank you all as always...<br>
>> ><br>
>> > Cheers,<br>
>> > Curtis[/code]<br>
>> ><br>
>> > ------------------<br>
>> > Read this topic online here:<br>
>> > <a href="http://forum.openscenegraph.org/viewtopic.php?p=72393#72393" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=72393#<wbr>72393</a><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > osg-users mailing list<br>
>> > <a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
>> ><br>
>> > <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
>> ______________________________<wbr>_________________<br>
>> osg-users mailing list<br>
>> <a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
>> <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
><br>
><br>
><br>
><br>
> --<br>
> trajce nikolov nick<br>
><br>
> ______________________________<wbr>_________________<br>
> osg-users mailing list<br>
> <a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
> <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
><br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>