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 <list>
00007 #include <vector>
00008 
00009 namespace X3DTK {
00010 namespace GL {
00011 
00012 class X3DNode;
00013 
00020 struct N3F_V3F
00021 {
00022   SFVec3f normal;
00023   SFVec3f vertex;
00024   
00025   friend bool operator== (const N3F_V3F &v1, const N3F_V3F &v2);
00026 };
00027 
00034 struct C4F_N3F_V3F
00035 {
00036   SFColorRGBA color;
00037   SFVec3f normal;
00038   SFVec3f vertex;
00039   
00040   friend bool operator== (const C4F_N3F_V3F &v1, const C4F_N3F_V3F &v2);
00041 };
00042 
00049 struct T2F_C4F_N3F_V3F
00050 {
00051   SFVec2f texCoord;
00052   SFColorRGBA color;
00053   SFVec3f normal;
00054   SFVec3f vertex;
00055   
00056   friend bool operator== (const T2F_C4F_N3F_V3F &v1, const T2F_C4F_N3F_V3F &v2);
00057 };
00058 
00065 struct T2F_N3F_V3F
00066 {
00067   SFVec2f texCoord;
00068   SFVec3f normal;
00069   SFVec3f vertex;
00070   
00071   friend bool operator== (const T2F_N3F_V3F &v1, const T2F_N3F_V3F &v2);
00072 };
00073 
00080 typedef struct
00081 {
00082   unsigned char r, g, b, a;
00083   SFVec3f vertex;
00084 } C4UB_V3F;
00085 
00086 
00092 inline bool operator== (const N3F_V3F &v1, const N3F_V3F &v2)
00093 {
00094   return ((v1.vertex == v2.vertex) && (v1.normal == v2.normal));
00095 }
00096 
00102 inline bool operator== (const C4F_N3F_V3F &v1, const C4F_N3F_V3F &v2)
00103 {
00104   return ((v1.vertex == v2.vertex) && (v1.normal == v2.normal) && (v1.color == v2.color));
00105 }
00106 
00112 inline bool operator== (const T2F_N3F_V3F &v1, const T2F_N3F_V3F &v2)
00113 {
00114   return ((v1.vertex == v2.vertex) && (v1.normal == v2.normal) && (v1.texCoord == v2.texCoord));
00115 }
00116 
00122 inline bool operator== (const T2F_C4F_N3F_V3F &v1, const T2F_C4F_N3F_V3F &v2)
00123 {
00124   return ((v1.vertex == v2.vertex) && (v1.normal == v2.normal) && (v1.color == v2.color) && (v1.texCoord == v2.texCoord));
00125 }
00126 
00127 }
00128 }
00129 
00130 #endif

Generated on Fri Aug 27 13:16:22 2004 for X3DToolKit by doxygen 1.3.6