[ODE] Re: Capped Cylinder - trimesh collider - FIXED!!!

Nguyen Binh ngbinh at glassegg.com
Fri Apr 16 09:55:06 MST 2004


Hi Adam,

   So as in my previous mail to you and Russ, I had stated that we
   really need a "coding style" guide for ODE contributors. I know
   it's not fun for real programmers but it's important for large
   project.

ADM> Just some nit-pick requests until I get to try/apply it, in
ADM> case you get started on porting the other colliders with the
ADM> same template:

ADM> 1) Please replace 'SUBSTRACT' with 'SUBTRACT' (I see this has
ADM> bled over from collision_trimesh_box.cpp :) )

     :). I didn't try to think about the spelling.
     
ADM> 2) Please don't use 'inline' so generously (almost every
ADM> function in collision_trimesh_ccylinder.cpp has been declared
ADM> inline!), and declare the non-exported functions static.

     Hmm...! Could you please explain? I do think that inline
     is good for small function.
     
ADM> 3) Stylistically it hurts to see so many globals... I don't
ADM> really know what to say about that.
     Yes, I don't like it either. But I don't see any other way to get
     through though. Moreover, I just focus on the performance side of
     the code and globals don't hurt performance...

ADM> 4) Many macros are shared with collision_trimesh_box.cpp
ADM> (which makes sense) -- since I imagine that more such colliders
ADM> are coming, it's probably a good idea to split these out to
ADM> a common .h until the day they get completely absorbed into ODE's
ADM> utility layers.

     That's what I do now. As I take the work of porting Croteam's
     flat ended cylinder I will do it more systematic.
     
ADM> 5) Some of those macros aren't used. :)
     :) . Click..click..copy..and paste.
     
ADM> 6) Most of those macros aren't syntactically safe to use as...

     Hmm.... OK. You are right! Unsafe macros are potentially
     very hard to find errors.

-- 
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