forked from delphist2008/phys
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenderer.h
More file actions
40 lines (35 loc) · 771 Bytes
/
renderer.h
File metadata and controls
40 lines (35 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef REND_H
#define REND_H
#include <windows.h>
#include <windowsx.h>
#include "simulator.h"
#include "include\wincore.h"
#include "pbody.h"
#include "ui.h"
#include "helper.h"
#define BGCLR RGB(128, 128, 255)
#define DRAWBOUNDING 1
class renderer : public CWnd
{
friend class simulator;
friend class pbody;
friend class ui;
private:
CClientDC *screen;
CMemDC *buffer;
HDC screen_dc, buffer_dc;
RECT screen_dim;
CBitmap buffer_bmp;
HBRUSH bgbrush;
HPEN bgpen;
simulator *sim;
ui * UI;
void draw_triangle(fpoint cnt[3], HBRUSH *brsh, HPEN *pn, HPEN *cp, int ce);
public:
renderer() {};
void init(simulator *s, ui *u);
void Draw();
virtual ~renderer() {};
virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
};
#endif //REND_H