fake 3d
This commit is contained in:
18
modules/Console_Render/translate.jai
Normal file
18
modules/Console_Render/translate.jai
Normal file
@@ -0,0 +1,18 @@
|
||||
// for n points
|
||||
translate :: (amount: Vec2s64, pn: ..*Vec2s64) {
|
||||
for pn {
|
||||
it.x += amount.x;
|
||||
it.y += amount.y;
|
||||
}
|
||||
}
|
||||
|
||||
// for a triangle
|
||||
translate :: (amount: Vec2s64, t: *Triangle) {
|
||||
translate(amount, *t.p1, *t.p2, *t.p3);
|
||||
}
|
||||
|
||||
|
||||
// for a quad
|
||||
translate :: (amount: Vec2s64, q: *Quad) {
|
||||
translate(amount, *q.p1, *q.p2, *q.p3, *q.p4);
|
||||
}
|
||||
Reference in New Issue
Block a user