Joint.DOF.loop ?

Developers
Pete
2016-02-27
2016-02-28
  • Pete

    Pete - 2016-02-27

    What is the purpose of the boolean variable Joint.DOF.loop?

    It is in the API and copying that to a DOF of a new Joint does not throw exceptions, but what does it do?

    -P-

     
    Last edit: Pete 2016-02-28
  • Peter Eastman

    Peter Eastman - 2016-02-27

    Basically, that determines whether there are limits enforced on the DOF, or whether it can freely rotate in one direction indefinitely, looping back to 0 when it passes 360. It gets used in routines like getClippedForce() and getForceScale() when deciding whether to restrict motion.

    Peter

     
  • Pete

    Pete - 2016-02-28

    Ok, loop turns false, when the min-max range of an angle is set to something else than -180° to +180°. For length loop is always false. Obviously it has no mening in there.

    I suppose the mechanism, that sets the value is not in the DOF class but in the editor? Say in a case if I'd want to use bones by a script, the script would have to set the loop-value as well? (Not that I was planning to, but you never know.)

    -P-

     
    Last edit: Pete 2016-02-28
  • Peter Eastman

    Peter Eastman - 2016-02-28

    It gets set in various places, some in Joint and some in the editor. But yes, if you modify the min and max fields directly, you should also set loop.

    Peter

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks