SoFCMeshVertex.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef MESHGUI_SOFCMESHVERTEX_H
00024 #define MESHGUI_SOFCMESHVERTEX_H
00025
00026 #include <Inventor/fields/SoSField.h>
00027 #include <Inventor/fields/SoSubField.h>
00028 #include <Inventor/nodes/SoSubNode.h>
00029 #include <Inventor/elements/SoReplacedElement.h>
00030 #include <Mod/Mesh/App/Core/Elements.h>
00031
00032 namespace MeshGui {
00033
00034 class MeshGuiExport SoSFMeshPointArray : public SoSField {
00035 typedef SoSField inherited;
00036
00037 SO_SFIELD_HEADER(SoSFMeshPointArray, MeshCore::MeshPointArray*, MeshCore::MeshPointArray*);
00038
00039 public:
00040 static void initClass(void);
00041 void setValue(const MeshCore::MeshPointArray& p);
00042
00043 protected:
00044 SbBool readBinaryValues(SoInput * in, unsigned long numarg);
00045 SbBool read1Value(SoInput * in, unsigned long idx);
00046 void writeBinaryValues(SoOutput * out) const;
00047 void write1Value(SoOutput * out, unsigned long idx) const;
00048 int getNumValuesPerLine() const;
00049 };
00050
00051
00052
00053 class MeshGuiExport SoFCMeshVertexElement : public SoReplacedElement {
00054 typedef SoReplacedElement inherited;
00055
00056 SO_ELEMENT_HEADER(SoFCMeshVertexElement);
00057
00058 public:
00059 static void initClass(void);
00060
00061 virtual void init(SoState * state);
00062 static void set(SoState * const state, SoNode * const node, const MeshCore::MeshPointArray * const coords);
00063 static const MeshCore::MeshPointArray * get(SoState * const state);
00064 static const SoFCMeshVertexElement * getInstance(SoState * state);
00065 virtual void print(FILE * file) const;
00066
00067 protected:
00068 virtual ~SoFCMeshVertexElement();
00069 const MeshCore::MeshPointArray *coords3D;
00070 };
00071
00072
00073
00074 class MeshGuiExport SoFCMeshVertex : public SoNode {
00075 typedef SoSField inherited;
00076
00077 SO_NODE_HEADER(SoFCMeshVertex);
00078
00079 public:
00080 static void initClass(void);
00081 SoFCMeshVertex(void);
00082
00083 SoSFMeshPointArray point;
00084
00085 virtual void doAction(SoAction * action);
00086 virtual void GLRender(SoGLRenderAction * action);
00087 virtual void callback(SoCallbackAction * action);
00088 virtual void getBoundingBox(SoGetBoundingBoxAction * action);
00089 virtual void pick(SoPickAction * action);
00090 virtual void getPrimitiveCount(SoGetPrimitiveCountAction * action);
00091
00092 protected:
00093 virtual ~SoFCMeshVertex();
00094 };
00095
00096 }
00097
00098
00099 #endif // MESHGUI_SOFCMESHVERTEX_H
00100