My Project
VertexFVF.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
5  struct my_vertex{
6  //FLOAT x, y, z;
7  Vector3 v;
8  //FLOAT nx,ny,nz;
9  Vector3 n;
10  DWORD colour;
11  FLOAT tu, tv;
12  };
13 
15  struct MatrixVertex
16  {
17  public:
19  : r1(i1),r2(i2),r3(i3){}
20  Vector4 r1; // row 1
21  Vector4 r2; // row 2
22  Vector4 r3; // row 3
23  // No FVF for this type
24  // static const DWORD FVF;
25  };
26 
27 
30  {
31  Vector4 p;
32  Color color;
33  static const DWORD FVF;
34  };
35 
38  {
39  Vector3 p;
40  Vector2 uv;
41  static const DWORD FVF;
42  };
43 
46  {
47  Vector3 p;
48  Vector3 n;
49  Vector2 uv;
50  static const DWORD FVF;
51  };
53  {
54  Vector3 p;
55  Vector3 n;
56  DWORD color;
57  Vector2 uv;
58  static const DWORD FVF;
59  };
60  struct block_vertex
61  {
62  Vector3 p;
63  Vector3 n;
64  DWORD color;
65  DWORD color2;
66  Vector2 uv;
67  static const DWORD FVF;
68  };
70  {
71  Vector3 p;
72  Vector3 n;
73  Vector2 uv;
74  Vector2 uv2;
75  static const DWORD FVF;
76  };
77  struct bmax_vertex
78  {
79  Vector3 p;
80  Vector3 n;
81  DWORD color;
82  static const DWORD FVF;
83  };
84 
87  {
88  Vector3 v;
89  FLOAT tu1, tv1;
90  FLOAT tu2, tv2;
91  static const DWORD FVF;
92  };
93 
96  {
97  Vector3 v;
98  Vector3 n;
99 
100  FLOAT tu1, tv1;
101  FLOAT tu2, tv2;
102  static const DWORD FVF;
103  };
104 
107  {
108  Vector4 p;
109  Color color;
110 
111  static const DWORD FVF;
112  };
113 
115  struct LINEVERTEX
116  {
120  DWORD color;
121 
122  static const DWORD FVF;
123  };
126  {
129  static const DWORD FVF;
130  };
131 
134  {
135  float x, y, z, h;
136  Color color;
137  float tu, tv;
138  inline void SetPosition(const Vector3& pos, float w = 1.0f){
139  x = pos.x; y = pos.y; z = pos.z; h = w;
140  }
141  inline Vector3* GetPosPointer(){ return (Vector3*)(&x); }
142  static const DWORD FVF;
143  };
144 
147  {
151  DWORD color;
153  FLOAT tu, tv;
154  inline void SetPosition(const Vector3& pos){
155  p = pos;
156  }
157  inline Vector3* GetPosPointer(){ return (Vector3*)(&p); }
158  static const DWORD FVF;
159  };
160 }
Custom vertex type for the shadows.
Definition: VertexFVF.h:106
2D screen with textures.
Definition: VertexFVF.h:133
DWORD color
Vertex color.
Definition: VertexFVF.h:151
Custom vertex type for the occlusion object.
Definition: VertexFVF.h:125
for general mesh without normal and color
Definition: VertexFVF.h:37
Vector3 p
Vertex position.
Definition: VertexFVF.h:128
4-dimensional homogeneous vector.
Definition: ParaVector4.h:10
for terrain
Definition: VertexFVF.h:86
different physics engine has different winding order.
Definition: EventBinding.h:32
Custom vertex type for the trees.
Definition: VertexFVF.h:146
FLOAT tu
Vertex texture coordinates.
Definition: VertexFVF.h:153
matrix vertex
Definition: VertexFVF.h:15
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
Standard 2-dimensional vector.
Definition: ParaVector2.h:16
Definition: VertexFVF.h:69
Definition: VertexFVF.h:60
Custom vertex type for the under water effect.
Definition: VertexFVF.h:29
DWORD color
Vertex color.
Definition: VertexFVF.h:120
Vector3 p
Vertex position.
Definition: VertexFVF.h:118
for general mesh with normal
Definition: VertexFVF.h:45
Custom vertex type for the bounding box.
Definition: VertexFVF.h:115
Definition: ParaColor.h:275
Definition: VertexFVF.h:52
for terrain with normal
Definition: VertexFVF.h:95
Vector3 p
Vertex position.
Definition: VertexFVF.h:149
Definition: VertexFVF.h:77