[osg-users] TriStripVisitor issue

Stephan Kussmaul stephan.kussmaul at triangraphics.de
Mon Nov 23 08:15:41 PST 2009


Hi Robert,

We are using OSG 2.8.2.

The problem we encountered was when the TriStripVisitor was used with 
double data (e.g. for OpenFlight with double precision). As far as I can 
remember in this case the wrong member function (remap(...))  in the 
base class was used. That's why we had to add those additional 
overloads. Otherwise we later encountered crashes with indices pointing 
to Nirvana.

-Stephan



Robert Osfield schrieb:
> HI Stephan,
>
> On Mon, Nov 23, 2009 at 2:31 PM, Stephan Kussmaul
> <stephan.kussmaul at triangraphics.de> wrote:
>   
>> We found a bug those days in TriStripVisitor.cpp. I didn't really read your
>> latest email, but this might be related to your precision issues:
>>     
>
> What bug was this?  Could you explain?  Which version of the OSG?
>
>   
>> class WriteValue : public osg::ConstValueVisitor
>> {
>>   ...
>>       // add those 3 lines
>>       virtual void apply(const Vec2d& v) { _o << v; }
>>       virtual void apply(const Vec3d& v) { _o << v; }
>>       virtual void apply(const Vec4d& v) { _o << v; }
>>   ...
>> }
>>
>> class RemapArray : public osg::ArrayVisitor
>> {
>>   ...
>>       // add those 3 lines
>>       virtual void apply(osg::Vec2dArray& array) { remap(array); }
>>       virtual void apply(osg::Vec3dArray& array) { remap(array); }
>>       virtual void apply(osg::Vec4dArray& array) { remap(array); }
>>   ...
>> }
>>     
>
> And these lines do what?  To address what issue?
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>   

-- 
-------------------------------------
Stephan Kussmaul
Geschaeftsfuehrender Gesellschafter / Managing Director
TrianGraphics GmbH
Schoenhauser Allee 45
10435 Berlin
Germany
Tel: +49 (0)30 48495565   FAX: +49 (0)30 48495581
Email: stephan.kussmaul at triangraphics.de
Web: www.triangraphics.de
-------------------------------------
Sitz der Gesellschaft / Corporate Headquarters:
TrianGraphics GmbH, Berlin
Registereintragung / Registration:
Amtsgericht Berlin-Charlottenburg HRB 93807 B
Geschaeftsfuehrer / Managing Directors:
Stephan Kussmaul, Mirco Nierenz, Volker Walkiewicz 




More information about the osg-users mailing list