Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
collistionstest
SUBMITTED BY:
Thor2607
DATE:
Sept. 28, 2016, 7:16 p.m.
FORMAT:
C#
SIZE:
621 Bytes
Raw
Download
Tweet
HITS:
426
Go to comments
Report
private
bool
pixcol
(
gObj
obj
){
Matrix
t
=
obj
.
m
*
Matrix
.
Invert
(
m
)
*
Matrix
.
CreateTranslation
(
0.5f
,
0.5f
,
0
);
for
(
int
x
=
0
;
x
<
size
.
X
;
++
x
)
for
(
int
y
=
0
;
y
<
size
.
Y
;
y
++
)
{
if
(
col
[(
int
)(
x
+
y
*
size
.
X
)].
A
==
0
)
continue
;
Vector2
p
=
Vector2
.
Transform
(
new
Vector2
(
x
,
y
),
t
);
{
int
x2
=
(
int
)
p
.
X
;
int
y2
=
(
int
)
p
.
Y
;
}
if
(
!
(
!
(
x2
<
0
||
x2
>
obj
.
size
.
X
)
&&
!
(
y2
<
0
||
y2
>
obj
.
size
.
Y
)))
continue
;
if
(
obj
.
col
[(
int
)(
x2
+
y2
*
obj
.
size
.
X
)
%
(
obj
.
size
.
x
*
obj
.
size
.
y
)].
A
>
0
)
return
true
;
}
return
false
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus