Horizontal Displacement member in Newton.h

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Horizontal Displacement member in Newton.h

Postby Esharc » Wed Feb 05, 2020 2:11 am

Hello Julio,

I updated to the newest version of Newton, and noticed that I am getting illegal memory references when creating height fields. I then noticed that you removed horizontal displacement from the height fields, but did not remove the member from the struct definition in the Newton.h file.

When I removed these members from the Newton.h file then everything works as expected.

What is you commit procedure to the Github repo? Can I commit the changes or will you fix it on your side?
Esharc
 
Posts: 120
Joined: Tue Jan 10, 2017 5:23 am
Location: South Africa

Re: Horizontal Displacement member in Newton.h

Postby Julio Jerez » Wed Feb 05, 2020 10:55 am

oh I see, yes that's be a big bug teh struct would match
are like this now, thanks fixed.
Code: Select all
   
   typedef struct NewtonHeightFieldCollisionParam
   {
      int m_width;
      int m_height;
      int m_gridsDiagonals;
      int m_elevationDataType;   // 0 = 32 bit floats, 1 = unsigned 16 bit integers
      dFloat m_verticalScale;
      dFloat m_horizonalScale_x;
      dFloat m_horizonalScale_z;
      void* m_vertialElevation;
      char* m_atributes;
   } NewtonHeightFieldCollisionParam;

        struct dgHeightMapCollisionData
   {
      dgInt32 m_width;
      dgInt32 m_height;
      dgInt32 m_gridsDiagonals;
      dgInt32 m_elevationDataType;      // 0 = 32 bit floats, 1 = unsigned 16 bit intergers
      dgFloat32 m_verticalScale;
      dgFloat32 m_horizonalScale_x;
      dgFloat32 m_horizonalScale_z;
      void* m_elevation;
      dgInt8* m_atributes;
   };
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 4 guests

cron