GL_SceneGraphTypes.h

Go to the documentation of this file.
00001 #ifndef X3DTK_GL_SCENEGRAPHTYPES_H
00002 #define X3DTK_GL_SCENEGRAPHTYPES_H
00003 
00004 #include "X3DTypes.h"
00005 
00006 #include <GL/gl.h>
00007 #include <list>
00008 #include <vector>
00009 
00010 namespace X3DTK {
00011 namespace GL {
00012 
00013 class X3DNode;
00014 
00021 struct N3F_V3F
00022 {
00023   SFVec3f normal;
00024   SFVec3f vertex;
00025   
00026   friend bool operator== (const N3F_V3F &v1, const N3F_V3F &v2);
00027 };
00028 
00035 struct C4F_N3F_V3F
00036 {
00037   SFColorRGBA color;
00038   SFVec3f normal;
00039   SFVec3f vertex;
00040   
00041   friend bool operator== (const C4F_N3F_V3F &v1, const C4F_N3F_V3F &v2);
00042 };
00043 
00050 struct T2F_C4F_N3F_V3F
00051 {
00052   SFVec2f texCoord;
00053   SFColorRGBA color;
00054   SFVec3f normal;
00055   SFVec3f vertex;
00056   
00057   friend bool operator== (const T2F_C4F_N3F_V3F &v1, const T2F_C4F_N3F_V3F &v2);
00058 };
00059 
00066 struct T2F_N3F_V3F
00067 {
00068   SFVec2f texCoord;
00069   SFVec3f normal;
00070   SFVec3f vertex;
00071   
00072   friend bool operator== (const T2F_N3F_V3F &v1, const T2F_N3F_V3F &v2);
00073 };
00074 
00081 typedef struct
00082 {
00083   unsigned char r, g, b, a;
00084   SFVec3f vertex;
00085 } C4UB_V3F;
00086 
00087 
00093 inline bool operator== (const N3F_V3F &v1, const N3F_V3F &v2)
00094 {
00095   return ((v1.vertex == v2.vertex) && (v1.normal == v2.normal));
00096 }
00097 
00103 inline bool operator== (const C4F_N3F_V3F &v1, const C4F_N3F_V3F &v2)
00104 {
00105   return ((v1.vertex == v2.vertex) && (v1.normal == v2.normal) && (v1.color == v2.color));
00106 }
00107 
00113 inline bool operator== (const T2F_N3F_V3F &v1, const T2F_N3F_V3F &v2)
00114 {
00115   return ((v1.vertex == v2.vertex) && (v1.normal == v2.normal) && (v1.texCoord == v2.texCoord));
00116 }
00117 
00123 inline bool operator== (const T2F_C4F_N3F_V3F &v1, const T2F_C4F_N3F_V3F &v2)
00124 {
00125   return ((v1.vertex == v2.vertex) && (v1.normal == v2.normal) && (v1.color == v2.color) && (v1.texCoord == v2.texCoord));
00126 }
00127 
00128 }
00129 }
00130 
00131 #endif

Generated on Fri Jul 30 12:02:28 2004 for X3DToolKit by doxygen 1.3.6