Hi Yuting,

On Mon, 2004-11-08 at 11:51, Yuting Yang wrote:
> Hi
> 
> I try to retrieve all the primitives in osg::DVRGeometry, which inherits
> osg::Geometry. Below is my test code ( in each frame). But I got
> segmentation fault in the first frame no matter which iterator I am
> using. Am I using the right method. Thanks a lot for any help
> 
> 
> DVRVolumePtr vol;
> ......
> DVRGeometryPtr g = vol->getGeometry();

Do you check the pointer for NullFC here? Usually the Geometry is not
set.

> //PrimitiveIterator i = g->beginPrimitives(); 
> //std::cout << i.getClassname() << std::endl;
> 
> //FaceIterator i = g->beginFaces();
> //std::cout << i.getClassname() << std::endl;
>      
> TriangleIterator i = g->beginTriangles();
> std::cout << i.getClassname() << std::endl;

The DVRGeometry is primarily used to define clipping volumes. It's not
the Geometry of the slices or anything like that, these are created on
the fly and not stored anywhere.

Given that you want to prototype pre-intgrated volume rendering, it
might be more efficient to look at the Slices NodeCore. It's a very
simple Core that just renders view-oriented slices using whatever
Material/Shader you set it to. For prototyping that's much easier than
the integration into the full volume renderer. It would be nice to get
that too, but for getting started Slices are simpler.

Hope it helps

        Dirk




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to