[ODE] "New" C++ memory alloc problem

Nguyen Binh ngbinh at glassegg.com
Tue Oct 7 15:35:47 MST 2003


RI> i'm using ODE to my aplication and have the following problem:
RI> dGeonID *pointer_to_geon;
RI> pointer_to_geon = new dGeonID[num_geons];

    Take a look in common.h
    typedef struct dxGeom *dGeomID;
    So why would you do that?
    dGeomID is just a 4 byte pointer to a real dxGeom.

    Try to use ODE function to create Geom like
    dGeomID dSphere = dCreateSphere(), etc...
 
RI> ok. everything seen to be fine when the number of geons are 100, 200, 300...but when it reaches 800 this line generate 0x00000 in the pointer, so a NULL pointer. A test like:
RI> if ((pointer_to_geon = new dGeonID[num_geons]) == NULL) 
RI> is true if num_geons >= 800. its strange becouse to 100, 200 and so it works. What is the problem ?? does someone knows?..any suggestions?
 
RI> Another question. I have made a car like buggy demo. but i figure out that i have to use the inverse matriz to draw the scene to get the things right. if i do not inverse the rotation matriz the
RI> whells seen to spin in the wrong side. and everything seen to me inverse. I'm using OpenGL. So my question is. Does i have to use the inverse matriz really???

    Take a closer look at ODE docs. I remember Russ had  clear
    discriptions of vector and matrix used in ODE
    
RI> sorry for the poor english...thanks ....any help would be great.




-- 
Best regards,

---------------------------------------------------------------------
   Nguyen Binh
   Software Engineer
   Glass Egg Digital Media
   
   E.Town Building  
   7th Floor, 364 CongHoa Street
   Tan Binh District,
   HoChiMinh City,
   VietNam,

   Phone : +84 8 8109018
   Fax   : +84 8 8109013

     www.glassegg.com
---------------------------------------------------------------------



More information about the ODE mailing list