ViewProviderReference.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2010 Jürgen Riegel <juergen.riegel@web.de>              *
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 
00024 #ifndef PARTGUI_ViewProviderPartReference_H
00025 #define PARTGUI_ViewProviderPartReference_H
00026 
00027 #include <Standard_math.hxx>
00028 #include <Standard_Boolean.hxx>
00029 #include <TopoDS_Shape.hxx>
00030 #include <Gui/ViewProviderGeometryObject.h>
00031 #include <Gui/ViewProviderBuilder.h>
00032 #include <map>
00033 
00034 class TopoDS_Shape;
00035 class TopoDS_Edge;
00036 class TopoDS_Wire;
00037 class TopoDS_Face;
00038 class SoSeparator;
00039 class SoGroup;
00040 class SoSwitch;
00041 class SoVertexShape;
00042 class SoPickedPoint;
00043 class SoShapeHints;
00044 class SoEventCallback;
00045 class SbVec3f;
00046 class SoSphere;
00047 class SoScale;
00048 
00049 namespace PartGui {
00050 
00051 
00052 class PartGuiExport ViewProviderPartReference : public Gui::ViewProviderGeometryObject
00053 {
00054     PROPERTY_HEADER(PartGui::ViewProviderPartReference);
00055 
00056 public:
00058     ViewProviderPartReference();
00060     virtual ~ViewProviderPartReference();
00061 
00062     // Display properties
00063     //App::PropertyFloatConstraint LineWidth;
00064     //App::PropertyFloatConstraint PointSize;
00065     //App::PropertyColor LineColor;
00066     //App::PropertyColor PointColor;
00067     //App::PropertyMaterial LineMaterial;
00068     //App::PropertyMaterial PointMaterial;
00069     //App::PropertyBool ControlPoints;
00070     //App::PropertyEnumeration Lighting;
00071 
00072 
00073     virtual void attach(App::DocumentObject *);
00074     virtual void setDisplayMode(const char* ModeName);
00076     virtual std::vector<std::string> getDisplayModes(void) const;
00078     void reload();
00079 
00080     virtual void updateData(const App::Property*);
00081 
00082 protected:
00084     virtual void onChanged(const App::Property* prop);
00085     //bool loadParameter();
00086 
00087     // nodes for the data representation
00088     SoGroup  *EdgeRoot;
00089     SoGroup  *FaceRoot;
00090     SoGroup  *VertexRoot;
00091     SoMaterial   *pcLineMaterial;
00092     SoMaterial   *pcPointMaterial;
00093     SoDrawStyle  *pcLineStyle;
00094     SoDrawStyle  *pcPointStyle;
00095     SoSwitch     *pcControlPoints;
00096     SoShapeHints *pShapeHints;
00097 
00098 private:
00099     // settings stuff
00100     float meshDeviation;
00101     bool noPerVertexNormals;
00102     bool qualityNormals;
00103     static App::PropertyFloatConstraint::Constraints floatRange;
00104     static const char* LightingEnums[];
00105 };
00106 
00107 
00108 
00109 } // namespace PartGui
00110 
00111 
00112 #endif // PARTGUI_ViewProviderPartReference_H
00113 

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