Hello Guys,
To my original problem. I found a website which is quite useful and
works. Just in case others may need it.
http://delta3d.wiki.sourceforge.net/Accessing+Underlying+OpenSceneGraph+Geometry
Thank you!
Cheers,
Xin
--
Read this topic online here:
http://forum.o
Paul Melis wrote on Friday, May 29, 2009 9:55 AM:
> Thrall, Bryan wrote:
>> Paul Martz wrote on Thursday, May 28, 2009 4:50 PM:
>>
>>> You use a NodeVisitor to walk your scene graph and look for Geodes,
>>> then iterate over the Drawables that are attached to the Geodes,
using
>>> dynamic_cast to
Touché! :-)
Cheers,
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Thrall,
Bryan
Paul Martz wrote on Thursday, May 28, 200
Thrall, Bryan wrote:
Paul Martz wrote on Thursday, May 28, 2009 4:50 PM:
You use a NodeVisitor to walk your scene graph and look for Geodes,
then iterate over the Drawables that are attached to the Geodes, using
dynamic_cast to access the Drawable as a Geometry.
Even better, I notice o
Paul Martz wrote on Thursday, May 28, 2009 4:50 PM:
> You use a NodeVisitor to walk your scene graph and look for Geodes,
> then iterate over the Drawables that are attached to the Geodes, using
> dynamic_cast to access the Drawable as a Geometry.
Even better, I notice osg::Drawable has asGeometry
Just to kind of sum up what has been said here...
To get the vertices and other vertex attributes, you use get* methods in the
Geometry class. See the Geometry header file.
There could be dozens, possibly thousands of Geometry objects in your scene
graph. You use a NodeVisitor to walk your scene
Xin Chen wrote:
>Thanks for your reply. I did look at the source code to load .stl
> models. I found that there are _vertices and _normal variables in the source
> code. That's why I'm asking if there is a way to access those parameters. Any
> idea or sample code? Thank you.
I think
Jason Daly wrote:
If you really do need to get at the low-level data, you can use the
NodeVisitor method I described previously. You'll need to create a
class that inherits from osg::NodeVisitor and overrides the
apply(Geometry *) method to perform whatever operations you need on each
Geometr
2009/5/28 Xin Chen :
> Hello Ismail,
>
> Thanks for your reply. I did look at the source code to load .stl
> models. I found that there are _vertices and _normal variables in the source
> code. That's why I'm asking if there is a way to access those parameters. Any
> idea or sample code? T
Xin Chen wrote:
Thank you for the reply. I do need the vertices and faces. My
application is to load CAD model and simulate the projection (X-ray image) of
the model according to the materials. So the ability to access individual
vertices are important for my application. Any easy ways
ismailp wrote:
> 2009/5/28 Xin Chen <>:
>
> > Hi,
> >
> > I'm new to OSG. I use the following code to load my model, which is
> > successful. How can I access the vertices and faces of the model? Thank
> > you.
> >
> > nNode = osgDB::readNodeFile("D:/Livingroom.3DS");
> >
> >
> >
> >
Jason Daly wrote:
> Xin Chen wrote:
>
> > Hi,
> >
> > I'm new to OSG. I use the following code to load my model, which is
> > successful. How can I access the vertices and faces of the model? Thank
> > you.
> >
> > nNode = osgDB::readNodeFile("D:/Livingroom.3DS");
> >
> >
>
> Access them
2009/5/28 Xin Chen :
> Hi,
>
> I'm new to OSG. I use the following code to load my model, which is
> successful. How can I access the vertices and faces of the model? Thank you.
>
> nNode = osgDB::readNodeFile("D:/Livingroom.3DS");
>
>
>
>
>
> Thank you!
>
> Cheers,
> xinchen
>
> -
Xin Chen wrote:
Hi,
I'm new to OSG. I use the following code to load my model, which is successful. How can I access the vertices and faces of the model? Thank you.
nNode = osgDB::readNodeFile("D:/Livingroom.3DS");
Access them for what purpose?
When your model is loaded, a scene
14 matches
Mail list logo