mul,trans,unsafemulmul (7.55e-01)
slerp (9.26e-02)
dot (4.33e-02)
q (2.82e-02)
cross (1.22e-02)
out (1.00e-02)
trans (5.65e-03)
set (4.30e-03)
to (4.17e-03)
get (2.14e-03)
<SENTENCE_START>
{
out
.
s
=
q
.
c
*
r
.
s
-
q
.
s
*
r
.
c
;
out
.
c
=
q
.
c
*
r
.
c
+
q
.
s
*
r
.
s
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
s
=
q
.
c
*
r
.
s
-
q
.
s
*
r
.
c
;
out
.
c
=
q
.
c
*
r
.
c
+
q
.
s
*
r
.
s
;
}
<SENTENCE_END/>
transcross (1.49e-01)
mul (1.48e-01)
out (1.43e-01)
trans (1.19e-01)
unsafe (8.19e-02)
%END% (7.80e-02)
lines (5.73e-02)
to (3.77e-02)
overlaps (2.88e-02)
rotational (2.56e-02)
<SENTENCE_START>
{
out
.
s
=
q
.
c
*
r
.
s
-
q
.
s
*
r
.
c
;
out
.
c
=
q
.
c
*
r
.
c
+
q
.
s
*
r
.
s
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
s
=
q
.
c
*
r
.
s
-
q
.
s
*
r
.
c
;
out
.
c
=
q
.
c
*
r
.
c
+
q
.
s
*
r
.
s
;
}
<SENTENCE_END/>
unsafemul (1.39e-01)
cross (1.38e-01)
out (1.29e-01)
trans (1.19e-01)
%END% (1.13e-01)
unsafe (8.09e-02)
lines (4.76e-02)
overlaps (3.63e-02)
to (3.45e-02)
rotational (2.75e-02)
<SENTENCE_START>
{
out
.
s
=
q
.
c
*
r
.
s
-
q
.
s
*
r
.
c
;
out
.
c
=
q
.
c
*
r
.
c
+
q
.
s
*
r
.
s
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
s
=
q
.
c
*
r
.
s
-
q
.
s
*
r
.
c
;
out
.
c
=
q
.
c
*
r
.
c
+
q
.
s
*
r
.
s
;
}
<SENTENCE_END/>
%END%mul (1.31e-01)
%END% (1.30e-01)
out (1.29e-01)
cross (1.22e-01)
trans (1.16e-01)
unsafe (8.04e-02)
overlaps (4.41e-02)
lines (4.23e-02)
to (3.52e-02)
rotational (3.02e-02)
<SENTENCE_START>
{
out
.
s
=
q
.
c
*
r
.
s
-
q
.
s
*
r
.
c
;
out
.
c
=
q
.
c
*
r
.
c
+
q
.
s
*
r
.
s
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
s
=
q
.
c
*
r
.
s
-
q
.
s
*
r
.
c
;
out
.
c
=
q
.
c
*
r
.
c
+
q
.
s
*
r
.
s
;
}
<SENTENCE_END/>
mul,to,outmulmul (7.76e-01)
dot (5.00e-02)
slerp (4.06e-02)
cross (2.77e-02)
to (1.40e-02)
out (9.81e-03)
trans (8.91e-03)
q (8.23e-03)
len (7.52e-03)
get (3.24e-03)
<SENTENCE_START>
{
float
tempy
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
float
tempy
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
toto (3.37e-01)
out (2.00e-01)
mul (7.69e-02)
%END% (6.46e-02)
trans (6.04e-02)
cross (4.77e-02)
unsafe (4.21e-02)
y (1.42e-02)
transform (1.13e-02)
dot (1.02e-02)
<SENTENCE_START>
{
float
tempy
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
float
tempy
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
outto (3.06e-01)
out (1.92e-01)
%END% (9.03e-02)
mul (7.01e-02)
trans (6.45e-02)
cross (4.97e-02)
unsafe (4.58e-02)
y (1.43e-02)
transform (1.20e-02)
dot (9.43e-03)
<SENTENCE_START>
{
float
tempy
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
float
tempy
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
%END%%END% (4.04e-01)
to (1.58e-01)
out (1.36e-01)
unsafe (6.39e-02)
trans (4.53e-02)
cross (2.25e-02)
y (1.41e-02)
mul (1.17e-02)
lines (8.37e-03)
transform (7.83e-03)
<SENTENCE_START>
{
float
tempy
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
float
tempy
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
mul,to,out,unsafemulmul (7.81e-01)
dot (7.98e-02)
slerp (5.05e-02)
q (2.24e-02)
cross (1.03e-02)
trans (5.90e-03)
len (4.57e-03)
out (4.49e-03)
to (3.11e-03)
get (2.68e-03)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
toto (1.44e-01)
%END% (1.40e-01)
out (1.39e-01)
mul (1.16e-01)
trans (9.17e-02)
cross (5.83e-02)
unsafe (5.05e-02)
dot (2.54e-02)
y (1.98e-02)
transform (1.48e-02)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
out%END% (1.62e-01)
out (1.37e-01)
to (1.32e-01)
mul (1.05e-01)
trans (9.53e-02)
cross (6.34e-02)
unsafe (5.34e-02)
dot (2.24e-02)
y (1.74e-02)
transform (1.49e-02)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
unsafe%END% (4.75e-01)
out (9.13e-02)
to (7.18e-02)
unsafe (6.39e-02)
trans (6.34e-02)
cross (3.74e-02)
mul (1.98e-02)
y (1.15e-02)
lines (1.04e-02)
transform (8.83e-03)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
%END%%END% (5.99e-01)
out (6.25e-02)
unsafe (5.17e-02)
to (5.10e-02)
trans (3.91e-02)
cross (2.33e-02)
y (1.48e-02)
lines (9.39e-03)
x (8.14e-03)
mul (8.07e-03)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
-
q
.
s
*
v
.
y
;
out
.
y
=
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
mul,transmulmul (7.86e-01)
dot (5.99e-02)
slerp (3.69e-02)
cross (1.72e-02)
len (1.12e-02)
to (1.01e-02)
q (9.98e-03)
out (9.68e-03)
trans (7.78e-03)
get (3.48e-03)
<SENTENCE_START>
{
final
float
tempy
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
final
float
tempy
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
transto (3.01e-01)
out (2.24e-01)
mul (8.70e-02)
%END% (6.96e-02)
trans (5.70e-02)
cross (4.34e-02)
unsafe (4.15e-02)
y (1.29e-02)
transform (1.19e-02)
dot (1.16e-02)
<SENTENCE_START>
{
final
float
tempy
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
final
float
tempy
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
%END%to (2.76e-01)
out (2.17e-01)
%END% (9.46e-02)
mul (7.84e-02)
trans (5.95e-02)
cross (4.44e-02)
unsafe (4.43e-02)
y (1.32e-02)
transform (1.27e-02)
dot (1.07e-02)
<SENTENCE_START>
{
final
float
tempy
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
final
float
tempy
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
tempy
;
}
<SENTENCE_END/>
mul,trans,unsafemulmul (7.61e-01)
dot (1.04e-01)
slerp (4.55e-02)
q (2.53e-02)
len (9.62e-03)
cross (8.28e-03)
trans (5.45e-03)
out (4.11e-03)
pick (2.51e-03)
to (2.41e-03)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
transmul (1.49e-01)
%END% (1.41e-01)
out (1.29e-01)
to (1.27e-01)
trans (8.44e-02)
cross (5.42e-02)
unsafe (4.82e-02)
dot (3.44e-02)
y (1.73e-02)
transform (1.38e-02)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
unsafe%END% (1.60e-01)
mul (1.32e-01)
out (1.31e-01)
to (1.20e-01)
trans (8.62e-02)
cross (6.03e-02)
unsafe (5.08e-02)
dot (2.94e-02)
y (1.58e-02)
transform (1.43e-02)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
%END%%END% (1.71e-01)
out (1.35e-01)
to (1.21e-01)
mul (1.19e-01)
trans (8.62e-02)
cross (6.13e-02)
unsafe (5.40e-02)
dot (2.60e-02)
y (1.48e-02)
transform (1.39e-02)
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
out
.
x
=
q
.
c
*
v
.
x
+
q
.
s
*
v
.
y
;
out
.
y
=
-
q
.
s
*
v
.
x
+
q
.
c
*
v
.
y
;
}
<SENTENCE_END/>
initializeinitializemain (4.81e-01)
run (3.35e-01)
create (1.01e-01)
initialize (1.11e-02)
set (5.60e-03)
setup (5.06e-03)
on (4.97e-03)
loop (3.07e-03)
init (2.95e-03)
%UNK% (2.88e-03)
<SENTENCE_START>
{
main
loop
thread
=
new
thread
(
"HeadlessApplication"
)
{
@
override
public
void
run
(
)
{
try
{
headless
application
.
this
.
main
loop
(
)
;
}
catch
(
throwable
t
)
{
if
(
t
instanceof
runtime
exception
)
throw
(
runtime
exception
)
t
;
else
throw
new
gdx
runtime
exception
(
t
)
;
}
}
}
;
main
loop
thread
.
start
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
main
loop
thread
=
new
thread
(
"HeadlessApplication"
)
{
@
override
public
void
run
(
)
{
try
{
headless
application
.
this
.
main
loop
(
)
;
}
catch
(
throwable
t
)
{
if
(
t
instanceof
runtime
exception
)
throw
(
runtime
exception
)
t
;
else
throw
new
gdx
runtime
exception
(
t
)
;
}
}
}
;
main
loop
thread
.
start
(
)
;
}
<SENTENCE_END/>
%END%%END% (6.11e-01)
main (7.68e-02)
run (4.64e-02)
%UNK% (3.46e-02)
test (1.62e-02)
create (1.24e-02)
loop (1.13e-02)
on (5.03e-03)
pixels (4.66e-03)
start (4.31e-03)
<SENTENCE_START>
{
main
loop
thread
=
new
thread
(
"HeadlessApplication"
)
{
@
override
public
void
run
(
)
{
try
{
headless
application
.
this
.
main
loop
(
)
;
}
catch
(
throwable
t
)
{
if
(
t
instanceof
runtime
exception
)
throw
(
runtime
exception
)
t
;
else
throw
new
gdx
runtime
exception
(
t
)
;
}
}
}
;
main
loop
thread
.
start
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
main
loop
thread
=
new
thread
(
"HeadlessApplication"
)
{
@
override
public
void
run
(
)
{
try
{
headless
application
.
this
.
main
loop
(
)
;
}
catch
(
throwable
t
)
{
if
(
t
instanceof
runtime
exception
)
throw
(
runtime
exception
)
t
;
else
throw
new
gdx
runtime
exception
(
t
)
;
}
}
}
;
main
loop
thread
.
start
(
)
;
}
<SENTENCE_END/>
main,loopmainrender (1.54e-01)
%UNK% (6.28e-02)
update (5.21e-02)
%END% (4.59e-02)
run (4.28e-02)
end (2.98e-02)
get (2.32e-02)
on (2.14e-02)
resume (1.67e-02)
setup (1.63e-02)
<SENTENCE_START>
{
array
<
lifecycle
listener
>
lifecycle
listeners
=
this
.
lifecycle
listeners
;
listener
.
create
(
)
;
boolean
was
active
=
true
;
long
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
if
(
render
interval
>=
0f
)
{
while
(
running
)
{
final
long
n
=
time
utils
.
nano
time
(
)
;
if
(
t
>
n
)
{
try
{
thread
.
sleep
(
(
t
-
n
)
/
1000000
)
;
}
catch
(
interrupted
exception
e
)
{
}
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
}
else
t
=
n
+
render
interval
;
execute
runnables
(
)
;
graphics
.
increment
frame
id
(
)
;
listener
.
render
(
)
;
graphics
.
update
time
(
)
;
if
(
!
running
)
break
;
}
}
synchronized
(
lifecycle
listeners
)
{
for
(
lifecycle
listener
listener
:
lifecycle
listeners
)
{
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
}
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
array
<
lifecycle
listener
>
lifecycle
listeners
=
this
.
lifecycle
listeners
;
listener
.
create
(
)
;
boolean
was
active
=
true
;
long
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
if
(
render
interval
>=
0f
)
{
while
(
running
)
{
final
long
n
=
time
utils
.
nano
time
(
)
;
if
(
t
>
n
)
{
try
{
thread
.
sleep
(
(
t
-
n
)
/
1000000
)
;
}
catch
(
interrupted
exception
e
)
{
}
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
}
else
t
=
n
+
render
interval
;
execute
runnables
(
)
;
graphics
.
increment
frame
id
(
)
;
listener
.
render
(
)
;
graphics
.
update
time
(
)
;
if
(
!
running
)
break
;
}
}
synchronized
(
lifecycle
listeners
)
{
for
(
lifecycle
listener
listener
:
lifecycle
listeners
)
{
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
}
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
<SENTENCE_END/>
loop%END% (4.71e-01)
increment (1.68e-01)
interval (4.17e-02)
render (3.36e-02)
frame (2.35e-02)
time (1.40e-02)
t (8.36e-03)
nano (8.20e-03)
%UNK% (7.37e-03)
listener (6.86e-03)
<SENTENCE_START>
{
array
<
lifecycle
listener
>
lifecycle
listeners
=
this
.
lifecycle
listeners
;
listener
.
create
(
)
;
boolean
was
active
=
true
;
long
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
if
(
render
interval
>=
0f
)
{
while
(
running
)
{
final
long
n
=
time
utils
.
nano
time
(
)
;
if
(
t
>
n
)
{
try
{
thread
.
sleep
(
(
t
-
n
)
/
1000000
)
;
}
catch
(
interrupted
exception
e
)
{
}
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
}
else
t
=
n
+
render
interval
;
execute
runnables
(
)
;
graphics
.
increment
frame
id
(
)
;
listener
.
render
(
)
;
graphics
.
update
time
(
)
;
if
(
!
running
)
break
;
}
}
synchronized
(
lifecycle
listeners
)
{
for
(
lifecycle
listener
listener
:
lifecycle
listeners
)
{
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
}
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
array
<
lifecycle
listener
>
lifecycle
listeners
=
this
.
lifecycle
listeners
;
listener
.
create
(
)
;
boolean
was
active
=
true
;
long
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
if
(
render
interval
>=
0f
)
{
while
(
running
)
{
final
long
n
=
time
utils
.
nano
time
(
)
;
if
(
t
>
n
)
{
try
{
thread
.
sleep
(
(
t
-
n
)
/
1000000
)
;
}
catch
(
interrupted
exception
e
)
{
}
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
}
else
t
=
n
+
render
interval
;
execute
runnables
(
)
;
graphics
.
increment
frame
id
(
)
;
listener
.
render
(
)
;
graphics
.
update
time
(
)
;
if
(
!
running
)
break
;
}
}
synchronized
(
lifecycle
listeners
)
{
for
(
lifecycle
listener
listener
:
lifecycle
listeners
)
{
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
}
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
<SENTENCE_END/>
%END%%END% (7.37e-01)
frame (3.93e-02)
interval (1.71e-02)
increment (1.28e-02)
time (1.14e-02)
render (1.05e-02)
t (8.16e-03)
listener (7.81e-03)
id (7.16e-03)
runnables (4.70e-03)
<SENTENCE_START>
{
array
<
lifecycle
listener
>
lifecycle
listeners
=
this
.
lifecycle
listeners
;
listener
.
create
(
)
;
boolean
was
active
=
true
;
long
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
if
(
render
interval
>=
0f
)
{
while
(
running
)
{
final
long
n
=
time
utils
.
nano
time
(
)
;
if
(
t
>
n
)
{
try
{
thread
.
sleep
(
(
t
-
n
)
/
1000000
)
;
}
catch
(
interrupted
exception
e
)
{
}
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
}
else
t
=
n
+
render
interval
;
execute
runnables
(
)
;
graphics
.
increment
frame
id
(
)
;
listener
.
render
(
)
;
graphics
.
update
time
(
)
;
if
(
!
running
)
break
;
}
}
synchronized
(
lifecycle
listeners
)
{
for
(
lifecycle
listener
listener
:
lifecycle
listeners
)
{
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
}
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
array
<
lifecycle
listener
>
lifecycle
listeners
=
this
.
lifecycle
listeners
;
listener
.
create
(
)
;
boolean
was
active
=
true
;
long
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
if
(
render
interval
>=
0f
)
{
while
(
running
)
{
final
long
n
=
time
utils
.
nano
time
(
)
;
if
(
t
>
n
)
{
try
{
thread
.
sleep
(
(
t
-
n
)
/
1000000
)
;
}
catch
(
interrupted
exception
e
)
{
}
t
=
time
utils
.
nano
time
(
)
+
render
interval
;
}
else
t
=
n
+
render
interval
;
execute
runnables
(
)
;
graphics
.
increment
frame
id
(
)
;
listener
.
render
(
)
;
graphics
.
update
time
(
)
;
if
(
!
running
)
break
;
}
}
synchronized
(
lifecycle
listeners
)
{
for
(
lifecycle
listener
listener
:
lifecycle
listeners
)
{
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
}
listener
.
pause
(
)
;
listener
.
dispose
(
)
;
}
<SENTENCE_END/>
execute,runnablesexecuteexecute (8.45e-01)
process (5.19e-02)
runnables (3.19e-02)
main (1.96e-02)
executed (9.22e-03)
i (2.52e-03)
run (1.28e-03)
size (1.07e-03)
return (9.33e-04)
get (8.63e-04)
<SENTENCE_START>
{
synchronized
(
runnables
)
{
for
(
int
i
=
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
add
(
runnables
.
get
(
i
)
)
;
runnables
.
clear
(
)
;
}
if
(
executed
runnables
.
size
==
0
)
return
false
;
for
(
int
i
=
executed
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
remove
index
(
i
)
.
run
(
)
;
return
true
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
synchronized
(
runnables
)
{
for
(
int
i
=
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
add
(
runnables
.
get
(
i
)
)
;
runnables
.
clear
(
)
;
}
if
(
executed
runnables
.
size
==
0
)
return
false
;
for
(
int
i
=
executed
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
remove
index
(
i
)
.
run
(
)
;
return
true
;
}
<SENTENCE_END/>
runnablesrunnables (3.96e-01)
%END% (2.34e-01)
execute (2.14e-01)
executed (1.77e-02)
process (1.12e-02)
i (4.30e-03)
and (4.23e-03)
all (3.11e-03)
%UNK% (2.87e-03)
main (2.53e-03)
<SENTENCE_START>
{
synchronized
(
runnables
)
{
for
(
int
i
=
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
add
(
runnables
.
get
(
i
)
)
;
runnables
.
clear
(
)
;
}
if
(
executed
runnables
.
size
==
0
)
return
false
;
for
(
int
i
=
executed
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
remove
index
(
i
)
.
run
(
)
;
return
true
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
synchronized
(
runnables
)
{
for
(
int
i
=
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
add
(
runnables
.
get
(
i
)
)
;
runnables
.
clear
(
)
;
}
if
(
executed
runnables
.
size
==
0
)
return
false
;
for
(
int
i
=
executed
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
remove
index
(
i
)
.
run
(
)
;
return
true
;
}
<SENTENCE_END/>
%END%%END% (8.81e-01)
runnables (1.49e-02)
all (6.27e-03)
execute (4.96e-03)
and (3.52e-03)
size (3.32e-03)
i (1.77e-03)
get (1.65e-03)
string (1.54e-03)
for (1.21e-03)
<SENTENCE_START>
{
synchronized
(
runnables
)
{
for
(
int
i
=
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
add
(
runnables
.
get
(
i
)
)
;
runnables
.
clear
(
)
;
}
if
(
executed
runnables
.
size
==
0
)
return
false
;
for
(
int
i
=
executed
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
remove
index
(
i
)
.
run
(
)
;
return
true
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
synchronized
(
runnables
)
{
for
(
int
i
=
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
add
(
runnables
.
get
(
i
)
)
;
runnables
.
clear
(
)
;
}
if
(
executed
runnables
.
size
==
0
)
return
false
;
for
(
int
i
=
executed
runnables
.
size
-
1
;
i
>=
0
;
i
--
)
executed
runnables
.
remove
index
(
i
)
.
run
(
)
;
return
true
;
}
<SENTENCE_END/>
get,c,ptrgetget (9.83e-01)
c (4.72e-03)
obj (1.88e-03)
swig (1.36e-03)
is (8.93e-04)
return (8.85e-04)
ptr (5.54e-04)
0 (3.63e-04)
null (3.14e-04)
obtain (2.82e-04)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
cc (9.96e-01)
ptr (2.00e-03)
get (1.04e-03)
%END% (8.72e-04)
swig (1.90e-04)
instance (1.07e-04)
overlaps (3.51e-05)
derived (2.62e-05)
match (7.06e-06)
is (6.12e-06)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
ptrptr (9.96e-01)
c (2.15e-03)
%END% (1.61e-03)
obj (1.88e-05)
0 (6.12e-06)
get (6.07e-06)
return (5.61e-06)
string (2.74e-06)
instance (2.57e-06)
swig (2.31e-06)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
%END%%END% (9.61e-01)
ptr (3.23e-02)
obj (8.25e-04)
c (4.05e-04)
return (2.33e-04)
string (2.06e-04)
double (1.33e-04)
at (1.02e-04)
0 (9.89e-05)
swig (5.39e-05)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
set,flagssetset (9.83e-01)
flags (1.31e-02)
data (2.03e-03)
info (1.72e-04)
this (1.13e-04)
c (1.06e-04)
ptr (1.02e-04)
collision (8.85e-05)
jni (7.75e-05)
swig (5.98e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
flagsflags (9.98e-01)
set (2.04e-03)
data (1.32e-04)
get (2.55e-06)
value (9.41e-07)
collision (6.17e-07)
this (5.89e-07)
c (4.87e-07)
ptr (4.61e-07)
%END% (2.62e-07)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
%END%%END% (9.87e-01)
set (4.23e-03)
flags (2.01e-03)
collision (3.49e-04)
swig (3.44e-04)
value (3.32e-04)
jni (2.98e-04)
%UNK% (2.58e-04)
c (2.30e-04)
data (1.63e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
get,flagsgetget (9.84e-01)
flags (1.19e-02)
data (2.13e-03)
info (1.84e-04)
return (1.35e-04)
c (1.18e-04)
ptr (1.13e-04)
collision (9.97e-05)
jni (6.39e-05)
swig (5.60e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
flagsflags (9.97e-01)
get (2.56e-03)
data (9.35e-05)
set (3.84e-06)
collision (1.26e-06)
ptr (6.76e-07)
return (6.37e-07)
this (5.60e-07)
c (4.92e-07)
append (4.76e-07)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
%END%%END% (9.84e-01)
get (5.23e-03)
flags (2.14e-03)
jni (5.29e-04)
collision (5.08e-04)
c (4.49e-04)
swig (4.49e-04)
return (3.22e-04)
ptr (3.22e-04)
%UNK% (2.51e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
set,edge,v,0,v,1,anglesetset (9.69e-01)
edge (1.41e-02)
v (4.59e-03)
data (3.69e-03)
angle (2.53e-03)
1 (1.58e-03)
0 (8.22e-04)
info (5.47e-04)
collision (3.15e-04)
triangle (1.94e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
edgev (6.45e-01)
edge (3.51e-01)
%END% (3.33e-03)
0 (6.70e-04)
set (1.09e-04)
data (3.96e-05)
2 (1.64e-05)
ray (1.18e-05)
get (1.18e-05)
angle (7.59e-06)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v0 (7.01e-01)
v (2.94e-01)
%END% (3.74e-03)
edge (5.84e-04)
1 (3.72e-04)
angle (6.29e-05)
ptr (3.79e-05)
triangle (3.69e-05)
this (3.11e-05)
c (2.75e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
0v (4.64e-01)
0 (4.07e-01)
1 (6.42e-02)
%END% (3.15e-02)
angle (2.20e-02)
set (3.27e-03)
triangle (9.16e-04)
ptr (5.98e-04)
this (5.26e-04)
edge (5.10e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v%END% (5.47e-01)
angle (2.43e-01)
1 (8.56e-02)
set (4.73e-02)
v (4.69e-02)
0 (1.12e-02)
triangle (2.16e-03)
info (1.25e-03)
ptr (9.87e-04)
jni (8.77e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
1%END% (8.68e-01)
angle (8.36e-02)
set (2.29e-02)
1 (1.48e-02)
v (3.10e-03)
triangle (6.88e-04)
info (5.50e-04)
0 (4.13e-04)
ptr (2.72e-04)
jni (2.43e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
angle%END% (8.68e-01)
angle (8.38e-02)
set (2.30e-02)
1 (1.48e-02)
v (3.08e-03)
triangle (6.88e-04)
info (5.50e-04)
0 (4.10e-04)
ptr (2.72e-04)
jni (2.43e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
%END%%END% (8.78e-01)
angle (7.82e-02)
set (2.25e-02)
1 (1.14e-02)
v (2.19e-03)
triangle (6.22e-04)
info (4.65e-04)
0 (3.33e-04)
data (2.61e-04)
ptr (2.49e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
get,edge,v,0,v,1,anglegetget (9.76e-01)
edge (9.40e-03)
v (3.71e-03)
angle (2.53e-03)
data (2.20e-03)
1 (1.80e-03)
0 (6.96e-04)
return (4.95e-04)
collision (4.13e-04)
info (3.31e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
edgev (6.95e-01)
edge (3.00e-01)
%END% (3.27e-03)
0 (7.58e-04)
get (4.75e-04)
2 (4.28e-05)
is (3.40e-05)
data (3.09e-05)
ray (3.07e-05)
set (2.88e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v0 (7.12e-01)
v (2.84e-01)
%END% (3.34e-03)
1 (4.01e-04)
edge (3.42e-04)
angle (6.82e-05)
ptr (4.99e-05)
jni (3.81e-05)
c (2.76e-05)
this (2.43e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
0v (4.43e-01)
0 (3.91e-01)
1 (8.46e-02)
%END% (3.88e-02)
angle (2.85e-02)
get (4.96e-03)
ptr (1.04e-03)
jni (7.14e-04)
triangle (6.83e-04)
c (5.47e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v%END% (6.03e-01)
angle (1.93e-01)
1 (8.52e-02)
get (4.73e-02)
v (4.26e-02)
0 (1.03e-02)
triangle (1.55e-03)
ptr (1.31e-03)
info (1.01e-03)
jni (7.73e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
1%END% (8.88e-01)
angle (6.45e-02)
get (2.17e-02)
1 (1.49e-02)
v (3.05e-03)
triangle (5.35e-04)
info (4.94e-04)
0 (4.19e-04)
ptr (3.68e-04)
c (2.15e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
angle%END% (8.88e-01)
angle (6.47e-02)
get (2.17e-02)
1 (1.49e-02)
v (3.06e-03)
triangle (5.35e-04)
info (4.95e-04)
0 (4.20e-04)
ptr (3.68e-04)
c (2.15e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
%END%%END% (8.97e-01)
angle (6.04e-02)
get (2.15e-02)
1 (1.20e-02)
v (2.27e-03)
triangle (4.92e-04)
info (4.25e-04)
0 (3.43e-04)
ptr (3.41e-04)
data (2.11e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
set,edge,v,1,v,2,anglesetset (9.70e-01)
edge (1.22e-02)
data (3.91e-03)
v (3.74e-03)
angle (3.53e-03)
2 (1.90e-03)
1 (7.08e-04)
info (6.53e-04)
collision (3.18e-04)
triangle (2.34e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
edgeedge (5.09e-01)
v (4.86e-01)
%END% (3.79e-03)
set (2.63e-04)
1 (2.61e-04)
data (5.46e-05)
2 (3.84e-05)
angle (2.87e-05)
ray (2.24e-05)
get (1.83e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v1 (6.26e-01)
v (3.68e-01)
%END% (4.35e-03)
edge (8.41e-04)
2 (1.86e-04)
angle (6.92e-05)
triangle (4.92e-05)
ptr (4.11e-05)
this (3.14e-05)
c (2.88e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
11 (4.88e-01)
v (3.65e-01)
2 (4.37e-02)
%END% (4.23e-02)
angle (3.57e-02)
set (1.05e-02)
triangle (1.88e-03)
ptr (9.30e-04)
jni (9.04e-04)
this (8.38e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v%END% (6.07e-01)
angle (2.24e-01)
set (8.06e-02)
2 (3.90e-02)
v (2.36e-02)
1 (7.48e-03)
triangle (2.09e-03)
info (1.27e-03)
ptr (8.02e-04)
jni (7.67e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
2%END% (8.73e-01)
angle (7.42e-02)
set (3.46e-02)
2 (8.42e-03)
v (2.14e-03)
triangle (6.47e-04)
info (5.15e-04)
1 (3.92e-04)
ptr (2.26e-04)
bt (2.22e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
angle%END% (8.73e-01)
angle (7.42e-02)
set (3.49e-02)
2 (8.31e-03)
v (2.09e-03)
triangle (6.43e-04)
info (5.13e-04)
1 (3.83e-04)
ptr (2.24e-04)
bt (2.21e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
%END%%END% (8.76e-01)
angle (7.25e-02)
set (3.42e-02)
2 (8.04e-03)
v (1.99e-03)
triangle (6.26e-04)
info (5.01e-04)
1 (3.61e-04)
ptr (2.18e-04)
bt (2.16e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
get,edge,v,1,v,2,anglegetget (9.77e-01)
edge (7.67e-03)
angle (3.70e-03)
v (2.84e-03)
data (2.25e-03)
2 (2.21e-03)
1 (5.63e-04)
return (5.34e-04)
collision (4.11e-04)
info (4.07e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
edgeedge (5.03e-01)
v (4.91e-01)
%END% (3.70e-03)
get (8.48e-04)
1 (2.55e-04)
2 (9.41e-05)
angle (6.05e-05)
set (5.83e-05)
ray (5.54e-05)
data (5.06e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v1 (6.16e-01)
v (3.79e-01)
%END% (3.94e-03)
edge (5.53e-04)
2 (1.77e-04)
angle (7.16e-05)
ptr (5.16e-05)
jni (4.34e-05)
get (3.03e-05)
c (3.00e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
11 (4.75e-01)
v (3.39e-01)
2 (5.34e-02)
%END% (5.20e-02)
angle (4.58e-02)
get (1.70e-02)
ptr (1.58e-03)
triangle (1.52e-03)
jni (1.38e-03)
c (9.00e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v%END% (6.55e-01)
angle (1.80e-01)
get (8.28e-02)
2 (3.69e-02)
v (2.02e-02)
1 (6.75e-03)
triangle (1.59e-03)
info (1.13e-03)
ptr (1.04e-03)
jni (7.19e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
2%END% (8.89e-01)
angle (5.89e-02)
get (3.38e-02)
2 (8.39e-03)
v (2.01e-03)
triangle (5.31e-04)
info (4.98e-04)
1 (3.86e-04)
ptr (2.97e-04)
bt (2.20e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
angle%END% (8.89e-01)
angle (5.89e-02)
get (3.40e-02)
2 (8.31e-03)
v (1.98e-03)
triangle (5.29e-04)
info (4.98e-04)
1 (3.79e-04)
ptr (2.96e-04)
bt (2.20e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
%END%%END% (8.91e-01)
angle (5.75e-02)
get (3.34e-02)
2 (8.07e-03)
v (1.89e-03)
triangle (5.17e-04)
info (4.88e-04)
1 (3.59e-04)
ptr (2.88e-04)
bt (2.15e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
set,edge,v,2,v,0,anglesetset (9.77e-01)
edge (7.14e-03)
v (3.87e-03)
data (2.49e-03)
angle (2.44e-03)
0 (1.94e-03)
2 (9.99e-04)
info (5.09e-04)
collision (3.76e-04)
triangle (2.25e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
edgeedge (7.95e-01)
v (2.00e-01)
%END% (4.85e-03)
2 (2.03e-04)
data (5.40e-05)
set (3.71e-05)
0 (2.90e-05)
angle (2.18e-05)
ray (1.34e-05)
get (8.03e-06)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
vv (4.97e-01)
2 (4.86e-01)
%END% (1.02e-02)
0 (3.02e-03)
angle (1.63e-03)
edge (1.33e-03)
ptr (7.38e-05)
triangle (6.60e-05)
c (5.33e-05)
set (5.01e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
22 (4.31e-01)
v (2.01e-01)
angle (1.87e-01)
%END% (9.18e-02)
0 (5.93e-02)
set (1.73e-02)
triangle (1.23e-03)
ptr (8.59e-04)
jni (7.60e-04)
edge (7.04e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v%END% (7.60e-01)
angle (1.72e-01)
set (3.93e-02)
0 (9.24e-03)
v (6.39e-03)
2 (5.62e-03)
triangle (7.54e-04)
info (4.45e-04)
jni (3.66e-04)
edge (3.57e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
0%END% (9.26e-01)
angle (4.85e-02)
set (1.87e-02)
0 (1.71e-03)
2 (7.38e-04)
v (6.92e-04)
triangle (3.00e-04)
info (2.35e-04)
data (1.44e-04)
edge (1.39e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
angle%END% (9.25e-01)
angle (4.86e-02)
set (1.89e-02)
0 (1.68e-03)
2 (7.34e-04)
v (6.79e-04)
triangle (2.99e-04)
info (2.34e-04)
data (1.44e-04)
edge (1.38e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
%END%%END% (9.28e-01)
angle (4.69e-02)
set (1.89e-02)
0 (1.53e-03)
2 (6.95e-04)
v (6.08e-04)
triangle (2.88e-04)
info (2.26e-04)
data (1.45e-04)
edge (1.37e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
get,edge,v,2,v,0,anglegetget (9.83e-01)
edge (4.14e-03)
v (2.66e-03)
angle (2.31e-03)
0 (2.00e-03)
data (1.31e-03)
2 (6.93e-04)
return (5.39e-04)
collision (4.74e-04)
info (2.87e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
edgeedge (7.92e-01)
v (2.00e-01)
%END% (6.95e-03)
2 (2.43e-04)
get (1.77e-04)
0 (5.11e-05)
data (4.85e-05)
angle (4.48e-05)
ray (4.46e-05)
collision (3.65e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
vv (5.07e-01)
2 (4.75e-01)
%END% (1.07e-02)
0 (2.88e-03)
angle (1.86e-03)
edge (8.39e-04)
ptr (1.16e-04)
jni (8.21e-05)
get (6.85e-05)
c (6.75e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
22 (3.97e-01)
angle (2.06e-01)
v (1.73e-01)
%END% (1.26e-01)
0 (6.06e-02)
get (2.45e-02)
ptr (1.57e-03)
jni (1.22e-03)
triangle (8.81e-04)
c (6.76e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v%END% (8.11e-01)
angle (1.25e-01)
get (3.71e-02)
0 (8.33e-03)
v (5.61e-03)
2 (5.33e-03)
triangle (5.21e-04)
ptr (4.83e-04)
jni (3.58e-04)
info (3.53e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
0%END% (9.39e-01)
angle (3.61e-02)
get (1.73e-02)
0 (1.71e-03)
2 (9.14e-04)
v (7.15e-04)
triangle (2.28e-04)
info (2.11e-04)
ptr (1.79e-04)
edge (1.57e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
angle%END% (9.39e-01)
angle (3.62e-02)
get (1.75e-02)
0 (1.68e-03)
2 (9.10e-04)
v (7.05e-04)
triangle (2.27e-04)
info (2.11e-04)
ptr (1.78e-04)
edge (1.56e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
%END%%END% (9.41e-01)
angle (3.47e-02)
get (1.74e-02)
0 (1.54e-03)
2 (8.67e-04)
v (6.36e-04)
triangle (2.20e-04)
info (2.05e-04)
ptr (1.70e-04)
edge (1.53e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
data
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
get,c,ptrgetget (9.83e-01)
c (4.72e-03)
obj (1.88e-03)
swig (1.36e-03)
is (8.93e-04)
return (8.85e-04)
ptr (5.54e-04)
0 (3.63e-04)
null (3.14e-04)
obtain (2.82e-04)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
cc (9.96e-01)
ptr (2.00e-03)
get (1.04e-03)
%END% (8.72e-04)
swig (1.90e-04)
instance (1.07e-04)
overlaps (3.51e-05)
derived (2.62e-05)
match (7.06e-06)
is (6.12e-06)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
ptrptr (9.96e-01)
c (2.15e-03)
%END% (1.61e-03)
obj (1.88e-05)
0 (6.12e-06)
get (6.07e-06)
return (5.61e-06)
string (2.74e-06)
instance (2.57e-06)
swig (2.31e-06)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
%END%%END% (9.61e-01)
ptr (3.23e-02)
obj (8.25e-04)
c (4.05e-04)
return (2.33e-04)
string (2.06e-04)
double (1.33e-04)
at (1.02e-04)
0 (9.89e-05)
swig (5.39e-05)
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
(
obj
==
null
)
?
0
:
obj
.
swig
c
ptr
;
}
<SENTENCE_END/>
set,flagssetset (9.87e-01)
flags (1.04e-02)
info (1.39e-03)
triangle (1.26e-04)
this (1.17e-04)
collision (1.15e-04)
ptr (9.53e-05)
c (9.37e-05)
jni (7.90e-05)
swig (5.74e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
flagsflags (9.93e-01)
set (7.25e-03)
info (1.46e-04)
get (6.87e-06)
value (4.03e-06)
%END% (3.16e-06)
swig (1.75e-06)
c (1.39e-06)
this (1.23e-06)
collision (9.53e-07)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
%END%%END% (9.90e-01)
flags (1.87e-03)
set (8.70e-04)
c (6.01e-04)
value (4.62e-04)
collision (3.97e-04)
swig (3.46e-04)
jni (3.18e-04)
ptr (2.49e-04)
info (2.07e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
flags
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
get,flagsgetget (9.87e-01)
flags (9.79e-03)
info (1.55e-03)
triangle (1.30e-04)
collision (1.11e-04)
return (9.62e-05)
ptr (8.73e-05)
c (8.33e-05)
jni (5.70e-05)
this (4.81e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
flagsflags (9.85e-01)
get (1.51e-02)
info (2.79e-04)
set (1.83e-05)
%END% (6.18e-06)
collision (3.55e-06)
instance (2.60e-06)
swig (2.46e-06)
this (1.97e-06)
c (1.31e-06)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
%END%%END% (9.90e-01)
flags (1.55e-03)
c (8.46e-04)
get (5.84e-04)
collision (4.96e-04)
swig (4.63e-04)
jni (4.03e-04)
ptr (3.42e-04)
this (2.41e-04)
info (2.37e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
flags
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
set,edge,v,0,v,1,anglesetset (9.70e-01)
v (9.62e-03)
edge (7.38e-03)
angle (3.40e-03)
0 (2.50e-03)
1 (1.87e-03)
info (1.38e-03)
triangle (3.08e-04)
collision (2.79e-04)
c (1.81e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
edge0 (5.74e-01)
v (4.21e-01)
%END% (3.84e-03)
edge (7.11e-04)
set (3.28e-05)
%UNK% (1.38e-05)
2 (1.13e-05)
line (9.63e-06)
get (7.97e-06)
convex (7.22e-06)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
vv (7.46e-01)
0 (2.35e-01)
1 (1.66e-02)
%END% (1.98e-03)
angle (1.86e-04)
edge (2.43e-05)
this (1.67e-05)
ptr (1.61e-05)
triangle (1.42e-05)
value (1.31e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
01 (6.33e-01)
v (2.03e-01)
angle (1.23e-01)
%END% (2.85e-02)
0 (5.67e-03)
set (2.99e-03)
jni (2.48e-04)
this (2.43e-04)
ptr (2.17e-04)
triangle (2.08e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v%END% (5.67e-01)
angle (3.06e-01)
1 (9.95e-02)
set (1.76e-02)
v (3.71e-03)
jni (2.81e-04)
bt (2.41e-04)
triangle (2.36e-04)
ptr (2.33e-04)
this (2.23e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
1%END% (8.52e-01)
angle (1.17e-01)
1 (1.56e-02)
set (1.13e-02)
v (3.03e-04)
2 (2.12e-04)
edge (1.63e-04)
%UNK% (1.42e-04)
bt (1.39e-04)
jni (1.27e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
angle%END% (8.52e-01)
angle (1.17e-01)
1 (1.55e-02)
set (1.13e-02)
v (3.01e-04)
2 (2.13e-04)
edge (1.63e-04)
%UNK% (1.42e-04)
bt (1.39e-04)
jni (1.27e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
%END%%END% (8.43e-01)
angle (1.24e-01)
1 (1.40e-02)
set (1.33e-02)
v (3.10e-04)
2 (2.11e-04)
edge (1.87e-04)
bt (1.57e-04)
%UNK% (1.43e-04)
jni (1.38e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
get,edge,v,0,v,1,anglegetget (9.78e-01)
v (6.87e-03)
edge (4.29e-03)
angle (3.08e-03)
0 (1.77e-03)
1 (1.69e-03)
info (7.59e-04)
return (5.30e-04)
collision (3.81e-04)
triangle (1.72e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
edge0 (6.41e-01)
v (3.55e-01)
%END% (3.48e-03)
edge (3.67e-04)
get (2.63e-04)
%UNK% (3.82e-05)
2 (2.76e-05)
line (2.17e-05)
transform (2.01e-05)
length (1.94e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
vv (7.31e-01)
0 (2.49e-01)
1 (1.73e-02)
%END% (2.25e-03)
angle (1.93e-04)
ptr (2.85e-05)
jni (2.54e-05)
this (1.68e-05)
collision (1.65e-05)
edge (1.43e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
01 (6.40e-01)
v (1.54e-01)
angle (1.52e-01)
%END% (4.02e-02)
0 (5.04e-03)
get (4.78e-03)
ptr (4.23e-04)
jni (4.09e-04)
c (2.18e-04)
triangle (1.64e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v%END% (6.05e-01)
angle (2.78e-01)
1 (8.59e-02)
get (2.13e-02)
v (3.01e-03)
ptr (3.41e-04)
jni (3.22e-04)
2 (2.82e-04)
edge (2.62e-04)
bt (2.42e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
1%END% (8.61e-01)
angle (1.06e-01)
1 (1.40e-02)
get (1.33e-02)
2 (4.05e-04)
v (2.78e-04)
edge (2.28e-04)
ptr (1.62e-04)
c (1.62e-04)
%UNK% (1.58e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
angle%END% (8.61e-01)
angle (1.06e-01)
1 (1.40e-02)
get (1.33e-02)
2 (4.05e-04)
v (2.79e-04)
edge (2.28e-04)
ptr (1.62e-04)
c (1.62e-04)
%UNK% (1.58e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
%END%%END% (8.69e-01)
angle (9.99e-02)
get (1.38e-02)
1 (1.14e-02)
2 (4.10e-04)
v (2.53e-04)
edge (2.42e-04)
%UNK% (1.62e-04)
c (1.60e-04)
ptr (1.59e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
0
v
1
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
set,edge,v,1,v,2,anglesetset (9.74e-01)
v (5.90e-03)
edge (5.83e-03)
angle (5.23e-03)
2 (2.15e-03)
1 (1.42e-03)
info (1.40e-03)
triangle (3.43e-04)
collision (2.83e-04)
c (2.01e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
edgev (7.96e-01)
1 (1.99e-01)
%END% (3.06e-03)
edge (1.61e-03)
set (3.48e-04)
2 (7.67e-05)
ray (4.15e-05)
angle (3.00e-05)
triangle (2.09e-05)
convex (2.02e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v1 (4.99e-01)
v (4.90e-01)
2 (6.62e-03)
%END% (4.00e-03)
angle (2.22e-04)
edge (4.81e-05)
triangle (2.51e-05)
jni (2.45e-05)
this (2.44e-05)
ptr (2.29e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
12 (4.53e-01)
v (2.46e-01)
angle (1.90e-01)
%END% (7.32e-02)
set (1.50e-02)
1 (1.24e-02)
jni (7.97e-04)
triangle (6.44e-04)
this (5.99e-04)
bt (5.06e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v%END% (6.80e-01)
angle (2.29e-01)
2 (4.78e-02)
set (3.25e-02)
v (2.66e-03)
edge (3.35e-04)
jni (3.19e-04)
triangle (3.05e-04)
bt (2.95e-04)
info (2.50e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
2%END% (8.65e-01)
angle (9.78e-02)
set (2.00e-02)
2 (1.14e-02)
v (3.44e-04)
edge (2.72e-04)
%UNK% (1.85e-04)
triangle (1.74e-04)
bt (1.73e-04)
swig (1.56e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
angle%END% (8.64e-01)
angle (9.80e-02)
set (2.02e-02)
2 (1.14e-02)
v (3.38e-04)
edge (2.74e-04)
%UNK% (1.86e-04)
triangle (1.75e-04)
bt (1.74e-04)
swig (1.57e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
%END%%END% (8.66e-01)
angle (9.66e-02)
set (2.00e-02)
2 (1.11e-02)
v (3.26e-04)
edge (2.74e-04)
%UNK% (1.87e-04)
triangle (1.73e-04)
bt (1.72e-04)
swig (1.56e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
get,edge,v,1,v,2,anglegetget (9.81e-01)
angle (4.69e-03)
v (3.91e-03)
edge (3.12e-03)
2 (1.93e-03)
1 (9.27e-04)
info (7.32e-04)
return (5.27e-04)
collision (3.81e-04)
triangle (1.95e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
edgev (8.04e-01)
1 (1.89e-01)
%END% (2.59e-03)
get (1.17e-03)
edge (1.10e-03)
2 (1.89e-04)
overlaps (1.12e-04)
ray (1.02e-04)
angle (8.06e-05)
set (6.88e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v1 (5.98e-01)
v (3.93e-01)
2 (4.50e-03)
%END% (3.83e-03)
angle (1.94e-04)
jni (5.89e-05)
ptr (4.29e-05)
get (3.53e-05)
collision (3.41e-05)
edge (3.29e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
12 (4.20e-01)
v (2.15e-01)
angle (2.09e-01)
%END% (1.02e-01)
get (2.64e-02)
1 (1.33e-02)
jni (1.66e-03)
ptr (1.07e-03)
c (6.29e-04)
triangle (6.07e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v%END% (7.20e-01)
angle (1.89e-01)
2 (4.09e-02)
get (3.82e-02)
v (2.34e-03)
edge (4.44e-04)
jni (4.17e-04)
ptr (3.39e-04)
bt (3.25e-04)
c (3.10e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
2%END% (8.77e-01)
angle (8.15e-02)
get (2.26e-02)
2 (1.10e-02)
edge (4.17e-04)
v (3.34e-04)
c (2.25e-04)
%UNK% (2.15e-04)
bt (2.01e-04)
jni (1.73e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
angle%END% (8.77e-01)
angle (8.16e-02)
get (2.27e-02)
2 (1.10e-02)
edge (4.20e-04)
v (3.30e-04)
c (2.26e-04)
%UNK% (2.17e-04)
bt (2.02e-04)
jni (1.73e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
%END%%END% (8.78e-01)
angle (8.05e-02)
get (2.25e-02)
2 (1.07e-02)
edge (4.21e-04)
v (3.19e-04)
c (2.26e-04)
%UNK% (2.18e-04)
bt (2.01e-04)
jni (1.71e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
1
v
2
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
set,edge,v,2,v,0,anglesetset (9.82e-01)
v (5.18e-03)
edge (2.62e-03)
angle (2.44e-03)
2 (2.04e-03)
0 (1.68e-03)
info (7.29e-04)
collision (2.89e-04)
triangle (2.13e-04)
c (1.65e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
edge2 (6.86e-01)
v (3.04e-01)
%END% (6.71e-03)
edge (1.97e-03)
0 (9.84e-04)
set (5.60e-05)
angle (3.68e-05)
ray (2.53e-05)
get (1.28e-05)
line (1.28e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
vv (6.34e-01)
0 (2.88e-01)
2 (6.45e-02)
angle (8.81e-03)
%END% (4.08e-03)
edge (3.34e-05)
set (2.80e-05)
ptr (2.71e-05)
triangle (2.47e-05)
this (2.37e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
2angle (5.89e-01)
0 (2.64e-01)
%END% (1.17e-01)
v (2.01e-02)
set (6.83e-03)
2 (1.50e-03)
jni (1.43e-04)
this (1.21e-04)
ptr (1.17e-04)
triangle (1.13e-04)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
v%END% (7.34e-01)
angle (2.37e-01)
set (1.35e-02)
0 (1.10e-02)
2 (6.11e-04)
v (3.98e-04)
edge (1.74e-04)
jni (1.04e-04)
%UNK% (9.69e-05)
info (9.45e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
0%END% (9.05e-01)
angle (8.02e-02)
set (9.16e-03)
0 (1.95e-03)
2 (6.55e-04)
edge (1.58e-04)
%UNK% (1.13e-04)
info (6.79e-05)
bt (6.37e-05)
v (6.28e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
angle%END% (9.05e-01)
angle (8.05e-02)
set (9.24e-03)
0 (1.92e-03)
2 (6.62e-04)
edge (1.59e-04)
%UNK% (1.14e-04)
info (6.85e-05)
bt (6.39e-05)
v (6.19e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
%END%%END% (9.07e-01)
angle (7.87e-02)
set (9.34e-03)
0 (1.80e-03)
2 (6.81e-04)
edge (1.61e-04)
%UNK% (1.16e-04)
info (6.94e-05)
bt (6.45e-05)
jni (6.13e-05)
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
set
(
swig
c
ptr
,
this
,
value
)
;
}
<SENTENCE_END/>
get,edge,v,2,v,0,anglegetget (9.87e-01)
v (3.41e-03)
angle (2.02e-03)
edge (1.40e-03)
0 (1.39e-03)
2 (1.32e-03)
return (4.69e-04)
collision (3.90e-04)
info (3.71e-04)
c (1.56e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
edge2 (7.12e-01)
v (2.77e-01)
%END% (6.90e-03)
0 (1.01e-03)
edge (9.05e-04)
get (2.28e-04)
angle (8.05e-05)
collision (7.81e-05)
ray (7.48e-05)
set (4.09e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
vv (6.00e-01)
0 (3.20e-01)
2 (6.43e-02)
angle (9.56e-03)
%END% (4.99e-03)
ptr (5.67e-05)
jni (4.53e-05)
get (3.96e-05)
collision (3.01e-05)
c (2.76e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
2angle (5.93e-01)
0 (2.16e-01)
%END% (1.62e-01)
v (1.47e-02)
get (9.92e-03)
2 (1.60e-03)
jni (2.71e-04)
ptr (2.55e-04)
edge (1.23e-04)
c (1.20e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
v%END% (7.67e-01)
angle (2.02e-01)
get (1.68e-02)
0 (8.97e-03)
2 (1.27e-03)
v (3.61e-04)
edge (2.62e-04)
jni (1.48e-04)
ptr (1.34e-04)
c (1.27e-04)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
0%END% (9.10e-01)
angle (7.08e-02)
get (1.17e-02)
0 (1.74e-03)
2 (1.39e-03)
edge (2.67e-04)
%UNK% (1.43e-04)
valid (1.18e-04)
c (1.16e-04)
rad (9.35e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
angle%END% (9.10e-01)
angle (7.10e-02)
get (1.18e-02)
0 (1.73e-03)
2 (1.40e-03)
edge (2.67e-04)
%UNK% (1.43e-04)
valid (1.18e-04)
c (1.16e-04)
rad (9.39e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
%END%%END% (9.12e-01)
angle (6.94e-02)
get (1.19e-02)
0 (1.62e-03)
2 (1.43e-03)
edge (2.69e-04)
%UNK% (1.45e-04)
valid (1.18e-04)
c (1.17e-04)
rad (9.50e-05)
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
collision
jni
.
bt
triangle
info
edge
v
2
v
0
angle
get
(
swig
c
ptr
,
this
)
;
}
<SENTENCE_END/>
createcreatedraw (4.00e-01)
set (1.73e-01)
create (5.00e-02)
render (4.07e-02)
load (2.82e-02)
add (1.66e-02)
generate (1.62e-02)
get (1.26e-02)
bind (1.04e-02)
fill (1.03e-02)
<SENTENCE_START>
{
pixmap
=
new
pixmap
(
800
,
480
,
pixmap
.
format
.
rgba
8888
)
;
texture
=
new
texture
(
1024
,
1024
,
pixmap
.
format
.
rgba
8888
)
;
texture
.
set
filter
(
texture
.
texture
filter
.
nearest
,
texture
.
texture
filter
.
linear
)
;
texture
.
set
wrap
(
texture
.
texture
wrap
.
clamp
to
edge
,
texture
.
texture
wrap
.
clamp
to
edge
)
;
pixmap
.
set
color
(
1.0f
,
0.0f
,
0.0f
,
1.0f
)
;
pixmap
.
draw
line
(
0
,
0
,
100
,
100
)
;
pixmap
.
set
color
(
0.0f
,
0.0f
,
1.0f
,
1.0f
)
;
pixmap
.
draw
line
(
100
,
100
,
200
,
0
)
;
pixmap
.
set
color
(
0.0f
,
1.0f
,
0.0f
,
1.0f
)
;
pixmap
.
draw
line
(
100
,
0
,
100
,
100
)
;
pixmap
.
set
color
(
1.0f
,
1.0f
,
1.0f
,
1.0f
)
;
pixmap
.
draw
circle
(
400
,
300
,
100
)
;
texture
.
draw
(
pixmap
,
0
,
0
)
;
region
=
new
texture
region
(
texture
,
0
,
0
,
800
,
480
)
;
batch
=
new
sprite
batch
(
)
;
pixmap
pixmap
=
new
pixmap
(
512
,
1024
,
pixmap
.
format
.
rgba
8888
)
;
for
(
int
y
=
0
;
y
<
pixmap
.
get
height
(
)
;
y
++
)
{
for
(
int
x
=
0
;
x
<
pixmap
.
get
width
(
)
;
x
++
)
{
pixmap
.
get
pixel
(
x
,
y
)
;
}
}
pixmap
.
dispose
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
pixmap
=
new
pixmap
(
800
,
480
,
pixmap
.
format
.
rgba
8888
)
;
texture
=
new
texture
(
1024
,
1024
,
pixmap
.
format
.
rgba
8888
)
;
texture
.
set
filter
(
texture
.
texture
filter
.
nearest
,
texture
.
texture
filter
.
linear
)
;
texture
.
set
wrap
(
texture
.
texture
wrap
.
clamp
to
edge
,
texture
.
texture
wrap
.
clamp
to
edge
)
;
pixmap
.
set
color
(
1.0f
,
0.0f
,
0.0f
,
1.0f
)
;
pixmap
.
draw
line
(
0
,
0
,
100
,
100
)
;
pixmap
.
set
color
(
0.0f
,
0.0f
,
1.0f
,
1.0f
)
;
pixmap
.
draw
line
(
100
,
100
,
200
,
0
)
;
pixmap
.
set
color
(
0.0f
,
1.0f
,
0.0f
,
1.0f
)
;
pixmap
.
draw
line
(
100
,
0
,
100
,
100
)
;
pixmap
.
set
color
(
1.0f
,
1.0f
,
1.0f
,
1.0f
)
;
pixmap
.
draw
circle
(
400
,
300
,
100
)
;
texture
.
draw
(
pixmap
,
0
,
0
)
;
region
=
new
texture
region
(
texture
,
0
,
0
,
800
,
480
)
;
batch
=
new
sprite
batch
(
)
;
pixmap
pixmap
=
new
pixmap
(
512
,
1024
,
pixmap
.
format
.
rgba
8888
)
;
for
(
int
y
=
0
;
y
<
pixmap
.
get
height
(
)
;
y
++
)
{
for
(
int
x
=
0
;
x
<
pixmap
.
get
width
(
)
;
x
++
)
{
pixmap
.
get
pixel
(
x
,
y
)
;
}
}
pixmap
.
dispose
(
)
;
}
<SENTENCE_END/>
%END%%END% (4.30e-01)
draw (8.97e-02)
texture (2.59e-02)
render (2.12e-02)
set (1.91e-02)
pixmap (1.67e-02)
create (1.42e-02)
%UNK% (1.03e-02)
load (8.90e-03)
triangle (7.44e-03)
<SENTENCE_START>
{
pixmap
=
new
pixmap
(
800
,
480
,
pixmap
.
format
.
rgba
8888
)
;
texture
=
new
texture
(
1024
,
1024
,
pixmap
.
format
.
rgba
8888
)
;
texture
.
set
filter
(
texture
.
texture
filter
.
nearest
,
texture
.
texture
filter
.
linear
)
;
texture
.
set
wrap
(
texture
.
texture
wrap
.
clamp
to
edge
,
texture
.
texture
wrap
.
clamp
to
edge
)
;
pixmap
.
set
color
(
1.0f
,
0.0f
,
0.0f
,
1.0f
)
;
pixmap
.
draw
line
(
0
,
0
,
100
,
100
)
;
pixmap
.
set
color
(
0.0f
,
0.0f
,
1.0f
,
1.0f
)
;
pixmap
.
draw
line
(
100
,
100
,
200
,
0
)
;
pixmap
.
set
color
(
0.0f
,
1.0f
,
0.0f
,
1.0f
)
;
pixmap
.
draw
line
(
100
,
0
,
100
,
100
)
;
pixmap
.
set
color
(
1.0f
,
1.0f
,
1.0f
,
1.0f
)
;
pixmap
.
draw
circle
(
400
,
300
,
100
)
;
texture
.
draw
(
pixmap
,
0
,
0
)
;
region
=
new
texture
region
(
texture
,
0
,
0
,
800
,
480
)
;
batch
=
new
sprite
batch
(
)
;
pixmap
pixmap
=
new
pixmap
(
512
,
1024
,
pixmap
.
format
.
rgba
8888
)
;
for
(
int
y
=
0
;
y
<
pixmap
.
get
height
(
)
;
y
++
)
{
for
(
int
x
=
0
;
x
<
pixmap
.
get
width
(
)
;
x
++
)
{
pixmap
.
get
pixel
(
x
,
y
)
;
}
}
pixmap
.
dispose
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
pixmap
=
new
pixmap
(
800
,
480
,
pixmap
.
format
.
rgba
8888
)
;
texture
=
new
texture
(
1024
,
1024
,
pixmap
.
format
.
rgba
8888
)
;
texture
.
set
filter
(
texture
.
texture
filter
.
nearest
,
texture
.
texture
filter
.
linear
)
;
texture
.
set
wrap
(
texture
.
texture
wrap
.
clamp
to
edge
,
texture
.
texture
wrap
.
clamp
to
edge
)
;
pixmap
.
set
color
(
1.0f
,
0.0f
,
0.0f
,
1.0f
)
;
pixmap
.
draw
line
(
0
,
0
,
100
,
100
)
;
pixmap
.
set
color
(
0.0f
,
0.0f
,
1.0f
,
1.0f
)
;
pixmap
.
draw
line
(
100
,
100
,
200
,
0
)
;
pixmap
.
set
color
(
0.0f
,
1.0f
,
0.0f
,
1.0f
)
;
pixmap
.
draw
line
(
100
,
0
,
100
,
100
)
;
pixmap
.
set
color
(
1.0f
,
1.0f
,
1.0f
,
1.0f
)
;
pixmap
.
draw
circle
(
400
,
300
,
100
)
;
texture
.
draw
(
pixmap
,
0
,
0
)
;
region
=
new
texture
region
(
texture
,
0
,
0
,
800
,
480
)
;
batch
=
new
sprite
batch
(
)
;
pixmap
pixmap
=
new
pixmap
(
512
,
1024
,
pixmap
.
format
.
rgba
8888
)
;
for
(
int
y
=
0
;
y
<
pixmap
.
get
height
(
)
;
y
++
)
{
for
(
int
x
=
0
;
x
<
pixmap
.
get
width
(
)
;
x
++
)
{
pixmap
.
get
pixel
(
x
,
y
)
;
}
}
pixmap
.
dispose
(
)
;
}
<SENTENCE_END/>
renderrenderdraw (3.44e-01)
begin (2.99e-01)
render (1.75e-01)
end (1.15e-01)
set (1.36e-02)
reset (8.21e-03)
bind (6.08e-03)
clear (4.34e-03)
batch (3.24e-03)
gl (3.08e-03)
<SENTENCE_START>
{
gdx
.
gl
.
gl
clear
color
(
0.6f
,
0.6f
,
0.6f
,
1
)
;
gdx
.
gl
.
gl
clear
(
gl
20
.
gl
color
buffer
bit
)
;
batch
.
begin
(
)
;
batch
.
draw
(
region
,
0
,
0
)
;
batch
.
end
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
gdx
.
gl
.
gl
clear
color
(
0.6f
,
0.6f
,
0.6f
,
1
)
;
gdx
.
gl
.
gl
clear
(
gl
20
.
gl
color
buffer
bit
)
;
batch
.
begin
(
)
;
batch
.
draw
(
region
,
0
,
0
)
;
batch
.
end
(
)
;
}
<SENTENCE_END/>
%END%%END% (5.87e-01)
render (1.30e-01)
end (5.68e-02)
draw (5.16e-02)
begin (3.62e-02)
gl (1.00e-02)
color (9.77e-03)
batch (8.87e-03)
%UNK% (6.49e-03)
bind (5.07e-03)
<SENTENCE_START>
{
gdx
.
gl
.
gl
clear
color
(
0.6f
,
0.6f
,
0.6f
,
1
)
;
gdx
.
gl
.
gl
clear
(
gl
20
.
gl
color
buffer
bit
)
;
batch
.
begin
(
)
;
batch
.
draw
(
region
,
0
,
0
)
;
batch
.
end
(
)
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
gdx
.
gl
.
gl
clear
color
(
0.6f
,
0.6f
,
0.6f
,
1
)
;
gdx
.
gl
.
gl
clear
(
gl
20
.
gl
color
buffer
bit
)
;
batch
.
begin
(
)
;
batch
.
draw
(
region
,
0
,
0
)
;
batch
.
end
(
)
;
}
<SENTENCE_END/>
get,loaded,musicgetget (4.36e-01)
is (1.61e-01)
instance (1.04e-01)
new (5.71e-02)
music (5.27e-02)
needs (3.88e-02)
as (2.85e-02)
owns (1.36e-02)
register (1.29e-02)
protected (1.13e-02)
<SENTENCE_START>
{
return
music
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
music
;
}
<SENTENCE_END/>
loadedmusic (9.97e-01)
pause (1.26e-03)
return (7.20e-04)
update (2.38e-04)
register (1.31e-04)
%END% (1.23e-04)
parallel (1.01e-04)
sequence (7.87e-05)
play (7.53e-05)
new (6.46e-05)
<SENTENCE_START>
{
return
music
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
music
;
}
<SENTENCE_END/>
music%END% (9.38e-01)
music (8.92e-03)
loaded (2.22e-03)
buffer (2.14e-03)
value (2.09e-03)
accessible (1.92e-03)
only (1.72e-03)
class (1.69e-03)
object (1.09e-03)
animation (1.01e-03)
<SENTENCE_START>
{
return
music
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
music
;
}
<SENTENCE_END/>
%END%%END% (9.51e-01)
value (6.78e-03)
only (3.52e-03)
music (2.94e-03)
20 (2.42e-03)
offset (1.41e-03)
accessible (1.27e-03)
buffer (1.18e-03)
array (8.76e-04)
loaded (8.72e-04)
<SENTENCE_START>
{
return
music
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
return
music
;
}
<SENTENCE_END/>
initinitset (2.57e-01)
%END% (1.13e-01)
%UNK% (9.15e-02)
get (5.56e-02)
solve (3.11e-02)
add (1.92e-02)
init (1.84e-02)
create (1.70e-02)
render (1.31e-02)
reset (1.22e-02)
<SENTENCE_START>
{
m
step
=
def
.
step
;
m
count
=
def
.
count
;
if
(
m
position
constraints
.
length
<
m
count
)
{
contact
position
constraint
[
]
old
=
m
position
constraints
;
m
position
constraints
=
new
contact
position
constraint
[
math
utils
.
max
(
old
.
length
*
2
,
m
count
)
]
;
system
.
arraycopy
(
old
,
0
,
m
position
constraints
,
0
,
old
.
length
)
;
for
(
int
i
=
old
.
length
;
i
<
m
position
constraints
.
length
;
i
++
)
{
m
position
constraints
[
i
]
=
new
contact
position
constraint
(
)
;
}
}
if
(
m
velocity
constraints
.
length
<
m
count
)
{
contact
velocity
constraint
[
]
old
=
m
velocity
constraints
;
m
velocity
constraints
=
new
contact
velocity
constraint
[
math
utils
.
max
(
old
.
length
*
2
,
m
count
)
]
;
system
.
arraycopy
(
old
,
0
,
m
velocity
constraints
,
0
,
old
.
length
)
;
for
(
int
i
=
old
.
length
;
i
<
m
velocity
constraints
.
length
;
i
++
)
{
m
velocity
constraints
[
i
]
=
new
contact
velocity
constraint
(
)
;
}
}
m
positions
=
def
.
positions
;
m
velocities
=
def
.
velocities
;
m
contacts
=
def
.
contacts
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
contact
=
m
contacts
[
i
]
;
final
fixture
fixture
a
=
contact
.
m
fixture
a
;
final
fixture
fixture
b
=
contact
.
m
fixture
b
;
final
shape
shape
a
=
fixture
a
.
get
shape
(
)
;
final
shape
shape
b
=
fixture
b
.
get
shape
(
)
;
final
float
radius
a
=
shape
a
.
m
radius
;
final
float
radius
b
=
shape
b
.
m
radius
;
final
body
body
a
=
fixture
a
.
get
body
(
)
;
final
body
body
b
=
fixture
b
.
get
body
(
)
;
final
manifold
manifold
=
contact
.
get
manifold
(
)
;
int
point
count
=
manifold
.
point
count
;
assert
(
point
count
>
0
)
;
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
vc
.
friction
=
contact
.
m
friction
;
vc
.
restitution
=
contact
.
m
restitution
;
vc
.
tangent
speed
=
contact
.
m
tangent
speed
;
vc
.
index
a
=
body
a
.
m
island
index
;
vc
.
index
b
=
body
b
.
m
island
index
;
vc
.
inv
mass
a
=
body
a
.
m
inv
mass
;
vc
.
inv
mass
b
=
body
b
.
m
inv
mass
;
vc
.
inv
ia
=
body
a
.
m
inv
i
;
vc
.
inv
ib
=
body
b
.
m
inv
i
;
vc
.
contact
index
=
i
;
vc
.
point
count
=
point
count
;
vc
.
k
.
set
zero
(
)
;
vc
.
normal
mass
.
set
zero
(
)
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
pc
.
index
a
=
body
a
.
m
island
index
;
pc
.
index
b
=
body
b
.
m
island
index
;
pc
.
inv
mass
a
=
body
a
.
m
inv
mass
;
pc
.
inv
mass
b
=
body
b
.
m
inv
mass
;
pc
.
local
center
a
.
set
(
body
a
.
m
sweep
.
local
center
)
;
pc
.
local
center
b
.
set
(
body
b
.
m
sweep
.
local
center
)
;
pc
.
inv
ia
=
body
a
.
m
inv
i
;
pc
.
inv
ib
=
body
b
.
m
inv
i
;
pc
.
local
normal
.
set
(
manifold
.
local
normal
)
;
pc
.
local
point
.
set
(
manifold
.
local
point
)
;
pc
.
point
count
=
point
count
;
pc
.
radius
a
=
radius
a
;
pc
.
radius
b
=
radius
b
;
pc
.
type
=
manifold
.
type
;
for
(
int
j
=
0
;
j
<
point
count
;
j
++
)
{
manifold
point
cp
=
manifold
.
points
[
j
]
;
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
if
(
m
step
.
warm
starting
)
{
vcp
.
normal
impulse
=
m
step
.
dt
ratio
*
cp
.
normal
impulse
;
vcp
.
tangent
impulse
=
m
step
.
dt
ratio
*
cp
.
tangent
impulse
;
}
else
{
vcp
.
normal
impulse
=
0
;
vcp
.
tangent
impulse
=
0
;
}
vcp
.
r
a
.
set
zero
(
)
;
vcp
.
r
b
.
set
zero
(
)
;
vcp
.
normal
mass
=
0
;
vcp
.
tangent
mass
=
0
;
vcp
.
velocity
bias
=
0
;
pc
.
local
points
[
j
]
.
x
=
cp
.
local
point
.
x
;
pc
.
local
points
[
j
]
.
y
=
cp
.
local
point
.
y
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
m
step
=
def
.
step
;
m
count
=
def
.
count
;
if
(
m
position
constraints
.
length
<
m
count
)
{
contact
position
constraint
[
]
old
=
m
position
constraints
;
m
position
constraints
=
new
contact
position
constraint
[
math
utils
.
max
(
old
.
length
*
2
,
m
count
)
]
;
system
.
arraycopy
(
old
,
0
,
m
position
constraints
,
0
,
old
.
length
)
;
for
(
int
i
=
old
.
length
;
i
<
m
position
constraints
.
length
;
i
++
)
{
m
position
constraints
[
i
]
=
new
contact
position
constraint
(
)
;
}
}
if
(
m
velocity
constraints
.
length
<
m
count
)
{
contact
velocity
constraint
[
]
old
=
m
velocity
constraints
;
m
velocity
constraints
=
new
contact
velocity
constraint
[
math
utils
.
max
(
old
.
length
*
2
,
m
count
)
]
;
system
.
arraycopy
(
old
,
0
,
m
velocity
constraints
,
0
,
old
.
length
)
;
for
(
int
i
=
old
.
length
;
i
<
m
velocity
constraints
.
length
;
i
++
)
{
m
velocity
constraints
[
i
]
=
new
contact
velocity
constraint
(
)
;
}
}
m
positions
=
def
.
positions
;
m
velocities
=
def
.
velocities
;
m
contacts
=
def
.
contacts
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
contact
=
m
contacts
[
i
]
;
final
fixture
fixture
a
=
contact
.
m
fixture
a
;
final
fixture
fixture
b
=
contact
.
m
fixture
b
;
final
shape
shape
a
=
fixture
a
.
get
shape
(
)
;
final
shape
shape
b
=
fixture
b
.
get
shape
(
)
;
final
float
radius
a
=
shape
a
.
m
radius
;
final
float
radius
b
=
shape
b
.
m
radius
;
final
body
body
a
=
fixture
a
.
get
body
(
)
;
final
body
body
b
=
fixture
b
.
get
body
(
)
;
final
manifold
manifold
=
contact
.
get
manifold
(
)
;
int
point
count
=
manifold
.
point
count
;
assert
(
point
count
>
0
)
;
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
vc
.
friction
=
contact
.
m
friction
;
vc
.
restitution
=
contact
.
m
restitution
;
vc
.
tangent
speed
=
contact
.
m
tangent
speed
;
vc
.
index
a
=
body
a
.
m
island
index
;
vc
.
index
b
=
body
b
.
m
island
index
;
vc
.
inv
mass
a
=
body
a
.
m
inv
mass
;
vc
.
inv
mass
b
=
body
b
.
m
inv
mass
;
vc
.
inv
ia
=
body
a
.
m
inv
i
;
vc
.
inv
ib
=
body
b
.
m
inv
i
;
vc
.
contact
index
=
i
;
vc
.
point
count
=
point
count
;
vc
.
k
.
set
zero
(
)
;
vc
.
normal
mass
.
set
zero
(
)
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
pc
.
index
a
=
body
a
.
m
island
index
;
pc
.
index
b
=
body
b
.
m
island
index
;
pc
.
inv
mass
a
=
body
a
.
m
inv
mass
;
pc
.
inv
mass
b
=
body
b
.
m
inv
mass
;
pc
.
local
center
a
.
set
(
body
a
.
m
sweep
.
local
center
)
;
pc
.
local
center
b
.
set
(
body
b
.
m
sweep
.
local
center
)
;
pc
.
inv
ia
=
body
a
.
m
inv
i
;
pc
.
inv
ib
=
body
b
.
m
inv
i
;
pc
.
local
normal
.
set
(
manifold
.
local
normal
)
;
pc
.
local
point
.
set
(
manifold
.
local
point
)
;
pc
.
point
count
=
point
count
;
pc
.
radius
a
=
radius
a
;
pc
.
radius
b
=
radius
b
;
pc
.
type
=
manifold
.
type
;
for
(
int
j
=
0
;
j
<
point
count
;
j
++
)
{
manifold
point
cp
=
manifold
.
points
[
j
]
;
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
if
(
m
step
.
warm
starting
)
{
vcp
.
normal
impulse
=
m
step
.
dt
ratio
*
cp
.
normal
impulse
;
vcp
.
tangent
impulse
=
m
step
.
dt
ratio
*
cp
.
tangent
impulse
;
}
else
{
vcp
.
normal
impulse
=
0
;
vcp
.
tangent
impulse
=
0
;
}
vcp
.
r
a
.
set
zero
(
)
;
vcp
.
r
b
.
set
zero
(
)
;
vcp
.
normal
mass
=
0
;
vcp
.
tangent
mass
=
0
;
vcp
.
velocity
bias
=
0
;
pc
.
local
points
[
j
]
.
x
=
cp
.
local
point
.
x
;
pc
.
local
points
[
j
]
.
y
=
cp
.
local
point
.
y
;
}
}
}
<SENTENCE_END/>
%END%%END% (4.85e-01)
%UNK% (7.41e-02)
set (4.18e-02)
get (2.53e-02)
solve (1.81e-02)
add (7.85e-03)
render (7.03e-03)
m (6.80e-03)
create (6.45e-03)
update (5.98e-03)
<SENTENCE_START>
{
m
step
=
def
.
step
;
m
count
=
def
.
count
;
if
(
m
position
constraints
.
length
<
m
count
)
{
contact
position
constraint
[
]
old
=
m
position
constraints
;
m
position
constraints
=
new
contact
position
constraint
[
math
utils
.
max
(
old
.
length
*
2
,
m
count
)
]
;
system
.
arraycopy
(
old
,
0
,
m
position
constraints
,
0
,
old
.
length
)
;
for
(
int
i
=
old
.
length
;
i
<
m
position
constraints
.
length
;
i
++
)
{
m
position
constraints
[
i
]
=
new
contact
position
constraint
(
)
;
}
}
if
(
m
velocity
constraints
.
length
<
m
count
)
{
contact
velocity
constraint
[
]
old
=
m
velocity
constraints
;
m
velocity
constraints
=
new
contact
velocity
constraint
[
math
utils
.
max
(
old
.
length
*
2
,
m
count
)
]
;
system
.
arraycopy
(
old
,
0
,
m
velocity
constraints
,
0
,
old
.
length
)
;
for
(
int
i
=
old
.
length
;
i
<
m
velocity
constraints
.
length
;
i
++
)
{
m
velocity
constraints
[
i
]
=
new
contact
velocity
constraint
(
)
;
}
}
m
positions
=
def
.
positions
;
m
velocities
=
def
.
velocities
;
m
contacts
=
def
.
contacts
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
contact
=
m
contacts
[
i
]
;
final
fixture
fixture
a
=
contact
.
m
fixture
a
;
final
fixture
fixture
b
=
contact
.
m
fixture
b
;
final
shape
shape
a
=
fixture
a
.
get
shape
(
)
;
final
shape
shape
b
=
fixture
b
.
get
shape
(
)
;
final
float
radius
a
=
shape
a
.
m
radius
;
final
float
radius
b
=
shape
b
.
m
radius
;
final
body
body
a
=
fixture
a
.
get
body
(
)
;
final
body
body
b
=
fixture
b
.
get
body
(
)
;
final
manifold
manifold
=
contact
.
get
manifold
(
)
;
int
point
count
=
manifold
.
point
count
;
assert
(
point
count
>
0
)
;
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
vc
.
friction
=
contact
.
m
friction
;
vc
.
restitution
=
contact
.
m
restitution
;
vc
.
tangent
speed
=
contact
.
m
tangent
speed
;
vc
.
index
a
=
body
a
.
m
island
index
;
vc
.
index
b
=
body
b
.
m
island
index
;
vc
.
inv
mass
a
=
body
a
.
m
inv
mass
;
vc
.
inv
mass
b
=
body
b
.
m
inv
mass
;
vc
.
inv
ia
=
body
a
.
m
inv
i
;
vc
.
inv
ib
=
body
b
.
m
inv
i
;
vc
.
contact
index
=
i
;
vc
.
point
count
=
point
count
;
vc
.
k
.
set
zero
(
)
;
vc
.
normal
mass
.
set
zero
(
)
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
pc
.
index
a
=
body
a
.
m
island
index
;
pc
.
index
b
=
body
b
.
m
island
index
;
pc
.
inv
mass
a
=
body
a
.
m
inv
mass
;
pc
.
inv
mass
b
=
body
b
.
m
inv
mass
;
pc
.
local
center
a
.
set
(
body
a
.
m
sweep
.
local
center
)
;
pc
.
local
center
b
.
set
(
body
b
.
m
sweep
.
local
center
)
;
pc
.
inv
ia
=
body
a
.
m
inv
i
;
pc
.
inv
ib
=
body
b
.
m
inv
i
;
pc
.
local
normal
.
set
(
manifold
.
local
normal
)
;
pc
.
local
point
.
set
(
manifold
.
local
point
)
;
pc
.
point
count
=
point
count
;
pc
.
radius
a
=
radius
a
;
pc
.
radius
b
=
radius
b
;
pc
.
type
=
manifold
.
type
;
for
(
int
j
=
0
;
j
<
point
count
;
j
++
)
{
manifold
point
cp
=
manifold
.
points
[
j
]
;
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
if
(
m
step
.
warm
starting
)
{
vcp
.
normal
impulse
=
m
step
.
dt
ratio
*
cp
.
normal
impulse
;
vcp
.
tangent
impulse
=
m
step
.
dt
ratio
*
cp
.
tangent
impulse
;
}
else
{
vcp
.
normal
impulse
=
0
;
vcp
.
tangent
impulse
=
0
;
}
vcp
.
r
a
.
set
zero
(
)
;
vcp
.
r
b
.
set
zero
(
)
;
vcp
.
normal
mass
=
0
;
vcp
.
tangent
mass
=
0
;
vcp
.
velocity
bias
=
0
;
pc
.
local
points
[
j
]
.
x
=
cp
.
local
point
.
x
;
pc
.
local
points
[
j
]
.
y
=
cp
.
local
point
.
y
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
m
step
=
def
.
step
;
m
count
=
def
.
count
;
if
(
m
position
constraints
.
length
<
m
count
)
{
contact
position
constraint
[
]
old
=
m
position
constraints
;
m
position
constraints
=
new
contact
position
constraint
[
math
utils
.
max
(
old
.
length
*
2
,
m
count
)
]
;
system
.
arraycopy
(
old
,
0
,
m
position
constraints
,
0
,
old
.
length
)
;
for
(
int
i
=
old
.
length
;
i
<
m
position
constraints
.
length
;
i
++
)
{
m
position
constraints
[
i
]
=
new
contact
position
constraint
(
)
;
}
}
if
(
m
velocity
constraints
.
length
<
m
count
)
{
contact
velocity
constraint
[
]
old
=
m
velocity
constraints
;
m
velocity
constraints
=
new
contact
velocity
constraint
[
math
utils
.
max
(
old
.
length
*
2
,
m
count
)
]
;
system
.
arraycopy
(
old
,
0
,
m
velocity
constraints
,
0
,
old
.
length
)
;
for
(
int
i
=
old
.
length
;
i
<
m
velocity
constraints
.
length
;
i
++
)
{
m
velocity
constraints
[
i
]
=
new
contact
velocity
constraint
(
)
;
}
}
m
positions
=
def
.
positions
;
m
velocities
=
def
.
velocities
;
m
contacts
=
def
.
contacts
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
contact
=
m
contacts
[
i
]
;
final
fixture
fixture
a
=
contact
.
m
fixture
a
;
final
fixture
fixture
b
=
contact
.
m
fixture
b
;
final
shape
shape
a
=
fixture
a
.
get
shape
(
)
;
final
shape
shape
b
=
fixture
b
.
get
shape
(
)
;
final
float
radius
a
=
shape
a
.
m
radius
;
final
float
radius
b
=
shape
b
.
m
radius
;
final
body
body
a
=
fixture
a
.
get
body
(
)
;
final
body
body
b
=
fixture
b
.
get
body
(
)
;
final
manifold
manifold
=
contact
.
get
manifold
(
)
;
int
point
count
=
manifold
.
point
count
;
assert
(
point
count
>
0
)
;
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
vc
.
friction
=
contact
.
m
friction
;
vc
.
restitution
=
contact
.
m
restitution
;
vc
.
tangent
speed
=
contact
.
m
tangent
speed
;
vc
.
index
a
=
body
a
.
m
island
index
;
vc
.
index
b
=
body
b
.
m
island
index
;
vc
.
inv
mass
a
=
body
a
.
m
inv
mass
;
vc
.
inv
mass
b
=
body
b
.
m
inv
mass
;
vc
.
inv
ia
=
body
a
.
m
inv
i
;
vc
.
inv
ib
=
body
b
.
m
inv
i
;
vc
.
contact
index
=
i
;
vc
.
point
count
=
point
count
;
vc
.
k
.
set
zero
(
)
;
vc
.
normal
mass
.
set
zero
(
)
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
pc
.
index
a
=
body
a
.
m
island
index
;
pc
.
index
b
=
body
b
.
m
island
index
;
pc
.
inv
mass
a
=
body
a
.
m
inv
mass
;
pc
.
inv
mass
b
=
body
b
.
m
inv
mass
;
pc
.
local
center
a
.
set
(
body
a
.
m
sweep
.
local
center
)
;
pc
.
local
center
b
.
set
(
body
b
.
m
sweep
.
local
center
)
;
pc
.
inv
ia
=
body
a
.
m
inv
i
;
pc
.
inv
ib
=
body
b
.
m
inv
i
;
pc
.
local
normal
.
set
(
manifold
.
local
normal
)
;
pc
.
local
point
.
set
(
manifold
.
local
point
)
;
pc
.
point
count
=
point
count
;
pc
.
radius
a
=
radius
a
;
pc
.
radius
b
=
radius
b
;
pc
.
type
=
manifold
.
type
;
for
(
int
j
=
0
;
j
<
point
count
;
j
++
)
{
manifold
point
cp
=
manifold
.
points
[
j
]
;
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
if
(
m
step
.
warm
starting
)
{
vcp
.
normal
impulse
=
m
step
.
dt
ratio
*
cp
.
normal
impulse
;
vcp
.
tangent
impulse
=
m
step
.
dt
ratio
*
cp
.
tangent
impulse
;
}
else
{
vcp
.
normal
impulse
=
0
;
vcp
.
tangent
impulse
=
0
;
}
vcp
.
r
a
.
set
zero
(
)
;
vcp
.
r
b
.
set
zero
(
)
;
vcp
.
normal
mass
=
0
;
vcp
.
tangent
mass
=
0
;
vcp
.
velocity
bias
=
0
;
pc
.
local
points
[
j
]
.
x
=
cp
.
local
point
.
x
;
pc
.
local
points
[
j
]
.
y
=
cp
.
local
point
.
y
;
}
}
}
<SENTENCE_END/>
warm,startwarmsolve (1.80e-01)
mul (1.56e-01)
%UNK% (1.39e-01)
%END% (2.72e-02)
set (2.46e-02)
add (1.91e-02)
get (1.80e-02)
initialize (1.66e-02)
create (1.61e-02)
cross (1.29e-02)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
i
a
=
vc
.
inv
ia
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
float
tangentx
=
1.0f
*
normal
.
y
;
float
tangenty
=
-
1.0f
*
normal
.
x
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
float
px
=
tangentx
*
vcp
.
tangent
impulse
+
normal
.
x
*
vcp
.
normal
impulse
;
float
py
=
tangenty
*
vcp
.
tangent
impulse
+
normal
.
y
*
vcp
.
normal
impulse
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
i
a
=
vc
.
inv
ia
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
float
tangentx
=
1.0f
*
normal
.
y
;
float
tangenty
=
-
1.0f
*
normal
.
x
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
float
px
=
tangentx
*
vcp
.
tangent
impulse
+
normal
.
x
*
vcp
.
normal
impulse
;
float
py
=
tangenty
*
vcp
.
tangent
impulse
+
normal
.
y
*
vcp
.
normal
impulse
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
start%END% (4.09e-01)
%UNK% (1.34e-01)
solve (6.49e-02)
mul (1.74e-02)
to (1.22e-02)
get (1.19e-02)
in (7.89e-03)
normal (7.82e-03)
add (6.99e-03)
balance (5.92e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
i
a
=
vc
.
inv
ia
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
float
tangentx
=
1.0f
*
normal
.
y
;
float
tangenty
=
-
1.0f
*
normal
.
x
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
float
px
=
tangentx
*
vcp
.
tangent
impulse
+
normal
.
x
*
vcp
.
normal
impulse
;
float
py
=
tangenty
*
vcp
.
tangent
impulse
+
normal
.
y
*
vcp
.
normal
impulse
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
i
a
=
vc
.
inv
ia
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
float
tangentx
=
1.0f
*
normal
.
y
;
float
tangenty
=
-
1.0f
*
normal
.
x
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
float
px
=
tangentx
*
vcp
.
tangent
impulse
+
normal
.
x
*
vcp
.
normal
impulse
;
float
py
=
tangenty
*
vcp
.
tangent
impulse
+
normal
.
y
*
vcp
.
normal
impulse
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
%END%%END% (5.12e-01)
%UNK% (1.07e-01)
solve (4.70e-02)
mul (1.27e-02)
to (1.23e-02)
get (9.01e-03)
in (7.35e-03)
normal (6.11e-03)
add (5.13e-03)
transform (5.01e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
i
a
=
vc
.
inv
ia
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
float
tangentx
=
1.0f
*
normal
.
y
;
float
tangenty
=
-
1.0f
*
normal
.
x
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
float
px
=
tangentx
*
vcp
.
tangent
impulse
+
normal
.
x
*
vcp
.
normal
impulse
;
float
py
=
tangenty
*
vcp
.
tangent
impulse
+
normal
.
y
*
vcp
.
normal
impulse
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
i
a
=
vc
.
inv
ia
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
float
tangentx
=
1.0f
*
normal
.
y
;
float
tangenty
=
-
1.0f
*
normal
.
x
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
float
px
=
tangentx
*
vcp
.
tangent
impulse
+
normal
.
x
*
vcp
.
normal
impulse
;
float
py
=
tangenty
*
vcp
.
tangent
impulse
+
normal
.
y
*
vcp
.
normal
impulse
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
initialize,velocity,constraintsinitialize%UNK% (3.85e-01)
%END% (6.85e-02)
set (5.49e-02)
solve (5.31e-02)
mul (2.89e-02)
get (2.15e-02)
initialize (1.88e-02)
to (1.50e-02)
cross (1.21e-02)
add (1.18e-02)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
float
radius
a
=
pc
.
radius
a
;
float
radius
b
=
pc
.
radius
b
;
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
vec
2
local
center
a
=
pc
.
local
center
a
;
vec
2
local
center
b
=
pc
.
local
center
b
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
assert
(
manifold
.
point
count
>
0
)
;
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
(
xf
aq
.
c
*
local
center
a
.
x
-
xf
aq
.
s
*
local
center
a
.
y
)
;
xf
a
.
p
.
y
=
c
a
.
y
-
(
xf
aq
.
s
*
local
center
a
.
x
+
xf
aq
.
c
*
local
center
a
.
y
)
;
xf
b
.
p
.
x
=
c
b
.
x
-
(
xf
bq
.
c
*
local
center
b
.
x
-
xf
bq
.
s
*
local
center
b
.
y
)
;
xf
b
.
p
.
y
=
c
b
.
y
-
(
xf
bq
.
s
*
local
center
b
.
x
+
xf
bq
.
c
*
local
center
b
.
y
)
;
world
manifold
.
initialize
(
manifold
,
xf
a
,
radius
a
,
xf
b
,
radius
b
)
;
final
vec
2
vcnormal
=
vc
.
normal
;
vcnormal
.
x
=
world
manifold
.
normal
.
x
;
vcnormal
.
y
=
world
manifold
.
normal
.
y
;
int
point
count
=
vc
.
point
count
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
vec
2
wm
pj
=
world
manifold
.
points
[
j
]
;
final
vec
2
vcpr
a
=
vcp
.
r
a
;
final
vec
2
vcpr
b
=
vcp
.
r
b
;
vcpr
a
.
x
=
wm
pj
.
x
-
c
a
.
x
;
vcpr
a
.
y
=
wm
pj
.
y
-
c
a
.
y
;
vcpr
b
.
x
=
wm
pj
.
x
-
c
b
.
x
;
vcpr
b
.
y
=
wm
pj
.
y
-
c
b
.
y
;
float
rn
a
=
vcpr
a
.
x
*
vcnormal
.
y
-
vcpr
a
.
y
*
vcnormal
.
x
;
float
rn
b
=
vcpr
b
.
x
*
vcnormal
.
y
-
vcpr
b
.
y
*
vcnormal
.
x
;
float
k
normal
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
vcp
.
normal
mass
=
k
normal
>
0.0f
?
1.0f
/
k
normal
:
0.0f
;
float
tangentx
=
1.0f
*
vcnormal
.
y
;
float
tangenty
=
-
1.0f
*
vcnormal
.
x
;
float
rt
a
=
vcpr
a
.
x
*
tangenty
-
vcpr
a
.
y
*
tangentx
;
float
rt
b
=
vcpr
b
.
x
*
tangenty
-
vcpr
b
.
y
*
tangentx
;
float
k
tangent
=
m
a
+
m
b
+
i
a
*
rt
a
*
rt
a
+
i
b
*
rt
b
*
rt
b
;
vcp
.
tangent
mass
=
k
tangent
>
0.0f
?
1.0f
/
k
tangent
:
0.0f
;
vcp
.
velocity
bias
=
0.0f
;
float
tempx
=
v
b
.
x
+
-
w
b
*
vcpr
b
.
y
-
v
a
.
x
-
(
-
w
a
*
vcpr
a
.
y
)
;
float
tempy
=
v
b
.
y
+
w
b
*
vcpr
b
.
x
-
v
a
.
y
-
(
w
a
*
vcpr
a
.
x
)
;
float
v
rel
=
vcnormal
.
x
*
tempx
+
vcnormal
.
y
*
tempy
;
if
(
v
rel
<
-
settings
.
velocity
threshold
)
{
vcp
.
velocity
bias
=
-
vc
.
restitution
*
v
rel
;
}
}
if
(
vc
.
point
count
==
2
)
{
velocity
constraint
point
vcp
1
=
vc
.
points
[
0
]
;
velocity
constraint
point
vcp
2
=
vc
.
points
[
1
]
;
float
rn
1
a
=
vcp
1
.
r
a
.
x
*
vcnormal
.
y
-
vcp
1
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
1
b
=
vcp
1
.
r
b
.
x
*
vcnormal
.
y
-
vcp
1
.
r
b
.
y
*
vcnormal
.
x
;
float
rn
2
a
=
vcp
2
.
r
a
.
x
*
vcnormal
.
y
-
vcp
2
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
2
b
=
vcp
2
.
r
b
.
x
*
vcnormal
.
y
-
vcp
2
.
r
b
.
y
*
vcnormal
.
x
;
float
k
11
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
1
a
+
i
b
*
rn
1
b
*
rn
1
b
;
float
k
22
=
m
a
+
m
b
+
i
a
*
rn
2
a
*
rn
2
a
+
i
b
*
rn
2
b
*
rn
2
b
;
float
k
12
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
2
a
+
i
b
*
rn
1
b
*
rn
2
b
;
if
(
k
11
*
k
11
<
k
max
condition
number
*
(
k
11
*
k
22
-
k
12
*
k
12
)
)
{
vc
.
k
.
ex
.
x
=
k
11
;
vc
.
k
.
ex
.
y
=
k
12
;
vc
.
k
.
ey
.
x
=
k
12
;
vc
.
k
.
ey
.
y
=
k
22
;
vc
.
k
.
invert
to
out
(
vc
.
normal
mass
)
;
}
else
{
vc
.
point
count
=
1
;
}
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
float
radius
a
=
pc
.
radius
a
;
float
radius
b
=
pc
.
radius
b
;
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
vec
2
local
center
a
=
pc
.
local
center
a
;
vec
2
local
center
b
=
pc
.
local
center
b
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
assert
(
manifold
.
point
count
>
0
)
;
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
(
xf
aq
.
c
*
local
center
a
.
x
-
xf
aq
.
s
*
local
center
a
.
y
)
;
xf
a
.
p
.
y
=
c
a
.
y
-
(
xf
aq
.
s
*
local
center
a
.
x
+
xf
aq
.
c
*
local
center
a
.
y
)
;
xf
b
.
p
.
x
=
c
b
.
x
-
(
xf
bq
.
c
*
local
center
b
.
x
-
xf
bq
.
s
*
local
center
b
.
y
)
;
xf
b
.
p
.
y
=
c
b
.
y
-
(
xf
bq
.
s
*
local
center
b
.
x
+
xf
bq
.
c
*
local
center
b
.
y
)
;
world
manifold
.
initialize
(
manifold
,
xf
a
,
radius
a
,
xf
b
,
radius
b
)
;
final
vec
2
vcnormal
=
vc
.
normal
;
vcnormal
.
x
=
world
manifold
.
normal
.
x
;
vcnormal
.
y
=
world
manifold
.
normal
.
y
;
int
point
count
=
vc
.
point
count
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
vec
2
wm
pj
=
world
manifold
.
points
[
j
]
;
final
vec
2
vcpr
a
=
vcp
.
r
a
;
final
vec
2
vcpr
b
=
vcp
.
r
b
;
vcpr
a
.
x
=
wm
pj
.
x
-
c
a
.
x
;
vcpr
a
.
y
=
wm
pj
.
y
-
c
a
.
y
;
vcpr
b
.
x
=
wm
pj
.
x
-
c
b
.
x
;
vcpr
b
.
y
=
wm
pj
.
y
-
c
b
.
y
;
float
rn
a
=
vcpr
a
.
x
*
vcnormal
.
y
-
vcpr
a
.
y
*
vcnormal
.
x
;
float
rn
b
=
vcpr
b
.
x
*
vcnormal
.
y
-
vcpr
b
.
y
*
vcnormal
.
x
;
float
k
normal
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
vcp
.
normal
mass
=
k
normal
>
0.0f
?
1.0f
/
k
normal
:
0.0f
;
float
tangentx
=
1.0f
*
vcnormal
.
y
;
float
tangenty
=
-
1.0f
*
vcnormal
.
x
;
float
rt
a
=
vcpr
a
.
x
*
tangenty
-
vcpr
a
.
y
*
tangentx
;
float
rt
b
=
vcpr
b
.
x
*
tangenty
-
vcpr
b
.
y
*
tangentx
;
float
k
tangent
=
m
a
+
m
b
+
i
a
*
rt
a
*
rt
a
+
i
b
*
rt
b
*
rt
b
;
vcp
.
tangent
mass
=
k
tangent
>
0.0f
?
1.0f
/
k
tangent
:
0.0f
;
vcp
.
velocity
bias
=
0.0f
;
float
tempx
=
v
b
.
x
+
-
w
b
*
vcpr
b
.
y
-
v
a
.
x
-
(
-
w
a
*
vcpr
a
.
y
)
;
float
tempy
=
v
b
.
y
+
w
b
*
vcpr
b
.
x
-
v
a
.
y
-
(
w
a
*
vcpr
a
.
x
)
;
float
v
rel
=
vcnormal
.
x
*
tempx
+
vcnormal
.
y
*
tempy
;
if
(
v
rel
<
-
settings
.
velocity
threshold
)
{
vcp
.
velocity
bias
=
-
vc
.
restitution
*
v
rel
;
}
}
if
(
vc
.
point
count
==
2
)
{
velocity
constraint
point
vcp
1
=
vc
.
points
[
0
]
;
velocity
constraint
point
vcp
2
=
vc
.
points
[
1
]
;
float
rn
1
a
=
vcp
1
.
r
a
.
x
*
vcnormal
.
y
-
vcp
1
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
1
b
=
vcp
1
.
r
b
.
x
*
vcnormal
.
y
-
vcp
1
.
r
b
.
y
*
vcnormal
.
x
;
float
rn
2
a
=
vcp
2
.
r
a
.
x
*
vcnormal
.
y
-
vcp
2
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
2
b
=
vcp
2
.
r
b
.
x
*
vcnormal
.
y
-
vcp
2
.
r
b
.
y
*
vcnormal
.
x
;
float
k
11
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
1
a
+
i
b
*
rn
1
b
*
rn
1
b
;
float
k
22
=
m
a
+
m
b
+
i
a
*
rn
2
a
*
rn
2
a
+
i
b
*
rn
2
b
*
rn
2
b
;
float
k
12
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
2
a
+
i
b
*
rn
1
b
*
rn
2
b
;
if
(
k
11
*
k
11
<
k
max
condition
number
*
(
k
11
*
k
22
-
k
12
*
k
12
)
)
{
vc
.
k
.
ex
.
x
=
k
11
;
vc
.
k
.
ex
.
y
=
k
12
;
vc
.
k
.
ey
.
x
=
k
12
;
vc
.
k
.
ey
.
y
=
k
22
;
vc
.
k
.
invert
to
out
(
vc
.
normal
mass
)
;
}
else
{
vc
.
point
count
=
1
;
}
}
}
}
<SENTENCE_END/>
velocity%UNK% (3.14e-01)
%END% (2.37e-01)
solve (3.55e-02)
to (1.93e-02)
set (1.70e-02)
mul (1.39e-02)
get (1.17e-02)
out (1.02e-02)
2 (9.33e-03)
initialize (8.65e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
float
radius
a
=
pc
.
radius
a
;
float
radius
b
=
pc
.
radius
b
;
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
vec
2
local
center
a
=
pc
.
local
center
a
;
vec
2
local
center
b
=
pc
.
local
center
b
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
assert
(
manifold
.
point
count
>
0
)
;
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
(
xf
aq
.
c
*
local
center
a
.
x
-
xf
aq
.
s
*
local
center
a
.
y
)
;
xf
a
.
p
.
y
=
c
a
.
y
-
(
xf
aq
.
s
*
local
center
a
.
x
+
xf
aq
.
c
*
local
center
a
.
y
)
;
xf
b
.
p
.
x
=
c
b
.
x
-
(
xf
bq
.
c
*
local
center
b
.
x
-
xf
bq
.
s
*
local
center
b
.
y
)
;
xf
b
.
p
.
y
=
c
b
.
y
-
(
xf
bq
.
s
*
local
center
b
.
x
+
xf
bq
.
c
*
local
center
b
.
y
)
;
world
manifold
.
initialize
(
manifold
,
xf
a
,
radius
a
,
xf
b
,
radius
b
)
;
final
vec
2
vcnormal
=
vc
.
normal
;
vcnormal
.
x
=
world
manifold
.
normal
.
x
;
vcnormal
.
y
=
world
manifold
.
normal
.
y
;
int
point
count
=
vc
.
point
count
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
vec
2
wm
pj
=
world
manifold
.
points
[
j
]
;
final
vec
2
vcpr
a
=
vcp
.
r
a
;
final
vec
2
vcpr
b
=
vcp
.
r
b
;
vcpr
a
.
x
=
wm
pj
.
x
-
c
a
.
x
;
vcpr
a
.
y
=
wm
pj
.
y
-
c
a
.
y
;
vcpr
b
.
x
=
wm
pj
.
x
-
c
b
.
x
;
vcpr
b
.
y
=
wm
pj
.
y
-
c
b
.
y
;
float
rn
a
=
vcpr
a
.
x
*
vcnormal
.
y
-
vcpr
a
.
y
*
vcnormal
.
x
;
float
rn
b
=
vcpr
b
.
x
*
vcnormal
.
y
-
vcpr
b
.
y
*
vcnormal
.
x
;
float
k
normal
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
vcp
.
normal
mass
=
k
normal
>
0.0f
?
1.0f
/
k
normal
:
0.0f
;
float
tangentx
=
1.0f
*
vcnormal
.
y
;
float
tangenty
=
-
1.0f
*
vcnormal
.
x
;
float
rt
a
=
vcpr
a
.
x
*
tangenty
-
vcpr
a
.
y
*
tangentx
;
float
rt
b
=
vcpr
b
.
x
*
tangenty
-
vcpr
b
.
y
*
tangentx
;
float
k
tangent
=
m
a
+
m
b
+
i
a
*
rt
a
*
rt
a
+
i
b
*
rt
b
*
rt
b
;
vcp
.
tangent
mass
=
k
tangent
>
0.0f
?
1.0f
/
k
tangent
:
0.0f
;
vcp
.
velocity
bias
=
0.0f
;
float
tempx
=
v
b
.
x
+
-
w
b
*
vcpr
b
.
y
-
v
a
.
x
-
(
-
w
a
*
vcpr
a
.
y
)
;
float
tempy
=
v
b
.
y
+
w
b
*
vcpr
b
.
x
-
v
a
.
y
-
(
w
a
*
vcpr
a
.
x
)
;
float
v
rel
=
vcnormal
.
x
*
tempx
+
vcnormal
.
y
*
tempy
;
if
(
v
rel
<
-
settings
.
velocity
threshold
)
{
vcp
.
velocity
bias
=
-
vc
.
restitution
*
v
rel
;
}
}
if
(
vc
.
point
count
==
2
)
{
velocity
constraint
point
vcp
1
=
vc
.
points
[
0
]
;
velocity
constraint
point
vcp
2
=
vc
.
points
[
1
]
;
float
rn
1
a
=
vcp
1
.
r
a
.
x
*
vcnormal
.
y
-
vcp
1
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
1
b
=
vcp
1
.
r
b
.
x
*
vcnormal
.
y
-
vcp
1
.
r
b
.
y
*
vcnormal
.
x
;
float
rn
2
a
=
vcp
2
.
r
a
.
x
*
vcnormal
.
y
-
vcp
2
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
2
b
=
vcp
2
.
r
b
.
x
*
vcnormal
.
y
-
vcp
2
.
r
b
.
y
*
vcnormal
.
x
;
float
k
11
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
1
a
+
i
b
*
rn
1
b
*
rn
1
b
;
float
k
22
=
m
a
+
m
b
+
i
a
*
rn
2
a
*
rn
2
a
+
i
b
*
rn
2
b
*
rn
2
b
;
float
k
12
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
2
a
+
i
b
*
rn
1
b
*
rn
2
b
;
if
(
k
11
*
k
11
<
k
max
condition
number
*
(
k
11
*
k
22
-
k
12
*
k
12
)
)
{
vc
.
k
.
ex
.
x
=
k
11
;
vc
.
k
.
ex
.
y
=
k
12
;
vc
.
k
.
ey
.
x
=
k
12
;
vc
.
k
.
ey
.
y
=
k
22
;
vc
.
k
.
invert
to
out
(
vc
.
normal
mass
)
;
}
else
{
vc
.
point
count
=
1
;
}
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
float
radius
a
=
pc
.
radius
a
;
float
radius
b
=
pc
.
radius
b
;
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
vec
2
local
center
a
=
pc
.
local
center
a
;
vec
2
local
center
b
=
pc
.
local
center
b
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
assert
(
manifold
.
point
count
>
0
)
;
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
(
xf
aq
.
c
*
local
center
a
.
x
-
xf
aq
.
s
*
local
center
a
.
y
)
;
xf
a
.
p
.
y
=
c
a
.
y
-
(
xf
aq
.
s
*
local
center
a
.
x
+
xf
aq
.
c
*
local
center
a
.
y
)
;
xf
b
.
p
.
x
=
c
b
.
x
-
(
xf
bq
.
c
*
local
center
b
.
x
-
xf
bq
.
s
*
local
center
b
.
y
)
;
xf
b
.
p
.
y
=
c
b
.
y
-
(
xf
bq
.
s
*
local
center
b
.
x
+
xf
bq
.
c
*
local
center
b
.
y
)
;
world
manifold
.
initialize
(
manifold
,
xf
a
,
radius
a
,
xf
b
,
radius
b
)
;
final
vec
2
vcnormal
=
vc
.
normal
;
vcnormal
.
x
=
world
manifold
.
normal
.
x
;
vcnormal
.
y
=
world
manifold
.
normal
.
y
;
int
point
count
=
vc
.
point
count
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
vec
2
wm
pj
=
world
manifold
.
points
[
j
]
;
final
vec
2
vcpr
a
=
vcp
.
r
a
;
final
vec
2
vcpr
b
=
vcp
.
r
b
;
vcpr
a
.
x
=
wm
pj
.
x
-
c
a
.
x
;
vcpr
a
.
y
=
wm
pj
.
y
-
c
a
.
y
;
vcpr
b
.
x
=
wm
pj
.
x
-
c
b
.
x
;
vcpr
b
.
y
=
wm
pj
.
y
-
c
b
.
y
;
float
rn
a
=
vcpr
a
.
x
*
vcnormal
.
y
-
vcpr
a
.
y
*
vcnormal
.
x
;
float
rn
b
=
vcpr
b
.
x
*
vcnormal
.
y
-
vcpr
b
.
y
*
vcnormal
.
x
;
float
k
normal
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
vcp
.
normal
mass
=
k
normal
>
0.0f
?
1.0f
/
k
normal
:
0.0f
;
float
tangentx
=
1.0f
*
vcnormal
.
y
;
float
tangenty
=
-
1.0f
*
vcnormal
.
x
;
float
rt
a
=
vcpr
a
.
x
*
tangenty
-
vcpr
a
.
y
*
tangentx
;
float
rt
b
=
vcpr
b
.
x
*
tangenty
-
vcpr
b
.
y
*
tangentx
;
float
k
tangent
=
m
a
+
m
b
+
i
a
*
rt
a
*
rt
a
+
i
b
*
rt
b
*
rt
b
;
vcp
.
tangent
mass
=
k
tangent
>
0.0f
?
1.0f
/
k
tangent
:
0.0f
;
vcp
.
velocity
bias
=
0.0f
;
float
tempx
=
v
b
.
x
+
-
w
b
*
vcpr
b
.
y
-
v
a
.
x
-
(
-
w
a
*
vcpr
a
.
y
)
;
float
tempy
=
v
b
.
y
+
w
b
*
vcpr
b
.
x
-
v
a
.
y
-
(
w
a
*
vcpr
a
.
x
)
;
float
v
rel
=
vcnormal
.
x
*
tempx
+
vcnormal
.
y
*
tempy
;
if
(
v
rel
<
-
settings
.
velocity
threshold
)
{
vcp
.
velocity
bias
=
-
vc
.
restitution
*
v
rel
;
}
}
if
(
vc
.
point
count
==
2
)
{
velocity
constraint
point
vcp
1
=
vc
.
points
[
0
]
;
velocity
constraint
point
vcp
2
=
vc
.
points
[
1
]
;
float
rn
1
a
=
vcp
1
.
r
a
.
x
*
vcnormal
.
y
-
vcp
1
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
1
b
=
vcp
1
.
r
b
.
x
*
vcnormal
.
y
-
vcp
1
.
r
b
.
y
*
vcnormal
.
x
;
float
rn
2
a
=
vcp
2
.
r
a
.
x
*
vcnormal
.
y
-
vcp
2
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
2
b
=
vcp
2
.
r
b
.
x
*
vcnormal
.
y
-
vcp
2
.
r
b
.
y
*
vcnormal
.
x
;
float
k
11
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
1
a
+
i
b
*
rn
1
b
*
rn
1
b
;
float
k
22
=
m
a
+
m
b
+
i
a
*
rn
2
a
*
rn
2
a
+
i
b
*
rn
2
b
*
rn
2
b
;
float
k
12
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
2
a
+
i
b
*
rn
1
b
*
rn
2
b
;
if
(
k
11
*
k
11
<
k
max
condition
number
*
(
k
11
*
k
22
-
k
12
*
k
12
)
)
{
vc
.
k
.
ex
.
x
=
k
11
;
vc
.
k
.
ex
.
y
=
k
12
;
vc
.
k
.
ey
.
x
=
k
12
;
vc
.
k
.
ey
.
y
=
k
22
;
vc
.
k
.
invert
to
out
(
vc
.
normal
mass
)
;
}
else
{
vc
.
point
count
=
1
;
}
}
}
}
<SENTENCE_END/>
constraints%END% (2.88e-01)
%UNK% (2.81e-01)
solve (3.13e-02)
to (1.98e-02)
mul (1.23e-02)
set (1.16e-02)
out (1.06e-02)
2 (9.77e-03)
get (9.76e-03)
in (8.34e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
float
radius
a
=
pc
.
radius
a
;
float
radius
b
=
pc
.
radius
b
;
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
vec
2
local
center
a
=
pc
.
local
center
a
;
vec
2
local
center
b
=
pc
.
local
center
b
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
assert
(
manifold
.
point
count
>
0
)
;
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
(
xf
aq
.
c
*
local
center
a
.
x
-
xf
aq
.
s
*
local
center
a
.
y
)
;
xf
a
.
p
.
y
=
c
a
.
y
-
(
xf
aq
.
s
*
local
center
a
.
x
+
xf
aq
.
c
*
local
center
a
.
y
)
;
xf
b
.
p
.
x
=
c
b
.
x
-
(
xf
bq
.
c
*
local
center
b
.
x
-
xf
bq
.
s
*
local
center
b
.
y
)
;
xf
b
.
p
.
y
=
c
b
.
y
-
(
xf
bq
.
s
*
local
center
b
.
x
+
xf
bq
.
c
*
local
center
b
.
y
)
;
world
manifold
.
initialize
(
manifold
,
xf
a
,
radius
a
,
xf
b
,
radius
b
)
;
final
vec
2
vcnormal
=
vc
.
normal
;
vcnormal
.
x
=
world
manifold
.
normal
.
x
;
vcnormal
.
y
=
world
manifold
.
normal
.
y
;
int
point
count
=
vc
.
point
count
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
vec
2
wm
pj
=
world
manifold
.
points
[
j
]
;
final
vec
2
vcpr
a
=
vcp
.
r
a
;
final
vec
2
vcpr
b
=
vcp
.
r
b
;
vcpr
a
.
x
=
wm
pj
.
x
-
c
a
.
x
;
vcpr
a
.
y
=
wm
pj
.
y
-
c
a
.
y
;
vcpr
b
.
x
=
wm
pj
.
x
-
c
b
.
x
;
vcpr
b
.
y
=
wm
pj
.
y
-
c
b
.
y
;
float
rn
a
=
vcpr
a
.
x
*
vcnormal
.
y
-
vcpr
a
.
y
*
vcnormal
.
x
;
float
rn
b
=
vcpr
b
.
x
*
vcnormal
.
y
-
vcpr
b
.
y
*
vcnormal
.
x
;
float
k
normal
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
vcp
.
normal
mass
=
k
normal
>
0.0f
?
1.0f
/
k
normal
:
0.0f
;
float
tangentx
=
1.0f
*
vcnormal
.
y
;
float
tangenty
=
-
1.0f
*
vcnormal
.
x
;
float
rt
a
=
vcpr
a
.
x
*
tangenty
-
vcpr
a
.
y
*
tangentx
;
float
rt
b
=
vcpr
b
.
x
*
tangenty
-
vcpr
b
.
y
*
tangentx
;
float
k
tangent
=
m
a
+
m
b
+
i
a
*
rt
a
*
rt
a
+
i
b
*
rt
b
*
rt
b
;
vcp
.
tangent
mass
=
k
tangent
>
0.0f
?
1.0f
/
k
tangent
:
0.0f
;
vcp
.
velocity
bias
=
0.0f
;
float
tempx
=
v
b
.
x
+
-
w
b
*
vcpr
b
.
y
-
v
a
.
x
-
(
-
w
a
*
vcpr
a
.
y
)
;
float
tempy
=
v
b
.
y
+
w
b
*
vcpr
b
.
x
-
v
a
.
y
-
(
w
a
*
vcpr
a
.
x
)
;
float
v
rel
=
vcnormal
.
x
*
tempx
+
vcnormal
.
y
*
tempy
;
if
(
v
rel
<
-
settings
.
velocity
threshold
)
{
vcp
.
velocity
bias
=
-
vc
.
restitution
*
v
rel
;
}
}
if
(
vc
.
point
count
==
2
)
{
velocity
constraint
point
vcp
1
=
vc
.
points
[
0
]
;
velocity
constraint
point
vcp
2
=
vc
.
points
[
1
]
;
float
rn
1
a
=
vcp
1
.
r
a
.
x
*
vcnormal
.
y
-
vcp
1
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
1
b
=
vcp
1
.
r
b
.
x
*
vcnormal
.
y
-
vcp
1
.
r
b
.
y
*
vcnormal
.
x
;
float
rn
2
a
=
vcp
2
.
r
a
.
x
*
vcnormal
.
y
-
vcp
2
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
2
b
=
vcp
2
.
r
b
.
x
*
vcnormal
.
y
-
vcp
2
.
r
b
.
y
*
vcnormal
.
x
;
float
k
11
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
1
a
+
i
b
*
rn
1
b
*
rn
1
b
;
float
k
22
=
m
a
+
m
b
+
i
a
*
rn
2
a
*
rn
2
a
+
i
b
*
rn
2
b
*
rn
2
b
;
float
k
12
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
2
a
+
i
b
*
rn
1
b
*
rn
2
b
;
if
(
k
11
*
k
11
<
k
max
condition
number
*
(
k
11
*
k
22
-
k
12
*
k
12
)
)
{
vc
.
k
.
ex
.
x
=
k
11
;
vc
.
k
.
ex
.
y
=
k
12
;
vc
.
k
.
ey
.
x
=
k
12
;
vc
.
k
.
ey
.
y
=
k
22
;
vc
.
k
.
invert
to
out
(
vc
.
normal
mass
)
;
}
else
{
vc
.
point
count
=
1
;
}
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
float
radius
a
=
pc
.
radius
a
;
float
radius
b
=
pc
.
radius
b
;
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
vec
2
local
center
a
=
pc
.
local
center
a
;
vec
2
local
center
b
=
pc
.
local
center
b
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
assert
(
manifold
.
point
count
>
0
)
;
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
(
xf
aq
.
c
*
local
center
a
.
x
-
xf
aq
.
s
*
local
center
a
.
y
)
;
xf
a
.
p
.
y
=
c
a
.
y
-
(
xf
aq
.
s
*
local
center
a
.
x
+
xf
aq
.
c
*
local
center
a
.
y
)
;
xf
b
.
p
.
x
=
c
b
.
x
-
(
xf
bq
.
c
*
local
center
b
.
x
-
xf
bq
.
s
*
local
center
b
.
y
)
;
xf
b
.
p
.
y
=
c
b
.
y
-
(
xf
bq
.
s
*
local
center
b
.
x
+
xf
bq
.
c
*
local
center
b
.
y
)
;
world
manifold
.
initialize
(
manifold
,
xf
a
,
radius
a
,
xf
b
,
radius
b
)
;
final
vec
2
vcnormal
=
vc
.
normal
;
vcnormal
.
x
=
world
manifold
.
normal
.
x
;
vcnormal
.
y
=
world
manifold
.
normal
.
y
;
int
point
count
=
vc
.
point
count
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
vec
2
wm
pj
=
world
manifold
.
points
[
j
]
;
final
vec
2
vcpr
a
=
vcp
.
r
a
;
final
vec
2
vcpr
b
=
vcp
.
r
b
;
vcpr
a
.
x
=
wm
pj
.
x
-
c
a
.
x
;
vcpr
a
.
y
=
wm
pj
.
y
-
c
a
.
y
;
vcpr
b
.
x
=
wm
pj
.
x
-
c
b
.
x
;
vcpr
b
.
y
=
wm
pj
.
y
-
c
b
.
y
;
float
rn
a
=
vcpr
a
.
x
*
vcnormal
.
y
-
vcpr
a
.
y
*
vcnormal
.
x
;
float
rn
b
=
vcpr
b
.
x
*
vcnormal
.
y
-
vcpr
b
.
y
*
vcnormal
.
x
;
float
k
normal
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
vcp
.
normal
mass
=
k
normal
>
0.0f
?
1.0f
/
k
normal
:
0.0f
;
float
tangentx
=
1.0f
*
vcnormal
.
y
;
float
tangenty
=
-
1.0f
*
vcnormal
.
x
;
float
rt
a
=
vcpr
a
.
x
*
tangenty
-
vcpr
a
.
y
*
tangentx
;
float
rt
b
=
vcpr
b
.
x
*
tangenty
-
vcpr
b
.
y
*
tangentx
;
float
k
tangent
=
m
a
+
m
b
+
i
a
*
rt
a
*
rt
a
+
i
b
*
rt
b
*
rt
b
;
vcp
.
tangent
mass
=
k
tangent
>
0.0f
?
1.0f
/
k
tangent
:
0.0f
;
vcp
.
velocity
bias
=
0.0f
;
float
tempx
=
v
b
.
x
+
-
w
b
*
vcpr
b
.
y
-
v
a
.
x
-
(
-
w
a
*
vcpr
a
.
y
)
;
float
tempy
=
v
b
.
y
+
w
b
*
vcpr
b
.
x
-
v
a
.
y
-
(
w
a
*
vcpr
a
.
x
)
;
float
v
rel
=
vcnormal
.
x
*
tempx
+
vcnormal
.
y
*
tempy
;
if
(
v
rel
<
-
settings
.
velocity
threshold
)
{
vcp
.
velocity
bias
=
-
vc
.
restitution
*
v
rel
;
}
}
if
(
vc
.
point
count
==
2
)
{
velocity
constraint
point
vcp
1
=
vc
.
points
[
0
]
;
velocity
constraint
point
vcp
2
=
vc
.
points
[
1
]
;
float
rn
1
a
=
vcp
1
.
r
a
.
x
*
vcnormal
.
y
-
vcp
1
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
1
b
=
vcp
1
.
r
b
.
x
*
vcnormal
.
y
-
vcp
1
.
r
b
.
y
*
vcnormal
.
x
;
float
rn
2
a
=
vcp
2
.
r
a
.
x
*
vcnormal
.
y
-
vcp
2
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
2
b
=
vcp
2
.
r
b
.
x
*
vcnormal
.
y
-
vcp
2
.
r
b
.
y
*
vcnormal
.
x
;
float
k
11
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
1
a
+
i
b
*
rn
1
b
*
rn
1
b
;
float
k
22
=
m
a
+
m
b
+
i
a
*
rn
2
a
*
rn
2
a
+
i
b
*
rn
2
b
*
rn
2
b
;
float
k
12
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
2
a
+
i
b
*
rn
1
b
*
rn
2
b
;
if
(
k
11
*
k
11
<
k
max
condition
number
*
(
k
11
*
k
22
-
k
12
*
k
12
)
)
{
vc
.
k
.
ex
.
x
=
k
11
;
vc
.
k
.
ex
.
y
=
k
12
;
vc
.
k
.
ey
.
x
=
k
12
;
vc
.
k
.
ey
.
y
=
k
22
;
vc
.
k
.
invert
to
out
(
vc
.
normal
mass
)
;
}
else
{
vc
.
point
count
=
1
;
}
}
}
}
<SENTENCE_END/>
%END%%END% (3.47e-01)
%UNK% (2.60e-01)
solve (2.88e-02)
to (2.03e-02)
mul (1.11e-02)
out (1.09e-02)
2 (9.66e-03)
set (9.33e-03)
get (8.95e-03)
in (8.62e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
float
radius
a
=
pc
.
radius
a
;
float
radius
b
=
pc
.
radius
b
;
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
vec
2
local
center
a
=
pc
.
local
center
a
;
vec
2
local
center
b
=
pc
.
local
center
b
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
assert
(
manifold
.
point
count
>
0
)
;
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
(
xf
aq
.
c
*
local
center
a
.
x
-
xf
aq
.
s
*
local
center
a
.
y
)
;
xf
a
.
p
.
y
=
c
a
.
y
-
(
xf
aq
.
s
*
local
center
a
.
x
+
xf
aq
.
c
*
local
center
a
.
y
)
;
xf
b
.
p
.
x
=
c
b
.
x
-
(
xf
bq
.
c
*
local
center
b
.
x
-
xf
bq
.
s
*
local
center
b
.
y
)
;
xf
b
.
p
.
y
=
c
b
.
y
-
(
xf
bq
.
s
*
local
center
b
.
x
+
xf
bq
.
c
*
local
center
b
.
y
)
;
world
manifold
.
initialize
(
manifold
,
xf
a
,
radius
a
,
xf
b
,
radius
b
)
;
final
vec
2
vcnormal
=
vc
.
normal
;
vcnormal
.
x
=
world
manifold
.
normal
.
x
;
vcnormal
.
y
=
world
manifold
.
normal
.
y
;
int
point
count
=
vc
.
point
count
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
vec
2
wm
pj
=
world
manifold
.
points
[
j
]
;
final
vec
2
vcpr
a
=
vcp
.
r
a
;
final
vec
2
vcpr
b
=
vcp
.
r
b
;
vcpr
a
.
x
=
wm
pj
.
x
-
c
a
.
x
;
vcpr
a
.
y
=
wm
pj
.
y
-
c
a
.
y
;
vcpr
b
.
x
=
wm
pj
.
x
-
c
b
.
x
;
vcpr
b
.
y
=
wm
pj
.
y
-
c
b
.
y
;
float
rn
a
=
vcpr
a
.
x
*
vcnormal
.
y
-
vcpr
a
.
y
*
vcnormal
.
x
;
float
rn
b
=
vcpr
b
.
x
*
vcnormal
.
y
-
vcpr
b
.
y
*
vcnormal
.
x
;
float
k
normal
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
vcp
.
normal
mass
=
k
normal
>
0.0f
?
1.0f
/
k
normal
:
0.0f
;
float
tangentx
=
1.0f
*
vcnormal
.
y
;
float
tangenty
=
-
1.0f
*
vcnormal
.
x
;
float
rt
a
=
vcpr
a
.
x
*
tangenty
-
vcpr
a
.
y
*
tangentx
;
float
rt
b
=
vcpr
b
.
x
*
tangenty
-
vcpr
b
.
y
*
tangentx
;
float
k
tangent
=
m
a
+
m
b
+
i
a
*
rt
a
*
rt
a
+
i
b
*
rt
b
*
rt
b
;
vcp
.
tangent
mass
=
k
tangent
>
0.0f
?
1.0f
/
k
tangent
:
0.0f
;
vcp
.
velocity
bias
=
0.0f
;
float
tempx
=
v
b
.
x
+
-
w
b
*
vcpr
b
.
y
-
v
a
.
x
-
(
-
w
a
*
vcpr
a
.
y
)
;
float
tempy
=
v
b
.
y
+
w
b
*
vcpr
b
.
x
-
v
a
.
y
-
(
w
a
*
vcpr
a
.
x
)
;
float
v
rel
=
vcnormal
.
x
*
tempx
+
vcnormal
.
y
*
tempy
;
if
(
v
rel
<
-
settings
.
velocity
threshold
)
{
vcp
.
velocity
bias
=
-
vc
.
restitution
*
v
rel
;
}
}
if
(
vc
.
point
count
==
2
)
{
velocity
constraint
point
vcp
1
=
vc
.
points
[
0
]
;
velocity
constraint
point
vcp
2
=
vc
.
points
[
1
]
;
float
rn
1
a
=
vcp
1
.
r
a
.
x
*
vcnormal
.
y
-
vcp
1
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
1
b
=
vcp
1
.
r
b
.
x
*
vcnormal
.
y
-
vcp
1
.
r
b
.
y
*
vcnormal
.
x
;
float
rn
2
a
=
vcp
2
.
r
a
.
x
*
vcnormal
.
y
-
vcp
2
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
2
b
=
vcp
2
.
r
b
.
x
*
vcnormal
.
y
-
vcp
2
.
r
b
.
y
*
vcnormal
.
x
;
float
k
11
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
1
a
+
i
b
*
rn
1
b
*
rn
1
b
;
float
k
22
=
m
a
+
m
b
+
i
a
*
rn
2
a
*
rn
2
a
+
i
b
*
rn
2
b
*
rn
2
b
;
float
k
12
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
2
a
+
i
b
*
rn
1
b
*
rn
2
b
;
if
(
k
11
*
k
11
<
k
max
condition
number
*
(
k
11
*
k
22
-
k
12
*
k
12
)
)
{
vc
.
k
.
ex
.
x
=
k
11
;
vc
.
k
.
ex
.
y
=
k
12
;
vc
.
k
.
ey
.
x
=
k
12
;
vc
.
k
.
ey
.
y
=
k
22
;
vc
.
k
.
invert
to
out
(
vc
.
normal
mass
)
;
}
else
{
vc
.
point
count
=
1
;
}
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
float
radius
a
=
pc
.
radius
a
;
float
radius
b
=
pc
.
radius
b
;
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
vec
2
local
center
a
=
pc
.
local
center
a
;
vec
2
local
center
b
=
pc
.
local
center
b
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
assert
(
manifold
.
point
count
>
0
)
;
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
(
xf
aq
.
c
*
local
center
a
.
x
-
xf
aq
.
s
*
local
center
a
.
y
)
;
xf
a
.
p
.
y
=
c
a
.
y
-
(
xf
aq
.
s
*
local
center
a
.
x
+
xf
aq
.
c
*
local
center
a
.
y
)
;
xf
b
.
p
.
x
=
c
b
.
x
-
(
xf
bq
.
c
*
local
center
b
.
x
-
xf
bq
.
s
*
local
center
b
.
y
)
;
xf
b
.
p
.
y
=
c
b
.
y
-
(
xf
bq
.
s
*
local
center
b
.
x
+
xf
bq
.
c
*
local
center
b
.
y
)
;
world
manifold
.
initialize
(
manifold
,
xf
a
,
radius
a
,
xf
b
,
radius
b
)
;
final
vec
2
vcnormal
=
vc
.
normal
;
vcnormal
.
x
=
world
manifold
.
normal
.
x
;
vcnormal
.
y
=
world
manifold
.
normal
.
y
;
int
point
count
=
vc
.
point
count
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
vec
2
wm
pj
=
world
manifold
.
points
[
j
]
;
final
vec
2
vcpr
a
=
vcp
.
r
a
;
final
vec
2
vcpr
b
=
vcp
.
r
b
;
vcpr
a
.
x
=
wm
pj
.
x
-
c
a
.
x
;
vcpr
a
.
y
=
wm
pj
.
y
-
c
a
.
y
;
vcpr
b
.
x
=
wm
pj
.
x
-
c
b
.
x
;
vcpr
b
.
y
=
wm
pj
.
y
-
c
b
.
y
;
float
rn
a
=
vcpr
a
.
x
*
vcnormal
.
y
-
vcpr
a
.
y
*
vcnormal
.
x
;
float
rn
b
=
vcpr
b
.
x
*
vcnormal
.
y
-
vcpr
b
.
y
*
vcnormal
.
x
;
float
k
normal
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
vcp
.
normal
mass
=
k
normal
>
0.0f
?
1.0f
/
k
normal
:
0.0f
;
float
tangentx
=
1.0f
*
vcnormal
.
y
;
float
tangenty
=
-
1.0f
*
vcnormal
.
x
;
float
rt
a
=
vcpr
a
.
x
*
tangenty
-
vcpr
a
.
y
*
tangentx
;
float
rt
b
=
vcpr
b
.
x
*
tangenty
-
vcpr
b
.
y
*
tangentx
;
float
k
tangent
=
m
a
+
m
b
+
i
a
*
rt
a
*
rt
a
+
i
b
*
rt
b
*
rt
b
;
vcp
.
tangent
mass
=
k
tangent
>
0.0f
?
1.0f
/
k
tangent
:
0.0f
;
vcp
.
velocity
bias
=
0.0f
;
float
tempx
=
v
b
.
x
+
-
w
b
*
vcpr
b
.
y
-
v
a
.
x
-
(
-
w
a
*
vcpr
a
.
y
)
;
float
tempy
=
v
b
.
y
+
w
b
*
vcpr
b
.
x
-
v
a
.
y
-
(
w
a
*
vcpr
a
.
x
)
;
float
v
rel
=
vcnormal
.
x
*
tempx
+
vcnormal
.
y
*
tempy
;
if
(
v
rel
<
-
settings
.
velocity
threshold
)
{
vcp
.
velocity
bias
=
-
vc
.
restitution
*
v
rel
;
}
}
if
(
vc
.
point
count
==
2
)
{
velocity
constraint
point
vcp
1
=
vc
.
points
[
0
]
;
velocity
constraint
point
vcp
2
=
vc
.
points
[
1
]
;
float
rn
1
a
=
vcp
1
.
r
a
.
x
*
vcnormal
.
y
-
vcp
1
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
1
b
=
vcp
1
.
r
b
.
x
*
vcnormal
.
y
-
vcp
1
.
r
b
.
y
*
vcnormal
.
x
;
float
rn
2
a
=
vcp
2
.
r
a
.
x
*
vcnormal
.
y
-
vcp
2
.
r
a
.
y
*
vcnormal
.
x
;
float
rn
2
b
=
vcp
2
.
r
b
.
x
*
vcnormal
.
y
-
vcp
2
.
r
b
.
y
*
vcnormal
.
x
;
float
k
11
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
1
a
+
i
b
*
rn
1
b
*
rn
1
b
;
float
k
22
=
m
a
+
m
b
+
i
a
*
rn
2
a
*
rn
2
a
+
i
b
*
rn
2
b
*
rn
2
b
;
float
k
12
=
m
a
+
m
b
+
i
a
*
rn
1
a
*
rn
2
a
+
i
b
*
rn
1
b
*
rn
2
b
;
if
(
k
11
*
k
11
<
k
max
condition
number
*
(
k
11
*
k
22
-
k
12
*
k
12
)
)
{
vc
.
k
.
ex
.
x
=
k
11
;
vc
.
k
.
ex
.
y
=
k
12
;
vc
.
k
.
ey
.
x
=
k
12
;
vc
.
k
.
ey
.
y
=
k
22
;
vc
.
k
.
invert
to
out
(
vc
.
normal
mass
)
;
}
else
{
vc
.
point
count
=
1
;
}
}
}
}
<SENTENCE_END/>
solve,velocity,constraintssolve%END% (2.02e-01)
%UNK% (1.57e-01)
set (4.59e-02)
mul (4.00e-02)
2 (3.05e-02)
solve (2.33e-02)
cross (2.04e-02)
to (1.67e-02)
pick (1.47e-02)
dst (1.32e-02)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
final
float
normalx
=
normal
.
x
;
final
float
normaly
=
normal
.
y
;
float
tangentx
=
1.0f
*
vc
.
normal
.
y
;
float
tangenty
=
-
1.0f
*
vc
.
normal
.
x
;
final
float
friction
=
vc
.
friction
;
assert
(
point
count
==
1
||
point
count
==
2
)
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
final
vec
2
a
=
vcp
.
r
a
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
a
.
x
;
final
float
vt
=
dvx
*
tangentx
+
dvy
*
tangenty
-
vc
.
tangent
speed
;
float
lambda
=
vcp
.
tangent
mass
*
(
-
vt
)
;
final
float
max
friction
=
friction
*
vcp
.
normal
impulse
;
final
float
new
impulse
=
math
utils
.
clamp
(
vcp
.
tangent
impulse
+
lambda
,
-
max
friction
,
max
friction
)
;
lambda
=
new
impulse
-
vcp
.
tangent
impulse
;
vcp
.
tangent
impulse
=
new
impulse
;
final
float
px
=
tangentx
*
lambda
;
final
float
py
=
tangenty
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
if
(
vc
.
point
count
==
1
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
0
]
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
vcp
.
r
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
vcp
.
r
a
.
x
;
final
float
vn
=
dvx
*
normalx
+
dvy
*
normaly
;
float
lambda
=
-
vcp
.
normal
mass
*
(
vn
-
vcp
.
velocity
bias
)
;
float
a
=
vcp
.
normal
impulse
+
lambda
;
final
float
new
impulse
=
(
a
>
0.0f
?
a
:
0.0f
)
;
lambda
=
new
impulse
-
vcp
.
normal
impulse
;
vcp
.
normal
impulse
=
new
impulse
;
float
px
=
normalx
*
lambda
;
float
py
=
normaly
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
else
{
final
velocity
constraint
point
cp
1
=
vc
.
points
[
0
]
;
final
velocity
constraint
point
cp
2
=
vc
.
points
[
1
]
;
final
vec
2
cp
1
r
a
=
cp
1
.
r
a
;
final
vec
2
cp
1
r
b
=
cp
1
.
r
b
;
final
vec
2
cp
2
r
a
=
cp
2
.
r
a
;
final
vec
2
cp
2
r
b
=
cp
2
.
r
b
;
float
ax
=
cp
1
.
normal
impulse
;
float
ay
=
cp
2
.
normal
impulse
;
assert
(
ax
>=
0.0f
&&
ay
>=
0.0f
)
;
float
dv
1
x
=
-
w
b
*
cp
1
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
1
r
a
.
y
;
float
dv
1
y
=
w
b
*
cp
1
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
1
r
a
.
x
;
float
dv
2
x
=
-
w
b
*
cp
2
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
2
r
a
.
y
;
float
dv
2
y
=
w
b
*
cp
2
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
2
r
a
.
x
;
float
vn
1
=
dv
1
x
*
normalx
+
dv
1
y
*
normaly
;
float
vn
2
=
dv
2
x
*
normalx
+
dv
2
y
*
normaly
;
float
bx
=
vn
1
-
cp
1
.
velocity
bias
;
float
by
=
vn
2
-
cp
2
.
velocity
bias
;
mat
22
r
=
vc
.
k
;
bx
-=
r
.
ex
.
x
*
ax
+
r
.
ey
.
x
*
ay
;
by
-=
r
.
ex
.
y
*
ax
+
r
.
ey
.
y
*
ay
;
for
(
;
;
)
{
mat
22
r
1
=
vc
.
normal
mass
;
float
xx
=
r
1
.
ex
.
x
*
bx
+
r
1
.
ey
.
x
*
by
;
float
xy
=
r
1
.
ex
.
y
*
bx
+
r
1
.
ey
.
y
*
by
;
xx
*=
-
1
;
xy
*=
-
1
;
if
(
xx
>=
0.0f
&&
xy
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
dx
*
normalx
;
float
p
1
y
=
dx
*
normaly
;
float
p
2
x
=
dy
*
normalx
;
float
p
2
y
=
dy
*
normaly
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
-
cp
1
.
normal
mass
*
bx
;
xy
=
0.0f
;
vn
1
=
0.0f
;
vn
2
=
vc
.
k
.
ex
.
y
*
xx
+
by
;
if
(
xx
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
-
cp
2
.
normal
mass
*
by
;
vn
1
=
vc
.
k
.
ey
.
x
*
xy
+
bx
;
vn
2
=
0.0f
;
if
(
xy
>=
0.0f
&&
vn
1
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
0.0f
;
vn
1
=
bx
;
vn
2
=
by
;
if
(
vn
1
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
break
;
}
break
;
}
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
final
float
normalx
=
normal
.
x
;
final
float
normaly
=
normal
.
y
;
float
tangentx
=
1.0f
*
vc
.
normal
.
y
;
float
tangenty
=
-
1.0f
*
vc
.
normal
.
x
;
final
float
friction
=
vc
.
friction
;
assert
(
point
count
==
1
||
point
count
==
2
)
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
final
vec
2
a
=
vcp
.
r
a
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
a
.
x
;
final
float
vt
=
dvx
*
tangentx
+
dvy
*
tangenty
-
vc
.
tangent
speed
;
float
lambda
=
vcp
.
tangent
mass
*
(
-
vt
)
;
final
float
max
friction
=
friction
*
vcp
.
normal
impulse
;
final
float
new
impulse
=
math
utils
.
clamp
(
vcp
.
tangent
impulse
+
lambda
,
-
max
friction
,
max
friction
)
;
lambda
=
new
impulse
-
vcp
.
tangent
impulse
;
vcp
.
tangent
impulse
=
new
impulse
;
final
float
px
=
tangentx
*
lambda
;
final
float
py
=
tangenty
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
if
(
vc
.
point
count
==
1
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
0
]
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
vcp
.
r
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
vcp
.
r
a
.
x
;
final
float
vn
=
dvx
*
normalx
+
dvy
*
normaly
;
float
lambda
=
-
vcp
.
normal
mass
*
(
vn
-
vcp
.
velocity
bias
)
;
float
a
=
vcp
.
normal
impulse
+
lambda
;
final
float
new
impulse
=
(
a
>
0.0f
?
a
:
0.0f
)
;
lambda
=
new
impulse
-
vcp
.
normal
impulse
;
vcp
.
normal
impulse
=
new
impulse
;
float
px
=
normalx
*
lambda
;
float
py
=
normaly
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
else
{
final
velocity
constraint
point
cp
1
=
vc
.
points
[
0
]
;
final
velocity
constraint
point
cp
2
=
vc
.
points
[
1
]
;
final
vec
2
cp
1
r
a
=
cp
1
.
r
a
;
final
vec
2
cp
1
r
b
=
cp
1
.
r
b
;
final
vec
2
cp
2
r
a
=
cp
2
.
r
a
;
final
vec
2
cp
2
r
b
=
cp
2
.
r
b
;
float
ax
=
cp
1
.
normal
impulse
;
float
ay
=
cp
2
.
normal
impulse
;
assert
(
ax
>=
0.0f
&&
ay
>=
0.0f
)
;
float
dv
1
x
=
-
w
b
*
cp
1
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
1
r
a
.
y
;
float
dv
1
y
=
w
b
*
cp
1
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
1
r
a
.
x
;
float
dv
2
x
=
-
w
b
*
cp
2
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
2
r
a
.
y
;
float
dv
2
y
=
w
b
*
cp
2
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
2
r
a
.
x
;
float
vn
1
=
dv
1
x
*
normalx
+
dv
1
y
*
normaly
;
float
vn
2
=
dv
2
x
*
normalx
+
dv
2
y
*
normaly
;
float
bx
=
vn
1
-
cp
1
.
velocity
bias
;
float
by
=
vn
2
-
cp
2
.
velocity
bias
;
mat
22
r
=
vc
.
k
;
bx
-=
r
.
ex
.
x
*
ax
+
r
.
ey
.
x
*
ay
;
by
-=
r
.
ex
.
y
*
ax
+
r
.
ey
.
y
*
ay
;
for
(
;
;
)
{
mat
22
r
1
=
vc
.
normal
mass
;
float
xx
=
r
1
.
ex
.
x
*
bx
+
r
1
.
ey
.
x
*
by
;
float
xy
=
r
1
.
ex
.
y
*
bx
+
r
1
.
ey
.
y
*
by
;
xx
*=
-
1
;
xy
*=
-
1
;
if
(
xx
>=
0.0f
&&
xy
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
dx
*
normalx
;
float
p
1
y
=
dx
*
normaly
;
float
p
2
x
=
dy
*
normalx
;
float
p
2
y
=
dy
*
normaly
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
-
cp
1
.
normal
mass
*
bx
;
xy
=
0.0f
;
vn
1
=
0.0f
;
vn
2
=
vc
.
k
.
ex
.
y
*
xx
+
by
;
if
(
xx
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
-
cp
2
.
normal
mass
*
by
;
vn
1
=
vc
.
k
.
ey
.
x
*
xy
+
bx
;
vn
2
=
0.0f
;
if
(
xy
>=
0.0f
&&
vn
1
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
0.0f
;
vn
1
=
bx
;
vn
2
=
by
;
if
(
vn
1
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
break
;
}
break
;
}
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
velocity%END% (4.21e-01)
%UNK% (1.13e-01)
2 (3.26e-02)
set (1.66e-02)
to (1.61e-02)
mul (1.56e-02)
solve (1.39e-02)
cross (1.05e-02)
pick (9.80e-03)
ray (8.41e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
final
float
normalx
=
normal
.
x
;
final
float
normaly
=
normal
.
y
;
float
tangentx
=
1.0f
*
vc
.
normal
.
y
;
float
tangenty
=
-
1.0f
*
vc
.
normal
.
x
;
final
float
friction
=
vc
.
friction
;
assert
(
point
count
==
1
||
point
count
==
2
)
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
final
vec
2
a
=
vcp
.
r
a
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
a
.
x
;
final
float
vt
=
dvx
*
tangentx
+
dvy
*
tangenty
-
vc
.
tangent
speed
;
float
lambda
=
vcp
.
tangent
mass
*
(
-
vt
)
;
final
float
max
friction
=
friction
*
vcp
.
normal
impulse
;
final
float
new
impulse
=
math
utils
.
clamp
(
vcp
.
tangent
impulse
+
lambda
,
-
max
friction
,
max
friction
)
;
lambda
=
new
impulse
-
vcp
.
tangent
impulse
;
vcp
.
tangent
impulse
=
new
impulse
;
final
float
px
=
tangentx
*
lambda
;
final
float
py
=
tangenty
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
if
(
vc
.
point
count
==
1
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
0
]
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
vcp
.
r
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
vcp
.
r
a
.
x
;
final
float
vn
=
dvx
*
normalx
+
dvy
*
normaly
;
float
lambda
=
-
vcp
.
normal
mass
*
(
vn
-
vcp
.
velocity
bias
)
;
float
a
=
vcp
.
normal
impulse
+
lambda
;
final
float
new
impulse
=
(
a
>
0.0f
?
a
:
0.0f
)
;
lambda
=
new
impulse
-
vcp
.
normal
impulse
;
vcp
.
normal
impulse
=
new
impulse
;
float
px
=
normalx
*
lambda
;
float
py
=
normaly
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
else
{
final
velocity
constraint
point
cp
1
=
vc
.
points
[
0
]
;
final
velocity
constraint
point
cp
2
=
vc
.
points
[
1
]
;
final
vec
2
cp
1
r
a
=
cp
1
.
r
a
;
final
vec
2
cp
1
r
b
=
cp
1
.
r
b
;
final
vec
2
cp
2
r
a
=
cp
2
.
r
a
;
final
vec
2
cp
2
r
b
=
cp
2
.
r
b
;
float
ax
=
cp
1
.
normal
impulse
;
float
ay
=
cp
2
.
normal
impulse
;
assert
(
ax
>=
0.0f
&&
ay
>=
0.0f
)
;
float
dv
1
x
=
-
w
b
*
cp
1
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
1
r
a
.
y
;
float
dv
1
y
=
w
b
*
cp
1
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
1
r
a
.
x
;
float
dv
2
x
=
-
w
b
*
cp
2
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
2
r
a
.
y
;
float
dv
2
y
=
w
b
*
cp
2
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
2
r
a
.
x
;
float
vn
1
=
dv
1
x
*
normalx
+
dv
1
y
*
normaly
;
float
vn
2
=
dv
2
x
*
normalx
+
dv
2
y
*
normaly
;
float
bx
=
vn
1
-
cp
1
.
velocity
bias
;
float
by
=
vn
2
-
cp
2
.
velocity
bias
;
mat
22
r
=
vc
.
k
;
bx
-=
r
.
ex
.
x
*
ax
+
r
.
ey
.
x
*
ay
;
by
-=
r
.
ex
.
y
*
ax
+
r
.
ey
.
y
*
ay
;
for
(
;
;
)
{
mat
22
r
1
=
vc
.
normal
mass
;
float
xx
=
r
1
.
ex
.
x
*
bx
+
r
1
.
ey
.
x
*
by
;
float
xy
=
r
1
.
ex
.
y
*
bx
+
r
1
.
ey
.
y
*
by
;
xx
*=
-
1
;
xy
*=
-
1
;
if
(
xx
>=
0.0f
&&
xy
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
dx
*
normalx
;
float
p
1
y
=
dx
*
normaly
;
float
p
2
x
=
dy
*
normalx
;
float
p
2
y
=
dy
*
normaly
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
-
cp
1
.
normal
mass
*
bx
;
xy
=
0.0f
;
vn
1
=
0.0f
;
vn
2
=
vc
.
k
.
ex
.
y
*
xx
+
by
;
if
(
xx
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
-
cp
2
.
normal
mass
*
by
;
vn
1
=
vc
.
k
.
ey
.
x
*
xy
+
bx
;
vn
2
=
0.0f
;
if
(
xy
>=
0.0f
&&
vn
1
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
0.0f
;
vn
1
=
bx
;
vn
2
=
by
;
if
(
vn
1
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
break
;
}
break
;
}
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
final
float
normalx
=
normal
.
x
;
final
float
normaly
=
normal
.
y
;
float
tangentx
=
1.0f
*
vc
.
normal
.
y
;
float
tangenty
=
-
1.0f
*
vc
.
normal
.
x
;
final
float
friction
=
vc
.
friction
;
assert
(
point
count
==
1
||
point
count
==
2
)
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
final
vec
2
a
=
vcp
.
r
a
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
a
.
x
;
final
float
vt
=
dvx
*
tangentx
+
dvy
*
tangenty
-
vc
.
tangent
speed
;
float
lambda
=
vcp
.
tangent
mass
*
(
-
vt
)
;
final
float
max
friction
=
friction
*
vcp
.
normal
impulse
;
final
float
new
impulse
=
math
utils
.
clamp
(
vcp
.
tangent
impulse
+
lambda
,
-
max
friction
,
max
friction
)
;
lambda
=
new
impulse
-
vcp
.
tangent
impulse
;
vcp
.
tangent
impulse
=
new
impulse
;
final
float
px
=
tangentx
*
lambda
;
final
float
py
=
tangenty
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
if
(
vc
.
point
count
==
1
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
0
]
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
vcp
.
r
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
vcp
.
r
a
.
x
;
final
float
vn
=
dvx
*
normalx
+
dvy
*
normaly
;
float
lambda
=
-
vcp
.
normal
mass
*
(
vn
-
vcp
.
velocity
bias
)
;
float
a
=
vcp
.
normal
impulse
+
lambda
;
final
float
new
impulse
=
(
a
>
0.0f
?
a
:
0.0f
)
;
lambda
=
new
impulse
-
vcp
.
normal
impulse
;
vcp
.
normal
impulse
=
new
impulse
;
float
px
=
normalx
*
lambda
;
float
py
=
normaly
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
else
{
final
velocity
constraint
point
cp
1
=
vc
.
points
[
0
]
;
final
velocity
constraint
point
cp
2
=
vc
.
points
[
1
]
;
final
vec
2
cp
1
r
a
=
cp
1
.
r
a
;
final
vec
2
cp
1
r
b
=
cp
1
.
r
b
;
final
vec
2
cp
2
r
a
=
cp
2
.
r
a
;
final
vec
2
cp
2
r
b
=
cp
2
.
r
b
;
float
ax
=
cp
1
.
normal
impulse
;
float
ay
=
cp
2
.
normal
impulse
;
assert
(
ax
>=
0.0f
&&
ay
>=
0.0f
)
;
float
dv
1
x
=
-
w
b
*
cp
1
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
1
r
a
.
y
;
float
dv
1
y
=
w
b
*
cp
1
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
1
r
a
.
x
;
float
dv
2
x
=
-
w
b
*
cp
2
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
2
r
a
.
y
;
float
dv
2
y
=
w
b
*
cp
2
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
2
r
a
.
x
;
float
vn
1
=
dv
1
x
*
normalx
+
dv
1
y
*
normaly
;
float
vn
2
=
dv
2
x
*
normalx
+
dv
2
y
*
normaly
;
float
bx
=
vn
1
-
cp
1
.
velocity
bias
;
float
by
=
vn
2
-
cp
2
.
velocity
bias
;
mat
22
r
=
vc
.
k
;
bx
-=
r
.
ex
.
x
*
ax
+
r
.
ey
.
x
*
ay
;
by
-=
r
.
ex
.
y
*
ax
+
r
.
ey
.
y
*
ay
;
for
(
;
;
)
{
mat
22
r
1
=
vc
.
normal
mass
;
float
xx
=
r
1
.
ex
.
x
*
bx
+
r
1
.
ey
.
x
*
by
;
float
xy
=
r
1
.
ex
.
y
*
bx
+
r
1
.
ey
.
y
*
by
;
xx
*=
-
1
;
xy
*=
-
1
;
if
(
xx
>=
0.0f
&&
xy
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
dx
*
normalx
;
float
p
1
y
=
dx
*
normaly
;
float
p
2
x
=
dy
*
normalx
;
float
p
2
y
=
dy
*
normaly
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
-
cp
1
.
normal
mass
*
bx
;
xy
=
0.0f
;
vn
1
=
0.0f
;
vn
2
=
vc
.
k
.
ex
.
y
*
xx
+
by
;
if
(
xx
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
-
cp
2
.
normal
mass
*
by
;
vn
1
=
vc
.
k
.
ey
.
x
*
xy
+
bx
;
vn
2
=
0.0f
;
if
(
xy
>=
0.0f
&&
vn
1
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
0.0f
;
vn
1
=
bx
;
vn
2
=
by
;
if
(
vn
1
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
break
;
}
break
;
}
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
constraints%END% (4.74e-01)
%UNK% (9.91e-02)
2 (3.22e-02)
to (1.58e-02)
mul (1.32e-02)
solve (1.22e-02)
set (1.18e-02)
cross (9.38e-03)
pick (9.17e-03)
ray (7.87e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
final
float
normalx
=
normal
.
x
;
final
float
normaly
=
normal
.
y
;
float
tangentx
=
1.0f
*
vc
.
normal
.
y
;
float
tangenty
=
-
1.0f
*
vc
.
normal
.
x
;
final
float
friction
=
vc
.
friction
;
assert
(
point
count
==
1
||
point
count
==
2
)
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
final
vec
2
a
=
vcp
.
r
a
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
a
.
x
;
final
float
vt
=
dvx
*
tangentx
+
dvy
*
tangenty
-
vc
.
tangent
speed
;
float
lambda
=
vcp
.
tangent
mass
*
(
-
vt
)
;
final
float
max
friction
=
friction
*
vcp
.
normal
impulse
;
final
float
new
impulse
=
math
utils
.
clamp
(
vcp
.
tangent
impulse
+
lambda
,
-
max
friction
,
max
friction
)
;
lambda
=
new
impulse
-
vcp
.
tangent
impulse
;
vcp
.
tangent
impulse
=
new
impulse
;
final
float
px
=
tangentx
*
lambda
;
final
float
py
=
tangenty
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
if
(
vc
.
point
count
==
1
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
0
]
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
vcp
.
r
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
vcp
.
r
a
.
x
;
final
float
vn
=
dvx
*
normalx
+
dvy
*
normaly
;
float
lambda
=
-
vcp
.
normal
mass
*
(
vn
-
vcp
.
velocity
bias
)
;
float
a
=
vcp
.
normal
impulse
+
lambda
;
final
float
new
impulse
=
(
a
>
0.0f
?
a
:
0.0f
)
;
lambda
=
new
impulse
-
vcp
.
normal
impulse
;
vcp
.
normal
impulse
=
new
impulse
;
float
px
=
normalx
*
lambda
;
float
py
=
normaly
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
else
{
final
velocity
constraint
point
cp
1
=
vc
.
points
[
0
]
;
final
velocity
constraint
point
cp
2
=
vc
.
points
[
1
]
;
final
vec
2
cp
1
r
a
=
cp
1
.
r
a
;
final
vec
2
cp
1
r
b
=
cp
1
.
r
b
;
final
vec
2
cp
2
r
a
=
cp
2
.
r
a
;
final
vec
2
cp
2
r
b
=
cp
2
.
r
b
;
float
ax
=
cp
1
.
normal
impulse
;
float
ay
=
cp
2
.
normal
impulse
;
assert
(
ax
>=
0.0f
&&
ay
>=
0.0f
)
;
float
dv
1
x
=
-
w
b
*
cp
1
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
1
r
a
.
y
;
float
dv
1
y
=
w
b
*
cp
1
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
1
r
a
.
x
;
float
dv
2
x
=
-
w
b
*
cp
2
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
2
r
a
.
y
;
float
dv
2
y
=
w
b
*
cp
2
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
2
r
a
.
x
;
float
vn
1
=
dv
1
x
*
normalx
+
dv
1
y
*
normaly
;
float
vn
2
=
dv
2
x
*
normalx
+
dv
2
y
*
normaly
;
float
bx
=
vn
1
-
cp
1
.
velocity
bias
;
float
by
=
vn
2
-
cp
2
.
velocity
bias
;
mat
22
r
=
vc
.
k
;
bx
-=
r
.
ex
.
x
*
ax
+
r
.
ey
.
x
*
ay
;
by
-=
r
.
ex
.
y
*
ax
+
r
.
ey
.
y
*
ay
;
for
(
;
;
)
{
mat
22
r
1
=
vc
.
normal
mass
;
float
xx
=
r
1
.
ex
.
x
*
bx
+
r
1
.
ey
.
x
*
by
;
float
xy
=
r
1
.
ex
.
y
*
bx
+
r
1
.
ey
.
y
*
by
;
xx
*=
-
1
;
xy
*=
-
1
;
if
(
xx
>=
0.0f
&&
xy
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
dx
*
normalx
;
float
p
1
y
=
dx
*
normaly
;
float
p
2
x
=
dy
*
normalx
;
float
p
2
y
=
dy
*
normaly
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
-
cp
1
.
normal
mass
*
bx
;
xy
=
0.0f
;
vn
1
=
0.0f
;
vn
2
=
vc
.
k
.
ex
.
y
*
xx
+
by
;
if
(
xx
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
-
cp
2
.
normal
mass
*
by
;
vn
1
=
vc
.
k
.
ey
.
x
*
xy
+
bx
;
vn
2
=
0.0f
;
if
(
xy
>=
0.0f
&&
vn
1
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
0.0f
;
vn
1
=
bx
;
vn
2
=
by
;
if
(
vn
1
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
break
;
}
break
;
}
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
final
float
normalx
=
normal
.
x
;
final
float
normaly
=
normal
.
y
;
float
tangentx
=
1.0f
*
vc
.
normal
.
y
;
float
tangenty
=
-
1.0f
*
vc
.
normal
.
x
;
final
float
friction
=
vc
.
friction
;
assert
(
point
count
==
1
||
point
count
==
2
)
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
final
vec
2
a
=
vcp
.
r
a
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
a
.
x
;
final
float
vt
=
dvx
*
tangentx
+
dvy
*
tangenty
-
vc
.
tangent
speed
;
float
lambda
=
vcp
.
tangent
mass
*
(
-
vt
)
;
final
float
max
friction
=
friction
*
vcp
.
normal
impulse
;
final
float
new
impulse
=
math
utils
.
clamp
(
vcp
.
tangent
impulse
+
lambda
,
-
max
friction
,
max
friction
)
;
lambda
=
new
impulse
-
vcp
.
tangent
impulse
;
vcp
.
tangent
impulse
=
new
impulse
;
final
float
px
=
tangentx
*
lambda
;
final
float
py
=
tangenty
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
if
(
vc
.
point
count
==
1
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
0
]
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
vcp
.
r
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
vcp
.
r
a
.
x
;
final
float
vn
=
dvx
*
normalx
+
dvy
*
normaly
;
float
lambda
=
-
vcp
.
normal
mass
*
(
vn
-
vcp
.
velocity
bias
)
;
float
a
=
vcp
.
normal
impulse
+
lambda
;
final
float
new
impulse
=
(
a
>
0.0f
?
a
:
0.0f
)
;
lambda
=
new
impulse
-
vcp
.
normal
impulse
;
vcp
.
normal
impulse
=
new
impulse
;
float
px
=
normalx
*
lambda
;
float
py
=
normaly
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
else
{
final
velocity
constraint
point
cp
1
=
vc
.
points
[
0
]
;
final
velocity
constraint
point
cp
2
=
vc
.
points
[
1
]
;
final
vec
2
cp
1
r
a
=
cp
1
.
r
a
;
final
vec
2
cp
1
r
b
=
cp
1
.
r
b
;
final
vec
2
cp
2
r
a
=
cp
2
.
r
a
;
final
vec
2
cp
2
r
b
=
cp
2
.
r
b
;
float
ax
=
cp
1
.
normal
impulse
;
float
ay
=
cp
2
.
normal
impulse
;
assert
(
ax
>=
0.0f
&&
ay
>=
0.0f
)
;
float
dv
1
x
=
-
w
b
*
cp
1
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
1
r
a
.
y
;
float
dv
1
y
=
w
b
*
cp
1
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
1
r
a
.
x
;
float
dv
2
x
=
-
w
b
*
cp
2
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
2
r
a
.
y
;
float
dv
2
y
=
w
b
*
cp
2
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
2
r
a
.
x
;
float
vn
1
=
dv
1
x
*
normalx
+
dv
1
y
*
normaly
;
float
vn
2
=
dv
2
x
*
normalx
+
dv
2
y
*
normaly
;
float
bx
=
vn
1
-
cp
1
.
velocity
bias
;
float
by
=
vn
2
-
cp
2
.
velocity
bias
;
mat
22
r
=
vc
.
k
;
bx
-=
r
.
ex
.
x
*
ax
+
r
.
ey
.
x
*
ay
;
by
-=
r
.
ex
.
y
*
ax
+
r
.
ey
.
y
*
ay
;
for
(
;
;
)
{
mat
22
r
1
=
vc
.
normal
mass
;
float
xx
=
r
1
.
ex
.
x
*
bx
+
r
1
.
ey
.
x
*
by
;
float
xy
=
r
1
.
ex
.
y
*
bx
+
r
1
.
ey
.
y
*
by
;
xx
*=
-
1
;
xy
*=
-
1
;
if
(
xx
>=
0.0f
&&
xy
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
dx
*
normalx
;
float
p
1
y
=
dx
*
normaly
;
float
p
2
x
=
dy
*
normalx
;
float
p
2
y
=
dy
*
normaly
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
-
cp
1
.
normal
mass
*
bx
;
xy
=
0.0f
;
vn
1
=
0.0f
;
vn
2
=
vc
.
k
.
ex
.
y
*
xx
+
by
;
if
(
xx
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
-
cp
2
.
normal
mass
*
by
;
vn
1
=
vc
.
k
.
ey
.
x
*
xy
+
bx
;
vn
2
=
0.0f
;
if
(
xy
>=
0.0f
&&
vn
1
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
0.0f
;
vn
1
=
bx
;
vn
2
=
by
;
if
(
vn
1
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
break
;
}
break
;
}
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
%END%%END% (5.08e-01)
%UNK% (9.12e-02)
2 (3.16e-02)
to (1.53e-02)
mul (1.15e-02)
solve (1.10e-02)
set (9.59e-03)
pick (8.49e-03)
cross (8.46e-03)
ray (7.49e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
final
float
normalx
=
normal
.
x
;
final
float
normaly
=
normal
.
y
;
float
tangentx
=
1.0f
*
vc
.
normal
.
y
;
float
tangenty
=
-
1.0f
*
vc
.
normal
.
x
;
final
float
friction
=
vc
.
friction
;
assert
(
point
count
==
1
||
point
count
==
2
)
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
final
vec
2
a
=
vcp
.
r
a
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
a
.
x
;
final
float
vt
=
dvx
*
tangentx
+
dvy
*
tangenty
-
vc
.
tangent
speed
;
float
lambda
=
vcp
.
tangent
mass
*
(
-
vt
)
;
final
float
max
friction
=
friction
*
vcp
.
normal
impulse
;
final
float
new
impulse
=
math
utils
.
clamp
(
vcp
.
tangent
impulse
+
lambda
,
-
max
friction
,
max
friction
)
;
lambda
=
new
impulse
-
vcp
.
tangent
impulse
;
vcp
.
tangent
impulse
=
new
impulse
;
final
float
px
=
tangentx
*
lambda
;
final
float
py
=
tangenty
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
if
(
vc
.
point
count
==
1
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
0
]
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
vcp
.
r
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
vcp
.
r
a
.
x
;
final
float
vn
=
dvx
*
normalx
+
dvy
*
normaly
;
float
lambda
=
-
vcp
.
normal
mass
*
(
vn
-
vcp
.
velocity
bias
)
;
float
a
=
vcp
.
normal
impulse
+
lambda
;
final
float
new
impulse
=
(
a
>
0.0f
?
a
:
0.0f
)
;
lambda
=
new
impulse
-
vcp
.
normal
impulse
;
vcp
.
normal
impulse
=
new
impulse
;
float
px
=
normalx
*
lambda
;
float
py
=
normaly
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
else
{
final
velocity
constraint
point
cp
1
=
vc
.
points
[
0
]
;
final
velocity
constraint
point
cp
2
=
vc
.
points
[
1
]
;
final
vec
2
cp
1
r
a
=
cp
1
.
r
a
;
final
vec
2
cp
1
r
b
=
cp
1
.
r
b
;
final
vec
2
cp
2
r
a
=
cp
2
.
r
a
;
final
vec
2
cp
2
r
b
=
cp
2
.
r
b
;
float
ax
=
cp
1
.
normal
impulse
;
float
ay
=
cp
2
.
normal
impulse
;
assert
(
ax
>=
0.0f
&&
ay
>=
0.0f
)
;
float
dv
1
x
=
-
w
b
*
cp
1
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
1
r
a
.
y
;
float
dv
1
y
=
w
b
*
cp
1
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
1
r
a
.
x
;
float
dv
2
x
=
-
w
b
*
cp
2
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
2
r
a
.
y
;
float
dv
2
y
=
w
b
*
cp
2
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
2
r
a
.
x
;
float
vn
1
=
dv
1
x
*
normalx
+
dv
1
y
*
normaly
;
float
vn
2
=
dv
2
x
*
normalx
+
dv
2
y
*
normaly
;
float
bx
=
vn
1
-
cp
1
.
velocity
bias
;
float
by
=
vn
2
-
cp
2
.
velocity
bias
;
mat
22
r
=
vc
.
k
;
bx
-=
r
.
ex
.
x
*
ax
+
r
.
ey
.
x
*
ay
;
by
-=
r
.
ex
.
y
*
ax
+
r
.
ey
.
y
*
ay
;
for
(
;
;
)
{
mat
22
r
1
=
vc
.
normal
mass
;
float
xx
=
r
1
.
ex
.
x
*
bx
+
r
1
.
ey
.
x
*
by
;
float
xy
=
r
1
.
ex
.
y
*
bx
+
r
1
.
ey
.
y
*
by
;
xx
*=
-
1
;
xy
*=
-
1
;
if
(
xx
>=
0.0f
&&
xy
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
dx
*
normalx
;
float
p
1
y
=
dx
*
normaly
;
float
p
2
x
=
dy
*
normalx
;
float
p
2
y
=
dy
*
normaly
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
-
cp
1
.
normal
mass
*
bx
;
xy
=
0.0f
;
vn
1
=
0.0f
;
vn
2
=
vc
.
k
.
ex
.
y
*
xx
+
by
;
if
(
xx
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
-
cp
2
.
normal
mass
*
by
;
vn
1
=
vc
.
k
.
ey
.
x
*
xy
+
bx
;
vn
2
=
0.0f
;
if
(
xy
>=
0.0f
&&
vn
1
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
0.0f
;
vn
1
=
bx
;
vn
2
=
by
;
if
(
vn
1
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
break
;
}
break
;
}
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
int
index
a
=
vc
.
index
a
;
int
index
b
=
vc
.
index
b
;
float
m
a
=
vc
.
inv
mass
a
;
float
m
b
=
vc
.
inv
mass
b
;
float
i
a
=
vc
.
inv
ia
;
float
i
b
=
vc
.
inv
ib
;
int
point
count
=
vc
.
point
count
;
vec
2
v
a
=
m
velocities
[
index
a
]
.
v
;
float
w
a
=
m
velocities
[
index
a
]
.
w
;
vec
2
v
b
=
m
velocities
[
index
b
]
.
v
;
float
w
b
=
m
velocities
[
index
b
]
.
w
;
vec
2
normal
=
vc
.
normal
;
final
float
normalx
=
normal
.
x
;
final
float
normaly
=
normal
.
y
;
float
tangentx
=
1.0f
*
vc
.
normal
.
y
;
float
tangenty
=
-
1.0f
*
vc
.
normal
.
x
;
final
float
friction
=
vc
.
friction
;
assert
(
point
count
==
1
||
point
count
==
2
)
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
j
]
;
final
vec
2
a
=
vcp
.
r
a
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
a
.
x
;
final
float
vt
=
dvx
*
tangentx
+
dvy
*
tangenty
-
vc
.
tangent
speed
;
float
lambda
=
vcp
.
tangent
mass
*
(
-
vt
)
;
final
float
max
friction
=
friction
*
vcp
.
normal
impulse
;
final
float
new
impulse
=
math
utils
.
clamp
(
vcp
.
tangent
impulse
+
lambda
,
-
max
friction
,
max
friction
)
;
lambda
=
new
impulse
-
vcp
.
tangent
impulse
;
vcp
.
tangent
impulse
=
new
impulse
;
final
float
px
=
tangentx
*
lambda
;
final
float
py
=
tangenty
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
if
(
vc
.
point
count
==
1
)
{
final
velocity
constraint
point
vcp
=
vc
.
points
[
0
]
;
float
dvx
=
-
w
b
*
vcp
.
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
vcp
.
r
a
.
y
;
float
dvy
=
w
b
*
vcp
.
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
vcp
.
r
a
.
x
;
final
float
vn
=
dvx
*
normalx
+
dvy
*
normaly
;
float
lambda
=
-
vcp
.
normal
mass
*
(
vn
-
vcp
.
velocity
bias
)
;
float
a
=
vcp
.
normal
impulse
+
lambda
;
final
float
new
impulse
=
(
a
>
0.0f
?
a
:
0.0f
)
;
lambda
=
new
impulse
-
vcp
.
normal
impulse
;
vcp
.
normal
impulse
=
new
impulse
;
float
px
=
normalx
*
lambda
;
float
py
=
normaly
*
lambda
;
v
a
.
x
-=
px
*
m
a
;
v
a
.
y
-=
py
*
m
a
;
w
a
-=
i
a
*
(
vcp
.
r
a
.
x
*
py
-
vcp
.
r
a
.
y
*
px
)
;
v
b
.
x
+=
px
*
m
b
;
v
b
.
y
+=
py
*
m
b
;
w
b
+=
i
b
*
(
vcp
.
r
b
.
x
*
py
-
vcp
.
r
b
.
y
*
px
)
;
}
else
{
final
velocity
constraint
point
cp
1
=
vc
.
points
[
0
]
;
final
velocity
constraint
point
cp
2
=
vc
.
points
[
1
]
;
final
vec
2
cp
1
r
a
=
cp
1
.
r
a
;
final
vec
2
cp
1
r
b
=
cp
1
.
r
b
;
final
vec
2
cp
2
r
a
=
cp
2
.
r
a
;
final
vec
2
cp
2
r
b
=
cp
2
.
r
b
;
float
ax
=
cp
1
.
normal
impulse
;
float
ay
=
cp
2
.
normal
impulse
;
assert
(
ax
>=
0.0f
&&
ay
>=
0.0f
)
;
float
dv
1
x
=
-
w
b
*
cp
1
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
1
r
a
.
y
;
float
dv
1
y
=
w
b
*
cp
1
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
1
r
a
.
x
;
float
dv
2
x
=
-
w
b
*
cp
2
r
b
.
y
+
v
b
.
x
-
v
a
.
x
+
w
a
*
cp
2
r
a
.
y
;
float
dv
2
y
=
w
b
*
cp
2
r
b
.
x
+
v
b
.
y
-
v
a
.
y
-
w
a
*
cp
2
r
a
.
x
;
float
vn
1
=
dv
1
x
*
normalx
+
dv
1
y
*
normaly
;
float
vn
2
=
dv
2
x
*
normalx
+
dv
2
y
*
normaly
;
float
bx
=
vn
1
-
cp
1
.
velocity
bias
;
float
by
=
vn
2
-
cp
2
.
velocity
bias
;
mat
22
r
=
vc
.
k
;
bx
-=
r
.
ex
.
x
*
ax
+
r
.
ey
.
x
*
ay
;
by
-=
r
.
ex
.
y
*
ax
+
r
.
ey
.
y
*
ay
;
for
(
;
;
)
{
mat
22
r
1
=
vc
.
normal
mass
;
float
xx
=
r
1
.
ex
.
x
*
bx
+
r
1
.
ey
.
x
*
by
;
float
xy
=
r
1
.
ex
.
y
*
bx
+
r
1
.
ey
.
y
*
by
;
xx
*=
-
1
;
xy
*=
-
1
;
if
(
xx
>=
0.0f
&&
xy
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
dx
*
normalx
;
float
p
1
y
=
dx
*
normaly
;
float
p
2
x
=
dy
*
normalx
;
float
p
2
y
=
dy
*
normaly
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
-
cp
1
.
normal
mass
*
bx
;
xy
=
0.0f
;
vn
1
=
0.0f
;
vn
2
=
vc
.
k
.
ex
.
y
*
xx
+
by
;
if
(
xx
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
1
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
1
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
1
r
a
)
)
)
;
vn
1
=
vec
2
.
dot
(
dv
1
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
1
-
cp
1
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
-
cp
2
.
normal
mass
*
by
;
vn
1
=
vc
.
k
.
ey
.
x
*
xy
+
bx
;
vn
2
=
0.0f
;
if
(
xy
>=
0.0f
&&
vn
1
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
if
(
debug
solver
)
{
vec
2
dv
2
=
v
b
.
add
(
vec
2
.
cross
(
w
b
,
cp
2
r
b
)
.
sub
local
(
v
a
)
.
sub
local
(
vec
2
.
cross
(
w
a
,
cp
2
r
a
)
)
)
;
vn
2
=
vec
2
.
dot
(
dv
2
,
normal
)
;
assert
(
math
utils
.
abs
(
vn
2
-
cp
2
.
velocity
bias
)
<
k
error
tol
)
;
}
break
;
}
xx
=
0.0f
;
xy
=
0.0f
;
vn
1
=
bx
;
vn
2
=
by
;
if
(
vn
1
>=
0.0f
&&
vn
2
>=
0.0f
)
{
float
dx
=
xx
-
ax
;
float
dy
=
xy
-
ay
;
float
p
1
x
=
normalx
*
dx
;
float
p
1
y
=
normaly
*
dx
;
float
p
2
x
=
normalx
*
dy
;
float
p
2
y
=
normaly
*
dy
;
v
a
.
x
-=
m
a
*
(
p
1
x
+
p
2
x
)
;
v
a
.
y
-=
m
a
*
(
p
1
y
+
p
2
y
)
;
v
b
.
x
+=
m
b
*
(
p
1
x
+
p
2
x
)
;
v
b
.
y
+=
m
b
*
(
p
1
y
+
p
2
y
)
;
w
a
-=
i
a
*
(
cp
1
r
a
.
x
*
p
1
y
-
cp
1
r
a
.
y
*
p
1
x
+
(
cp
2
r
a
.
x
*
p
2
y
-
cp
2
r
a
.
y
*
p
2
x
)
)
;
w
b
+=
i
b
*
(
cp
1
r
b
.
x
*
p
1
y
-
cp
1
r
b
.
y
*
p
1
x
+
(
cp
2
r
b
.
x
*
p
2
y
-
cp
2
r
b
.
y
*
p
2
x
)
)
;
cp
1
.
normal
impulse
=
xx
;
cp
2
.
normal
impulse
=
xy
;
break
;
}
break
;
}
}
m
velocities
[
index
a
]
.
w
=
w
a
;
m
velocities
[
index
b
]
.
w
=
w
b
;
}
}
<SENTENCE_END/>
store,impulsesstore%UNK% (2.56e-01)
report (2.07e-01)
generate (1.19e-01)
set (4.53e-02)
get (3.63e-02)
update (2.78e-02)
solve (1.48e-02)
create (1.44e-02)
init (1.26e-02)
calculate (1.19e-02)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
i
++
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
final
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
for
(
int
j
=
0
;
j
<
vc
.
point
count
;
j
++
)
{
manifold
.
points
[
j
]
.
normal
impulse
=
vc
.
points
[
j
]
.
normal
impulse
;
manifold
.
points
[
j
]
.
tangent
impulse
=
vc
.
points
[
j
]
.
tangent
impulse
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
i
++
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
final
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
for
(
int
j
=
0
;
j
<
vc
.
point
count
;
j
++
)
{
manifold
.
points
[
j
]
.
normal
impulse
=
vc
.
points
[
j
]
.
normal
impulse
;
manifold
.
points
[
j
]
.
tangent
impulse
=
vc
.
points
[
j
]
.
tangent
impulse
;
}
}
}
<SENTENCE_END/>
impulses%END% (2.61e-01)
%UNK% (1.50e-01)
velocity (1.29e-01)
report (2.67e-02)
manifold (2.60e-02)
generate (2.37e-02)
update (1.89e-02)
constraints (1.77e-02)
contact (1.64e-02)
normal (1.55e-02)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
i
++
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
final
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
for
(
int
j
=
0
;
j
<
vc
.
point
count
;
j
++
)
{
manifold
.
points
[
j
]
.
normal
impulse
=
vc
.
points
[
j
]
.
normal
impulse
;
manifold
.
points
[
j
]
.
tangent
impulse
=
vc
.
points
[
j
]
.
tangent
impulse
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
i
++
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
final
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
for
(
int
j
=
0
;
j
<
vc
.
point
count
;
j
++
)
{
manifold
.
points
[
j
]
.
normal
impulse
=
vc
.
points
[
j
]
.
normal
impulse
;
manifold
.
points
[
j
]
.
tangent
impulse
=
vc
.
points
[
j
]
.
tangent
impulse
;
}
}
}
<SENTENCE_END/>
%END%%END% (4.87e-01)
%UNK% (6.77e-02)
constraints (4.43e-02)
constraint (4.30e-02)
velocity (2.86e-02)
manifold (2.76e-02)
impulse (2.39e-02)
vc (2.20e-02)
normal (8.78e-03)
j (8.38e-03)
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
i
++
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
final
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
for
(
int
j
=
0
;
j
<
vc
.
point
count
;
j
++
)
{
manifold
.
points
[
j
]
.
normal
impulse
=
vc
.
points
[
j
]
.
normal
impulse
;
manifold
.
points
[
j
]
.
tangent
impulse
=
vc
.
points
[
j
]
.
tangent
impulse
;
}
}
}
<SENTENCE_END/>
<SENTENCE_START>
{
for
(
int
i
=
0
;
i
<
m
count
;
i
++
)
{
final
contact
velocity
constraint
vc
=
m
velocity
constraints
[
i
]
;
final
manifold
manifold
=
m
contacts
[
vc
.
contact
index
]
.
get
manifold
(
)
;
for
(
int
j
=
0
;
j
<
vc
.
point
count
;
j
++
)
{
manifold
.
points
[
j
]
.
normal
impulse
=
vc
.
points
[
j
]
.
normal
impulse
;
manifold
.
points
[
j
]
.
tangent
impulse
=
vc
.
points
[
j
]
.
tangent
impulse
;
}
}
}
<SENTENCE_END/>
solve,position,constraintssolveset (1.79e-01)
get (1.16e-01)
%UNK% (1.07e-01)
%END% (4.75e-02)
solve (3.68e-02)
mul (3.50e-02)
initialize (3.13e-02)
create (2.10e-02)
calculate (1.42e-02)
to (1.05e-02)
<SENTENCE_START>
{
float
min
separation
=
0.0f
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
int
index
a
=
pc
.
index
a
;
int
index
b
=
pc
.
index
b
;
float
m
a
=
pc
.
inv
mass
a
;
float
i
a
=
pc
.
inv
ia
;
vec
2
local
center
a
=
pc
.
local
center
a
;
final
float
local
center
ax
=
local
center
a
.
x
;
final
float
local
center
ay
=
local
center
a
.
y
;
float
m
b
=
pc
.
inv
mass
b
;
float
i
b
=
pc
.
inv
ib
;
vec
2
local
center
b
=
pc
.
local
center
b
;
final
float
local
center
bx
=
local
center
b
.
x
;
final
float
local
center
by
=
local
center
b
.
y
;
int
point
count
=
pc
.
point
count
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
xf
aq
.
c
*
local
center
ax
+
xf
aq
.
s
*
local
center
ay
;
xf
a
.
p
.
y
=
c
a
.
y
-
xf
aq
.
s
*
local
center
ax
-
xf
aq
.
c
*
local
center
ay
;
xf
b
.
p
.
x
=
c
b
.
x
-
xf
bq
.
c
*
local
center
bx
+
xf
bq
.
s
*
local
center
by
;
xf
b
.
p
.
y
=
c
b
.
y
-
xf
bq
.
s
*
local
center
bx
-
xf
bq
.
c
*
local
center
by
;
final
position
solver
manifold
psm
=
psolver
;
psm
.
initialize
(
pc
,
xf
a
,
xf
b
,
j
)
;
final
vec
2
normal
=
psm
.
normal
;
final
vec
2
point
=
psm
.
point
;
final
float
separation
=
psm
.
separation
;
float
r
ax
=
point
.
x
-
c
a
.
x
;
float
r
ay
=
point
.
y
-
c
a
.
y
;
float
r
bx
=
point
.
x
-
c
b
.
x
;
float
r
by
=
point
.
y
-
c
b
.
y
;
min
separation
=
math
utils
.
min
(
min
separation
,
separation
)
;
final
float
c
=
math
utils
.
clamp
(
settings
.
baumgarte
*
(
separation
+
settings
.
linear
slop
)
,
-
settings
.
max
linear
correction
,
0.0f
)
;
final
float
rn
a
=
r
ax
*
normal
.
y
-
r
ay
*
normal
.
x
;
final
float
rn
b
=
r
bx
*
normal
.
y
-
r
by
*
normal
.
x
;
final
float
k
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
final
float
impulse
=
k
>
0.0f
?
-
c
/
k
:
0.0f
;
float
px
=
normal
.
x
*
impulse
;
float
py
=
normal
.
y
*
impulse
;
c
a
.
x
-=
px
*
m
a
;
c
a
.
y
-=
py
*
m
a
;
a
a
-=
i
a
*
(
r
ax
*
py
-
r
ay
*
px
)
;
c
b
.
x
+=
px
*
m
b
;
c
b
.
y
+=
py
*
m
b
;
a
b
+=
i
b
*
(
r
bx
*
py
-
r
by
*
px
)
;
}
m
positions
[
index
a
]
.
a
=
a
a
;
m
positions
[
index
b
]
.
a
=
a
b
;
}
return
min
separation
>=
-
3.0f
*
settings
.
linear
slop
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
float
min
separation
=
0.0f
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
int
index
a
=
pc
.
index
a
;
int
index
b
=
pc
.
index
b
;
float
m
a
=
pc
.
inv
mass
a
;
float
i
a
=
pc
.
inv
ia
;
vec
2
local
center
a
=
pc
.
local
center
a
;
final
float
local
center
ax
=
local
center
a
.
x
;
final
float
local
center
ay
=
local
center
a
.
y
;
float
m
b
=
pc
.
inv
mass
b
;
float
i
b
=
pc
.
inv
ib
;
vec
2
local
center
b
=
pc
.
local
center
b
;
final
float
local
center
bx
=
local
center
b
.
x
;
final
float
local
center
by
=
local
center
b
.
y
;
int
point
count
=
pc
.
point
count
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
xf
aq
.
c
*
local
center
ax
+
xf
aq
.
s
*
local
center
ay
;
xf
a
.
p
.
y
=
c
a
.
y
-
xf
aq
.
s
*
local
center
ax
-
xf
aq
.
c
*
local
center
ay
;
xf
b
.
p
.
x
=
c
b
.
x
-
xf
bq
.
c
*
local
center
bx
+
xf
bq
.
s
*
local
center
by
;
xf
b
.
p
.
y
=
c
b
.
y
-
xf
bq
.
s
*
local
center
bx
-
xf
bq
.
c
*
local
center
by
;
final
position
solver
manifold
psm
=
psolver
;
psm
.
initialize
(
pc
,
xf
a
,
xf
b
,
j
)
;
final
vec
2
normal
=
psm
.
normal
;
final
vec
2
point
=
psm
.
point
;
final
float
separation
=
psm
.
separation
;
float
r
ax
=
point
.
x
-
c
a
.
x
;
float
r
ay
=
point
.
y
-
c
a
.
y
;
float
r
bx
=
point
.
x
-
c
b
.
x
;
float
r
by
=
point
.
y
-
c
b
.
y
;
min
separation
=
math
utils
.
min
(
min
separation
,
separation
)
;
final
float
c
=
math
utils
.
clamp
(
settings
.
baumgarte
*
(
separation
+
settings
.
linear
slop
)
,
-
settings
.
max
linear
correction
,
0.0f
)
;
final
float
rn
a
=
r
ax
*
normal
.
y
-
r
ay
*
normal
.
x
;
final
float
rn
b
=
r
bx
*
normal
.
y
-
r
by
*
normal
.
x
;
final
float
k
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
final
float
impulse
=
k
>
0.0f
?
-
c
/
k
:
0.0f
;
float
px
=
normal
.
x
*
impulse
;
float
py
=
normal
.
y
*
impulse
;
c
a
.
x
-=
px
*
m
a
;
c
a
.
y
-=
py
*
m
a
;
a
a
-=
i
a
*
(
r
ax
*
py
-
r
ay
*
px
)
;
c
b
.
x
+=
px
*
m
b
;
c
b
.
y
+=
py
*
m
b
;
a
b
+=
i
b
*
(
r
bx
*
py
-
r
by
*
px
)
;
}
m
positions
[
index
a
]
.
a
=
a
a
;
m
positions
[
index
b
]
.
a
=
a
b
;
}
return
min
separation
>=
-
3.0f
*
settings
.
linear
slop
;
}
<SENTENCE_END/>
position%END% (3.31e-01)
%UNK% (1.04e-01)
get (5.51e-02)
set (2.90e-02)
solve (2.64e-02)
to (1.54e-02)
local (1.46e-02)
initialize (1.16e-02)
mul (1.08e-02)
out (1.05e-02)
<SENTENCE_START>
{
float
min
separation
=
0.0f
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
int
index
a
=
pc
.
index
a
;
int
index
b
=
pc
.
index
b
;
float
m
a
=
pc
.
inv
mass
a
;
float
i
a
=
pc
.
inv
ia
;
vec
2
local
center
a
=
pc
.
local
center
a
;
final
float
local
center
ax
=
local
center
a
.
x
;
final
float
local
center
ay
=
local
center
a
.
y
;
float
m
b
=
pc
.
inv
mass
b
;
float
i
b
=
pc
.
inv
ib
;
vec
2
local
center
b
=
pc
.
local
center
b
;
final
float
local
center
bx
=
local
center
b
.
x
;
final
float
local
center
by
=
local
center
b
.
y
;
int
point
count
=
pc
.
point
count
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
xf
aq
.
c
*
local
center
ax
+
xf
aq
.
s
*
local
center
ay
;
xf
a
.
p
.
y
=
c
a
.
y
-
xf
aq
.
s
*
local
center
ax
-
xf
aq
.
c
*
local
center
ay
;
xf
b
.
p
.
x
=
c
b
.
x
-
xf
bq
.
c
*
local
center
bx
+
xf
bq
.
s
*
local
center
by
;
xf
b
.
p
.
y
=
c
b
.
y
-
xf
bq
.
s
*
local
center
bx
-
xf
bq
.
c
*
local
center
by
;
final
position
solver
manifold
psm
=
psolver
;
psm
.
initialize
(
pc
,
xf
a
,
xf
b
,
j
)
;
final
vec
2
normal
=
psm
.
normal
;
final
vec
2
point
=
psm
.
point
;
final
float
separation
=
psm
.
separation
;
float
r
ax
=
point
.
x
-
c
a
.
x
;
float
r
ay
=
point
.
y
-
c
a
.
y
;
float
r
bx
=
point
.
x
-
c
b
.
x
;
float
r
by
=
point
.
y
-
c
b
.
y
;
min
separation
=
math
utils
.
min
(
min
separation
,
separation
)
;
final
float
c
=
math
utils
.
clamp
(
settings
.
baumgarte
*
(
separation
+
settings
.
linear
slop
)
,
-
settings
.
max
linear
correction
,
0.0f
)
;
final
float
rn
a
=
r
ax
*
normal
.
y
-
r
ay
*
normal
.
x
;
final
float
rn
b
=
r
bx
*
normal
.
y
-
r
by
*
normal
.
x
;
final
float
k
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
final
float
impulse
=
k
>
0.0f
?
-
c
/
k
:
0.0f
;
float
px
=
normal
.
x
*
impulse
;
float
py
=
normal
.
y
*
impulse
;
c
a
.
x
-=
px
*
m
a
;
c
a
.
y
-=
py
*
m
a
;
a
a
-=
i
a
*
(
r
ax
*
py
-
r
ay
*
px
)
;
c
b
.
x
+=
px
*
m
b
;
c
b
.
y
+=
py
*
m
b
;
a
b
+=
i
b
*
(
r
bx
*
py
-
r
by
*
px
)
;
}
m
positions
[
index
a
]
.
a
=
a
a
;
m
positions
[
index
b
]
.
a
=
a
b
;
}
return
min
separation
>=
-
3.0f
*
settings
.
linear
slop
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
float
min
separation
=
0.0f
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
int
index
a
=
pc
.
index
a
;
int
index
b
=
pc
.
index
b
;
float
m
a
=
pc
.
inv
mass
a
;
float
i
a
=
pc
.
inv
ia
;
vec
2
local
center
a
=
pc
.
local
center
a
;
final
float
local
center
ax
=
local
center
a
.
x
;
final
float
local
center
ay
=
local
center
a
.
y
;
float
m
b
=
pc
.
inv
mass
b
;
float
i
b
=
pc
.
inv
ib
;
vec
2
local
center
b
=
pc
.
local
center
b
;
final
float
local
center
bx
=
local
center
b
.
x
;
final
float
local
center
by
=
local
center
b
.
y
;
int
point
count
=
pc
.
point
count
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
xf
aq
.
c
*
local
center
ax
+
xf
aq
.
s
*
local
center
ay
;
xf
a
.
p
.
y
=
c
a
.
y
-
xf
aq
.
s
*
local
center
ax
-
xf
aq
.
c
*
local
center
ay
;
xf
b
.
p
.
x
=
c
b
.
x
-
xf
bq
.
c
*
local
center
bx
+
xf
bq
.
s
*
local
center
by
;
xf
b
.
p
.
y
=
c
b
.
y
-
xf
bq
.
s
*
local
center
bx
-
xf
bq
.
c
*
local
center
by
;
final
position
solver
manifold
psm
=
psolver
;
psm
.
initialize
(
pc
,
xf
a
,
xf
b
,
j
)
;
final
vec
2
normal
=
psm
.
normal
;
final
vec
2
point
=
psm
.
point
;
final
float
separation
=
psm
.
separation
;
float
r
ax
=
point
.
x
-
c
a
.
x
;
float
r
ay
=
point
.
y
-
c
a
.
y
;
float
r
bx
=
point
.
x
-
c
b
.
x
;
float
r
by
=
point
.
y
-
c
b
.
y
;
min
separation
=
math
utils
.
min
(
min
separation
,
separation
)
;
final
float
c
=
math
utils
.
clamp
(
settings
.
baumgarte
*
(
separation
+
settings
.
linear
slop
)
,
-
settings
.
max
linear
correction
,
0.0f
)
;
final
float
rn
a
=
r
ax
*
normal
.
y
-
r
ay
*
normal
.
x
;
final
float
rn
b
=
r
bx
*
normal
.
y
-
r
by
*
normal
.
x
;
final
float
k
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
final
float
impulse
=
k
>
0.0f
?
-
c
/
k
:
0.0f
;
float
px
=
normal
.
x
*
impulse
;
float
py
=
normal
.
y
*
impulse
;
c
a
.
x
-=
px
*
m
a
;
c
a
.
y
-=
py
*
m
a
;
a
a
-=
i
a
*
(
r
ax
*
py
-
r
ay
*
px
)
;
c
b
.
x
+=
px
*
m
b
;
c
b
.
y
+=
py
*
m
b
;
a
b
+=
i
b
*
(
r
bx
*
py
-
r
by
*
px
)
;
}
m
positions
[
index
a
]
.
a
=
a
a
;
m
positions
[
index
b
]
.
a
=
a
b
;
}
return
min
separation
>=
-
3.0f
*
settings
.
linear
slop
;
}
<SENTENCE_END/>
constraints%END% (4.74e-01)
%UNK% (8.27e-02)
get (3.40e-02)
solve (2.07e-02)
to (1.48e-02)
set (1.29e-02)
local (1.18e-02)
out (9.97e-03)
mul (7.79e-03)
initialize (6.94e-03)
<SENTENCE_START>
{
float
min
separation
=
0.0f
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
int
index
a
=
pc
.
index
a
;
int
index
b
=
pc
.
index
b
;
float
m
a
=
pc
.
inv
mass
a
;
float
i
a
=
pc
.
inv
ia
;
vec
2
local
center
a
=
pc
.
local
center
a
;
final
float
local
center
ax
=
local
center
a
.
x
;
final
float
local
center
ay
=
local
center
a
.
y
;
float
m
b
=
pc
.
inv
mass
b
;
float
i
b
=
pc
.
inv
ib
;
vec
2
local
center
b
=
pc
.
local
center
b
;
final
float
local
center
bx
=
local
center
b
.
x
;
final
float
local
center
by
=
local
center
b
.
y
;
int
point
count
=
pc
.
point
count
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
xf
aq
.
c
*
local
center
ax
+
xf
aq
.
s
*
local
center
ay
;
xf
a
.
p
.
y
=
c
a
.
y
-
xf
aq
.
s
*
local
center
ax
-
xf
aq
.
c
*
local
center
ay
;
xf
b
.
p
.
x
=
c
b
.
x
-
xf
bq
.
c
*
local
center
bx
+
xf
bq
.
s
*
local
center
by
;
xf
b
.
p
.
y
=
c
b
.
y
-
xf
bq
.
s
*
local
center
bx
-
xf
bq
.
c
*
local
center
by
;
final
position
solver
manifold
psm
=
psolver
;
psm
.
initialize
(
pc
,
xf
a
,
xf
b
,
j
)
;
final
vec
2
normal
=
psm
.
normal
;
final
vec
2
point
=
psm
.
point
;
final
float
separation
=
psm
.
separation
;
float
r
ax
=
point
.
x
-
c
a
.
x
;
float
r
ay
=
point
.
y
-
c
a
.
y
;
float
r
bx
=
point
.
x
-
c
b
.
x
;
float
r
by
=
point
.
y
-
c
b
.
y
;
min
separation
=
math
utils
.
min
(
min
separation
,
separation
)
;
final
float
c
=
math
utils
.
clamp
(
settings
.
baumgarte
*
(
separation
+
settings
.
linear
slop
)
,
-
settings
.
max
linear
correction
,
0.0f
)
;
final
float
rn
a
=
r
ax
*
normal
.
y
-
r
ay
*
normal
.
x
;
final
float
rn
b
=
r
bx
*
normal
.
y
-
r
by
*
normal
.
x
;
final
float
k
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
final
float
impulse
=
k
>
0.0f
?
-
c
/
k
:
0.0f
;
float
px
=
normal
.
x
*
impulse
;
float
py
=
normal
.
y
*
impulse
;
c
a
.
x
-=
px
*
m
a
;
c
a
.
y
-=
py
*
m
a
;
a
a
-=
i
a
*
(
r
ax
*
py
-
r
ay
*
px
)
;
c
b
.
x
+=
px
*
m
b
;
c
b
.
y
+=
py
*
m
b
;
a
b
+=
i
b
*
(
r
bx
*
py
-
r
by
*
px
)
;
}
m
positions
[
index
a
]
.
a
=
a
a
;
m
positions
[
index
b
]
.
a
=
a
b
;
}
return
min
separation
>=
-
3.0f
*
settings
.
linear
slop
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
float
min
separation
=
0.0f
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
int
index
a
=
pc
.
index
a
;
int
index
b
=
pc
.
index
b
;
float
m
a
=
pc
.
inv
mass
a
;
float
i
a
=
pc
.
inv
ia
;
vec
2
local
center
a
=
pc
.
local
center
a
;
final
float
local
center
ax
=
local
center
a
.
x
;
final
float
local
center
ay
=
local
center
a
.
y
;
float
m
b
=
pc
.
inv
mass
b
;
float
i
b
=
pc
.
inv
ib
;
vec
2
local
center
b
=
pc
.
local
center
b
;
final
float
local
center
bx
=
local
center
b
.
x
;
final
float
local
center
by
=
local
center
b
.
y
;
int
point
count
=
pc
.
point
count
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
xf
aq
.
c
*
local
center
ax
+
xf
aq
.
s
*
local
center
ay
;
xf
a
.
p
.
y
=
c
a
.
y
-
xf
aq
.
s
*
local
center
ax
-
xf
aq
.
c
*
local
center
ay
;
xf
b
.
p
.
x
=
c
b
.
x
-
xf
bq
.
c
*
local
center
bx
+
xf
bq
.
s
*
local
center
by
;
xf
b
.
p
.
y
=
c
b
.
y
-
xf
bq
.
s
*
local
center
bx
-
xf
bq
.
c
*
local
center
by
;
final
position
solver
manifold
psm
=
psolver
;
psm
.
initialize
(
pc
,
xf
a
,
xf
b
,
j
)
;
final
vec
2
normal
=
psm
.
normal
;
final
vec
2
point
=
psm
.
point
;
final
float
separation
=
psm
.
separation
;
float
r
ax
=
point
.
x
-
c
a
.
x
;
float
r
ay
=
point
.
y
-
c
a
.
y
;
float
r
bx
=
point
.
x
-
c
b
.
x
;
float
r
by
=
point
.
y
-
c
b
.
y
;
min
separation
=
math
utils
.
min
(
min
separation
,
separation
)
;
final
float
c
=
math
utils
.
clamp
(
settings
.
baumgarte
*
(
separation
+
settings
.
linear
slop
)
,
-
settings
.
max
linear
correction
,
0.0f
)
;
final
float
rn
a
=
r
ax
*
normal
.
y
-
r
ay
*
normal
.
x
;
final
float
rn
b
=
r
bx
*
normal
.
y
-
r
by
*
normal
.
x
;
final
float
k
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
final
float
impulse
=
k
>
0.0f
?
-
c
/
k
:
0.0f
;
float
px
=
normal
.
x
*
impulse
;
float
py
=
normal
.
y
*
impulse
;
c
a
.
x
-=
px
*
m
a
;
c
a
.
y
-=
py
*
m
a
;
a
a
-=
i
a
*
(
r
ax
*
py
-
r
ay
*
px
)
;
c
b
.
x
+=
px
*
m
b
;
c
b
.
y
+=
py
*
m
b
;
a
b
+=
i
b
*
(
r
bx
*
py
-
r
by
*
px
)
;
}
m
positions
[
index
a
]
.
a
=
a
a
;
m
positions
[
index
b
]
.
a
=
a
b
;
}
return
min
separation
>=
-
3.0f
*
settings
.
linear
slop
;
}
<SENTENCE_END/>
%END%%END% (5.34e-01)
%UNK% (7.38e-02)
get (2.94e-02)
solve (1.81e-02)
to (1.42e-02)
local (1.07e-02)
set (9.83e-03)
out (9.46e-03)
2 (6.59e-03)
mul (6.48e-03)
<SENTENCE_START>
{
float
min
separation
=
0.0f
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
int
index
a
=
pc
.
index
a
;
int
index
b
=
pc
.
index
b
;
float
m
a
=
pc
.
inv
mass
a
;
float
i
a
=
pc
.
inv
ia
;
vec
2
local
center
a
=
pc
.
local
center
a
;
final
float
local
center
ax
=
local
center
a
.
x
;
final
float
local
center
ay
=
local
center
a
.
y
;
float
m
b
=
pc
.
inv
mass
b
;
float
i
b
=
pc
.
inv
ib
;
vec
2
local
center
b
=
pc
.
local
center
b
;
final
float
local
center
bx
=
local
center
b
.
x
;
final
float
local
center
by
=
local
center
b
.
y
;
int
point
count
=
pc
.
point
count
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
xf
aq
.
c
*
local
center
ax
+
xf
aq
.
s
*
local
center
ay
;
xf
a
.
p
.
y
=
c
a
.
y
-
xf
aq
.
s
*
local
center
ax
-
xf
aq
.
c
*
local
center
ay
;
xf
b
.
p
.
x
=
c
b
.
x
-
xf
bq
.
c
*
local
center
bx
+
xf
bq
.
s
*
local
center
by
;
xf
b
.
p
.
y
=
c
b
.
y
-
xf
bq
.
s
*
local
center
bx
-
xf
bq
.
c
*
local
center
by
;
final
position
solver
manifold
psm
=
psolver
;
psm
.
initialize
(
pc
,
xf
a
,
xf
b
,
j
)
;
final
vec
2
normal
=
psm
.
normal
;
final
vec
2
point
=
psm
.
point
;
final
float
separation
=
psm
.
separation
;
float
r
ax
=
point
.
x
-
c
a
.
x
;
float
r
ay
=
point
.
y
-
c
a
.
y
;
float
r
bx
=
point
.
x
-
c
b
.
x
;
float
r
by
=
point
.
y
-
c
b
.
y
;
min
separation
=
math
utils
.
min
(
min
separation
,
separation
)
;
final
float
c
=
math
utils
.
clamp
(
settings
.
baumgarte
*
(
separation
+
settings
.
linear
slop
)
,
-
settings
.
max
linear
correction
,
0.0f
)
;
final
float
rn
a
=
r
ax
*
normal
.
y
-
r
ay
*
normal
.
x
;
final
float
rn
b
=
r
bx
*
normal
.
y
-
r
by
*
normal
.
x
;
final
float
k
=
m
a
+
m
b
+
i
a
*
rn
a
*
rn
a
+
i
b
*
rn
b
*
rn
b
;
final
float
impulse
=
k
>
0.0f
?
-
c
/
k
:
0.0f
;
float
px
=
normal
.
x
*
impulse
;
float
py
=
normal
.
y
*
impulse
;
c
a
.
x
-=
px
*
m
a
;
c
a
.
y
-=
py
*
m
a
;
a
a
-=
i
a
*
(
r
ax
*
py
-
r
ay
*
px
)
;
c
b
.
x
+=
px
*
m
b
;
c
b
.
y
+=
py
*
m
b
;
a
b
+=
i
b
*
(
r
bx
*
py
-
r
by
*
px
)
;
}
m
positions
[
index
a
]
.
a
=
a
a
;
m
positions
[
index
b
]
.
a
=
a
b
;
}
return
min
separation
>=
-
3.0f
*
settings
.
linear
slop
;
}
<SENTENCE_END/>
<SENTENCE_START>
{
float
min
separation
=
0.0f
;
for
(
int
i
=
0
;
i
<
m
count
;
++
i
)
{
contact
position
constraint
pc
=
m
position
constraints
[
i
]
;
int
index
a
=
pc
.
index
a
;
int
index
b
=
pc
.
index
b
;
float
m
a
=
pc
.
inv
mass
a
;
float
i
a
=
pc
.
inv
ia
;
vec
2
local
center
a
=
pc
.
local
center
a
;
final
float
local
center
ax
=
local
center
a
.
x
;
final
float
local
center
ay
=
local
center
a
.
y
;
float
m
b
=
pc
.
inv
mass
b
;
float
i
b
=
pc
.
inv
ib
;
vec
2
local
center
b
=
pc
.
local
center
b
;
final
float
local
center
bx
=
local
center
b
.
x
;
final
float
local
center
by
=
local
center
b
.
y
;
int
point
count
=
pc
.
point
count
;
vec
2
c
a
=
m
positions
[
index
a
]
.
c
;
float
a
a
=
m
positions
[
index
a
]
.
a
;
vec
2
c
b
=
m
positions
[
index
b
]
.
c
;
float
a
b
=
m
positions
[
index
b
]
.
a
;
for
(
int
j
=
0
;
j
<
point
count
;
++
j
)
{
final
rot
xf
aq
=
xf
a
.
q
;
final
rot
xf
bq
=
xf
b
.
q
;
xf
aq
.
set
(
a
a
)
;
xf
bq
.
set
(
a
b
)
;
xf
a
.
p
.
x
=
c
a
.
x
-
xf
aq
.
c
*
local
center
ax
+
xf
aq
.
s
*
local
center
ay
;
xf
a
.
p
.
y
=
c
a
.
y
-
xf
aq
.
s
*
local
center
ax
-
xf
aq
.
c
*
local
center
ay
;
xf
b
.
p
.
x
=
c
b
.
x
-
xf
bq
.
c
*
local
center
bx
+
xf
bq
.
s
*
local
center
by
;
xf
b
.
p
.
y
=
c
b
.
y
-
xf
bq
.
s
*
local
center
bx
-
xf
bq
.
c
*
local
center
by
;
final
position
solver
manifold
psm
=
psolver
;
psm
.
initialize
(
pc
,
xf
a
,
xf
b
,
j
)
;
final
vec
2
normal
=
psm
.
normal
;
final
vec
2
point
=
psm
.
point
;
final
float
separation
=
psm
.
separation
;
float
r
ax
=
point
.
x
-
c
a
.
x
;
float
r
ay
=
point
.
y
-
c
a
.
y
;
float
r
bx
=
point
.
x
-
c
b
.
x
;
float
r
by
=
point
.
y
-
c
b
.
y
;
min
separation
=
math
utils
.
min
(
min
separation
,
separation
)
;
final
float
c
=
math
utils
.
clamp
(
settings
.
baumgarte
*
(
separation
+
settings
.
linear
slop
)
,
-
settings
.
max
linear
correction
,
0.0f
)
;
final
float
rn
a
=
r
ax
*
normal
.
y
-
r
ay
*
normal
.
x
;
final
float
rn
b
=
r
b