-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCWall.h
43 lines (35 loc) · 1.1 KB
/
CWall.h
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
40
41
42
43
#ifndef _CWALL_
#define _CWALL_
#include "d3dUtility.h"
#include "CSphere.h"
class CWall
{
private:
D3DXMATRIX m_mLocal;
D3DMATERIAL9 m_mtrl;
ID3DXMesh* m_pBoundMesh;
protected:
float m_x;
float m_z;
float m_width;
float m_depth;
float m_height;
float center_x, center_y, center_z;
void setLocalTransform(const D3DXMATRIX& mLocal);
public:
static const float LOSS_RATIO;
CWall(void);
CWall(float iwidth, float iheight, float idepth, D3DXCOLOR color);
~CWall(void);
bool create(IDirect3DDevice9* pDevice, float ix, float iz, float iwidth, float iheight, float idepth, D3DXCOLOR color);
void destroy(void);
void draw(IDirect3DDevice9* pDevice, const D3DXMATRIX& mWorld);
virtual bool hasIntersected(CSphere& ball) const noexcept = 0;
virtual void hitBy(CSphere& ball) noexcept = 0;
void setPosition(float x, float y, float z);
float getHeight(void) const;
void setType(int type);
void adjustPosition(CSphere& ball);
D3DXVECTOR3 getPosition() const;
};
#endif