SoFCIndexedFaceSet.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2009 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 #ifndef MESHGUI_SOFCINDEXEDFACESET_H
00024 #define MESHGUI_SOFCINDEXEDFACESET_H
00025 
00026 
00027 #include <Inventor/nodes/SoIndexedFaceSet.h>
00028 
00029 class SoGLCoordinateElement;
00030 class SoTextureCoordinateBundle;
00031 
00032 typedef unsigned int GLuint;
00033 typedef int GLint;
00034 typedef float GLfloat;
00035 
00036 namespace MeshGui {
00037 
00045 class MeshGuiExport SoFCIndexedFaceSet : public SoIndexedFaceSet {
00046     typedef SoIndexedFaceSet inherited;
00047 
00048     SO_NODE_HEADER(SoFCIndexedFaceSet);
00049 
00050 public:
00051     static void initClass();
00052     SoFCIndexedFaceSet();
00053 
00054     unsigned int renderTriangleLimit;
00055 
00056 protected:
00057     // Force using the reference count mechanism.
00058     virtual ~SoFCIndexedFaceSet() {};
00059     virtual void GLRender(SoGLRenderAction *action);
00060     void drawCoords(const SoGLCoordinateElement * const vertexlist,
00061                     const int32_t *vertexindices,
00062                     int numindices,
00063                     const SbVec3f *normals,
00064                     const int32_t *normalindices,
00065                     SoMaterialBundle *materials,
00066                     const int32_t *matindices,
00067                     const int32_t binding,
00068                     const SoTextureCoordinateBundle * const texcoords,
00069                     const int32_t *texindices);
00070 
00071     void doAction(SoAction * action);
00072 
00073 private:
00074     void startSelection(SoAction * action);
00075     void stopSelection(SoAction * action);
00076     void renderSelectionGeometry(const SbVec3f *);
00077     void startVisibility(SoAction * action);
00078     void stopVisibility(SoAction * action);
00079     void renderVisibleFaces(const SbVec3f *);
00080 
00081     GLuint *selectBuf;
00082 };
00083 
00084 } // namespace MeshGui
00085 
00086 
00087 #endif // MESHGUI_SOFCINDEXEDFACESET_H
00088 

Generated on Wed Nov 23 19:00:39 2011 for FreeCAD by  doxygen 1.6.1