SourceForge has been redesigned. Learn more.
Close

#88 dGeomHeightfieldSetHeightfieldData() sets the wrong data

general
closed
nobody
None
1
2012-12-28
2012-12-14
Luc
No

In heightfield.cpp at line 872, d should be replaced by m_p_data.

Discussion

  • Oleh Derevenko

    Oleh Derevenko - 2012-12-28

    Could you please use latest version from
    https://opende.svn.sourceforge.net/svnroot/opende/trunk

    And could you plese provide code fragment of what you mean? For me line 872 looks like this:
    void dGeomHeightfieldDataSetBounds( dHeightfieldDataID d, dReal minHeight, dReal maxHeight )
    {
    870> dUASSERT(d, "Argument not Heightfield data");
    871> d->m_fMinHeight = ( minHeight * d->m_fScale ) + d->m_fOffset - d->m_fThickness;
    872> d->m_fMaxHeight = ( maxHeight * d->m_fScale ) + d->m_fOffset;
    }

     
  • Luc

    Luc - 2012-12-28

    I am sorry for being so vague. Here is what I mean.
    At line 892 of https://opende.svn.sourceforge.net/svnroot/opende/trunk/ode/src/heightfield.cpp, you can read:

    void dGeomHeightfieldSetHeightfieldData( dGeomID g, dHeightfieldDataID d )
    {
        dxHeightfield* geom = (dxHeightfield*) g;
        geom->data = d;
    }
    

    But you actually expect:

     void dGeomHeightfieldSetHeightfieldData( dGeomID g, dHeightfieldDataID d )
    {
        dxHeightfield* geom = (dxHeightfield*) g;
        geom->m_p_data = d;
    } 
    
     
  • Oleh Derevenko

    Oleh Derevenko - 2012-12-28

    Fixed. Thank you for reporting it.

     
  • Oleh Derevenko

    Oleh Derevenko - 2012-12-28
    • status: open --> closed
     

Log in to post a comment.