00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 ** Modified by : M. Bonaventure (Mar 2010) 00023 **=======================================================================*/ 00024 /*============================================================================== 00025 * File : MoDrawStyleElement.h 00026 * Classes : MoDrawStyleElement 00027 * Author(s) : Pascal Doux 00028 * Date : 8 9 2008 00029 *============================================================================== 00030 * 00031 * Description : Element that stores a data binding. 00032 * 00033 *============================================================================*/ 00034 00035 #ifndef _MO_DRAWSTYLE_ELEMENT_ 00036 #define _MO_DRAWSTYLE_ELEMENT_ 00037 00038 #include <Inventor/elements/SoReplacedElement.h> 00039 #include <MeshVizXLM/mapping/MoMeshVizDataMapping.h> 00040 #include <MeshVizXLM/mapping/nodes/MoDrawStyle.h> 00041 00042 class MoDataBinding; 00043 00054 class MESHIVIZDM_API MoDrawStyleElement : public SoReplacedElement { 00055 00056 SO_ELEMENT_HEADER(MoDrawStyleElement); 00057 00058 public: 00059 00061 static void set(SoState *state, MoDrawStyle *node); 00062 00064 static bool getDrawStyle(SoState *state, bool& displaySolid, bool& displayEdges, bool& displayPoints); 00065 00066 static float getFadingThreshold(SoState *state); 00067 00069 static bool getDefault(bool& displaySolid, bool& displayEdges, bool& displayPoints, float& fadingThreshold); 00070 00074 virtual void print(FILE *fp) const; 00075 00076 private: 00077 00079 virtual void init(SoState *state); 00080 00084 virtual SbBool matches(const SoElement* elt) const; 00085 00089 virtual SoElement *copyMatchInfo() const; 00090 00091 private: 00092 // Initializes the class 00093 static void initClass(); 00094 static void exitClass() ; 00095 00096 private: 00097 bool m_displaySolid; 00098 bool m_displayEdges; 00099 bool m_displayPoints; 00100 float m_fadingThreshold; 00101 bool m_isSet; 00102 00103 virtual ~MoDrawStyleElement(); 00104 00105 }; 00106 /*----------------------------------------------------------------------------*/ 00107 00108 #endif // _MO_DRAWSTYLE_ELEMENT_ 00109 00110 00111