OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Problems with osgText::Text internal transformations and LineSegmentIntersector


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
brianh
Newbie


Joined: 21 Dec 2017
Posts: 6

PostPosted: Tue Mar 20, 2018 10:45 am    Post subject:
Problems with osgText::Text internal transformations and LineSegmentIntersector
Reply with quote

Hi,

When I use any of the following methods to reposition osgText::Text the picking fails when used with LineSegmentIntersector.

Code:

text->setPosition() // anything other than {0.0,0.0,0.0}
text->setRotation() // anything other than osg::Quat(0.0, osg::Z_AXIS)
text->setAlignment() // anything other than LEFT_BOTTOM


As far as I can work out from debugging, the bounds are being correctly calculated and "intersectAndClip" is returning true. The problem seems to be when "drawable->accept" is called in the "intersect" method, the IntersectFunctor does not have the transformations that Text is using and the vertices passed to it are not transformed.

The only way I can find around this is to place the text inside PositionAttitudeTransform's and do the positioning myself. Unfortunately, since I do not know the eventual dimensions of the text, doing a CENTER_CENTER alignment is practically impossible.

If I leave the alignment to be done by Text then a CENTER_CENTER alignment means that you can only pick the top left quarter of the text.

I have tried placing the text inside either a Geode or a Group but it makes no difference.

I would be very happy if I was simply not calling something I should be to initalise the Text or its container correctly.

We are using OSG 3.5.6 statically linked via VCPKG.

Any help gratefully received,

Thanks,

Brian[/code]
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11971

PostPosted: Tue Mar 20, 2018 2:33 pm    Post subject:
Problems with osgText::Text internal transformations and LineSegmentIntersector
Reply with quote

Hi Brian,

I checked into some fixes to osgText to improve the bounding box
calculations, these will have been after 3.5.6. Could you try the
OpenSceneGraph-3.6 branch as this is will be the source of the up
coming 3.6.0 stable release and contains lots of fixes since 3.5.6.

FYI, the whole 3.5.x series are developer releases that were building
up to the 3.6 branch that I made this morning, developer releases are
just snapshots of the development work, they are supported releases
like the stable releases.

Cheers,
Robert.

On 20 March 2018 at 10:46, Brian Hutchison <> wrote:
Quote:
Hi,

When I use any of the following methods to reposition osgText::Text the picking fails when used with LineSegmentIntersector.


Code:

text->setPosition() // anything other than {0.0,0.0,0.0}
text->setRotation() // anything other than osg::Quat(0.0, osg::Z_AXIS)
text->setAlignment() // anything other than LEFT_BOTTOM




As far as I can work out from debugging, the bounds are being correctly calculated and "intersectAndClip" is returning true. The problem seems to be when "drawable->accept" is called in the "intersect" method, the IntersectFunctor does not have the transformations that Text is using and the vertices passed to it are not transformed.

The only way I can find around this is to place the text inside PositionAttitudeTransform's and do the positioning myself. Unfortunately, since I do not know the eventual dimensions of the text, doing a CENTER_CENTER alignment is practically impossible.

If I leave the alignment to be done by Text then a CENTER_CENTER alignment means that you can only pick the top left quarter of the text.

I have tried placing the text inside either a Geode or a Group but it makes no difference.

I would be very happy if I was simply not calling something I should be to initalise the Text or its container correctly.

We are using OSG 3.5.6 statically linked via VCPKG.

Any help gratefully received,

Thanks,

Brian[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73137#73137








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
brianh
Newbie


Joined: 21 Dec 2017
Posts: 6

PostPosted: Wed Mar 21, 2018 9:06 am    Post subject:
Reply with quote

Hi Robert,

Thanks for the quick response. I will give that a try at some point and let you know if it helped.

Do you have a timescale for the release of 3.6.0?

Thanks,

Brian
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11971

PostPosted: Wed Mar 21, 2018 9:20 am    Post subject:
Problems with osgText::Text internal transformations and LineSegmentIntersector
Reply with quote

On 21 March 2018 at 09:06, Brian Hutchison <> wrote:
Quote:
Thanks for the quick response. I will give that a try at some point and let you know if it helped.

Do you have a timescale for the release of 5.6.0?

No timescale for 5.6.0, that could be in decades time as I haven't
even made 3.6.0 yet :-)

For 3.6.0 I'd like to get it out as soon as the community is able to
do the testing required to shake down the 3.6 branch to make sure it's
ready for release. All the features are in place now, so it's just a
case of build and runtime testing.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts osglight demo problems with Intel gra... eventhorizon5 General 2 Mon Jul 09, 2018 8:52 pm View latest post
No new posts massive text rendering OmegaDoom General 3 Mon Jul 09, 2018 12:14 pm View latest post
No new posts Why is osgText::Text very slow when i... OmegaDoom General 1 Wed Jul 04, 2018 5:31 am View latest post
No new posts setAxisAlignment(osgText::Text::SCREE... OmegaDoom General 1 Tue Jun 26, 2018 9:40 pm View latest post
No new posts LineSegmentIntersector::intersect + p... guyv General 3 Tue Jun 26, 2018 6:06 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP