Lines Matching refs:polygon
34 init_polygon(const BRect& b, point* polygon)
36 polygon[0].x = b.left;
37 polygon[0].y = b.top;
38 polygon[0].direction_x = random_number_between(-SPEED, SPEED);
39 polygon[0].direction_y = random_number_between(-SPEED, SPEED);
40 polygon[1].x = b.right;
41 polygon[1].y = b.top;
42 polygon[1].direction_x = random_number_between(-SPEED, SPEED);
43 polygon[1].direction_y = random_number_between(-SPEED, SPEED);
44 polygon[2].x = b.right;
45 polygon[2].y = b.bottom;
46 polygon[2].direction_x = random_number_between(-SPEED, SPEED);
47 polygon[2].direction_y = random_number_between(-SPEED, SPEED);
48 polygon[3].x = b.left;
49 polygon[3].y = b.bottom;
50 polygon[3].direction_x = random_number_between(-SPEED, SPEED);
51 polygon[3].direction_y = random_number_between(-SPEED, SPEED);
70 morph_polygon(const BRect& b, point* polygon)
72 morph(&polygon[0].x, &polygon[0].direction_x, b.left, b.right);
73 morph(&polygon[1].x, &polygon[1].direction_x, b.left, b.right);
74 morph(&polygon[2].x, &polygon[2].direction_x, b.left, b.right);
75 morph(&polygon[3].x, &polygon[3].direction_x, b.left, b.right);
76 morph(&polygon[0].y, &polygon[0].direction_y, b.top, b.bottom);
77 morph(&polygon[1].y, &polygon[1].direction_y, b.top, b.bottom);
78 morph(&polygon[2].y, &polygon[2].direction_y, b.top, b.bottom);
79 morph(&polygon[3].y, &polygon[3].direction_y, b.top, b.bottom);