[osg-users] Load an obj file and mapping a given vertex to its Texture coordinates

2018-08-08 Thread Mike Blakefiled
Hi everyone, I'm new here.

I load an obj file with osgDB::readNodeFile("my.obj") and add it to my scene.
now, given a vertex Id, I'd like to be able to get its UV/Texture coordinate.

I can see that osg::Geometry has a getTexCoordArray() method, but dynamically 
casting my node to org::Geometry crashes the program. 
moreover, according to the docs,  getTexCoordArray() simply returns a pointer 
to osg::Array, and it's unclear what type the elements of that array is 
(osg::Vec2?)
... 

Thank you!

Cheers,
mike

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Load an obj file and mapping a given vertex to its Texture coordinates

2018-08-08 Thread Werner Modenbach
Hi Mike,

the loaded node isn't just a single node but a treelike structure where
your actual geode(s) is/are located somewhere in the structure.
What you mean by vertex Id? Each geode contains 1 or more drawables and
each drawable contains a vertex array and eventually texCoordArray(s).

So you have to identify the geode your vertex is in. Then you can try to
dynamic_cast. Anyway you need to check if your cast returned 0.

The next problem is the osg::Array. I didn't find a solution for that so
far. If you kno

Am 06.08.2018 um 16:27 schrieb Mike Blakefiled:
> Hi everyone, I'm new here.
>
> I load an obj file with osgDB::readNodeFile("my.obj") and add it to my scene.
> now, given a vertex Id, I'd like to be able to get its UV/Texture coordinate.
>
> I can see that osg::Geometry has a getTexCoordArray() method, but dynamically 
> casting my node to org::Geometry crashes the program. 
> moreover, according to the docs,  getTexCoordArray() simply returns a pointer 
> to osg::Array, and it's unclear what type the elements of that array is 
> (osg::Vec2?)
> ... 
>
> Thank you!
>
> Cheers,
> mike
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74473#74473
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Is the Alphapixel OSG binaries download server down

2018-08-08 Thread John Richardson
The Alphapixel [http://alphapixel.com/osg-binaries/] visit out downloads
server link for binaries times out.

Just curious on the status of the downloads.

John

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org