deltaluca

Untitled

Apr 2nd, 2012
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var line = new SymbolicConstraint("
  2.     body body1, body2
  3.     vector anchor1, anchor2, direction
  4.     scalar jointMin, jointMax
  5.    
  6.     limit jointMin (-inf) jointMax
  7.     limit |direction| eps inf
  8.  
  9.     constraint
  10.         let r1 = relative body1.rotation anchor1 in
  11.         let r2 = relative body2.rotation anchor2 in
  12.         let dir = unit(relative body1.rotation direction) in
  13.         let del = (r2 + body2.position) - (r1 + body1.position) in
  14.         { del cross dir
  15.         del dot dir }
  16.  
  17.     limit constraint { 0 jointMin } { 0 jointMax }
  18. ");
Advertisement
Add Comment
Please, Sign In to add comment