Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/CVertexDump.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Sun Aug 15 01:53:13 2010 UTC (13 years, 9 months ago) by okadu
File MIME type: text/x-chdr
File size: 3691 byte(s)


1 #ifndef CVERTEXDUMP_H_INCLUDED
2 #define CVERTEXDUMP_H_INCLUDED
3
4 #define LINE_DUMP_MAX (sv3.capsMaxPrim/2) // 直線ダンプ最大値
5 #define QUAD_DUMP_MAX (sv3.capsMaxPrim/6) // 四角形ダンプ最大値
6
7 /*
8 * ディフューズポインタ
9 */
10 class CDiffusePointer{
11 private:
12 D3DCOLOR *m_Pointer; // ポインタ
13 D3DCOLOR m_Default; // デフォルト値
14 public:
15 CDiffusePointer(D3DCOLOR *p){ m_Default = *(m_Pointer = p); }
16 void Restore(){ *m_Pointer = m_Default; }
17 void Set(D3DCOLOR c){ *m_Pointer = c; }
18 };
19
20 // 反復子
21 typedef list<CDiffusePointer>::iterator IDiffusePointer;
22
23 /*
24 * バーテックスダンパ
25 */
26 class CVertexDump{
27 protected:
28 public:
29 };
30
31 /*
32 * 直線ダンプ (ライティング済・座標変換済み)
33 */
34 class CLineDumpTL: public CVertexDump{
35 private:
36 int m_LineNum; // 直線数
37 int m_Count; // カウンタ
38 VTX_TL *m_Buffer; // バッファ
39 CVertex m_Vertex; // バーテックス
40 CLineDumpTL *m_Next; // 次
41 public:
42 CLineDumpTL(int);
43 CLineDumpTL(CLineDumpTL *);
44 ~CLineDumpTL();
45 int GetCount(){ return m_Count; }
46 void Feed();
47 void Add(VEC2, D3DCOLOR, VEC2, D3DCOLOR);
48 void Preview(VEC2, D3DCOLOR, VEC2, D3DCOLOR);
49 void PrepareVertex();
50 void Render(bool drawup);
51 };
52
53 /*
54 * 直線ダンプ (ライティング済)
55 */
56 class CLineDumpL: public CVertexDump{
57 private:
58 int m_LineNum; // 直線数
59 int m_Count; // カウンタ
60 VTX_L *m_Buffer; // バッファ
61 CVertex m_Vertex; // バーテックス
62 CLineDumpL *m_Next; // 次
63 public:
64 CLineDumpL(int);
65 CLineDumpL(CLineDumpL *);
66 ~CLineDumpL();
67 int GetCount(){ return m_Count; }
68 void Feed();
69 void Add(VEC3, D3DCOLOR, VEC3, D3DCOLOR);
70 void Preview(VEC3, D3DCOLOR, VEC3, D3DCOLOR);
71 void PrepareVertex();
72 void Render(bool drawup);
73 };
74
75 /*
76 * 直線ダンプ (未ライティング)
77 */
78 class CLineDumpN: public CVertexDump{
79 private:
80 int m_LineNum; // 直線数
81 int m_Count; // カウンタ
82 VTX_N *m_Buffer; // バッファ
83 CVertex m_Vertex; // バーテックス
84 CLineDumpN *m_Next; // 次
85 public:
86 CLineDumpN(int);
87 CLineDumpN(CLineDumpN *);
88 ~CLineDumpN();
89 int GetCount(){ return m_Count; }
90 void Feed();
91 void Add(VEC3, D3DCOLOR, VEC3, D3DCOLOR);
92 void Preview(VEC3, D3DCOLOR, VEC3, D3DCOLOR);
93 void PrepareVertex();
94 void Render(bool drawup);
95 };
96
97 /*
98 * 四角形ダンプ (テクスチャなし)
99 */
100 class CQuadDumpN: public CVertexDump{
101 private:
102 int m_QuadNum; // 四角形数
103 int m_Count; // カウンタ
104 VTX_N *m_Buffer; // バッファ
105 CVertex m_Vertex; // バーテックス
106 CQuadDumpN *m_Next; // 次
107 public:
108 CQuadDumpN(int);
109 CQuadDumpN(CQuadDumpN *);
110 ~CQuadDumpN();
111 int GetCount(){ return m_Count; }
112 void Feed();
113 void Add(
114 VEC3, VEC3, D3DCOLOR, VEC3, VEC3, D3DCOLOR,
115 VEC3, VEC3, D3DCOLOR, VEC3, VEC3, D3DCOLOR);
116 void Preview(
117 VEC3, VEC3, D3DCOLOR, VEC3, VEC3, D3DCOLOR,
118 VEC3, VEC3, D3DCOLOR, VEC3, VEC3, D3DCOLOR);
119 void PrepareVertex();
120 void Render(bool drawup);
121 };
122
123 /*
124 * 四角形ダンプ (テクスチャあり)
125 */
126 class CQuadDumpNX: public CVertexDump{
127 private:
128 int m_QuadNum; // 四角形数
129 int m_Count; // カウンタ
130 VTX_NX *m_Buffer; // バッファ
131 CVertex m_Vertex; // バーテックス
132 LPTEX8 m_Texture; // テクスチャポインタ
133 CQuadDumpNX *m_Next; // 次
134 public:
135 CQuadDumpNX(int, LPTEX8);
136 CQuadDumpNX(CQuadDumpNX *);
137 ~CQuadDumpNX();
138 int GetCount(){ return m_Count; }
139 void Feed();
140 void Add(
141 VEC3, VEC3, D3DCOLOR, float, float, VEC3, VEC3, D3DCOLOR, float, float,
142 VEC3, VEC3, D3DCOLOR, float, float, VEC3, VEC3, D3DCOLOR, float, float);
143 void Preview(
144 VEC3, VEC3, D3DCOLOR, float, float, VEC3, VEC3, D3DCOLOR, float, float,
145 VEC3, VEC3, D3DCOLOR, float, float, VEC3, VEC3, D3DCOLOR, float, float);
146 void PrepareVertex();
147 void Render(bool drawup);
148 };
149
150 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26