← Back to team overview

yade-dev team mailing list archive

Re: Inheritance and dispatching?

 

On 12/07/10 18:39, Václav Šmilauer wrote:
It doesn't use the closest apparently. If you want to make some tests,
you can checkout last commit (where bad dispatch is workarounded) and
uncomment the code for Gl1_ChainedCylinder, which is never called in
chained-cylinder-spring.py.
There is no Gl1_ChainedCylinder in the current code, so I could not
check.
It was "only" commented, but ok : it needed to think what/how to uncomment. I'll see if I can commit uncomments cleanly.

I added #ifdef YADE_OPENGL to GL-related ChainedCylinder stuff, instead
of making all the classes dependent on opengl (there is no reason for
that). I hope we will have no conflicts.
It was not really a problem for me as I don't see everything kept in common/DataClass/shape/Cylinder at the end, which makes no sense, but in splitted files instead. Having one class per file is better for browsing sometimes. Perhaps Gl1_Cylinder and Gl1_Chained in the same file would not chock me, but there is clearly too much code in Cylinder.hpp/cpp now IMO).
I will commit, along with an updated scripts/test/dispatcher-torture.py
script, which gives this now (some dispatches are ambiguous because it
gives all the functors available to the dispatcher):

http://beta.arcig.cz/~eudoxos/temp/dispatch.html

You will commit what, sorry? Yes, the problem with GL dispatching is that it's the only one you cannot tune from python script (putting wanted functors one by one). Actually this alone would let me solve the problem for now (as long as there are no single and chained cylinders in simulation at the same time - which will happen sooner that never...).

Bruno




Follow ups

References