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 : David Beilloin (Sep 2014) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SO_TO_STL_ACTION_H_ 00026 #define _SO_TO_STL_ACTION_H_ 00027 00028 #include <Inventor/io/STL/SoSTLFileFormat.h> 00029 00030 #include <Inventor/actions/SoCallbackAction.h> 00031 00032 class SoSTLWriteActionImpl; 00033 00058 class STLFILEFORMAT_API SoSTLWriteAction : public SoCallbackAction 00059 { 00060 SO_ACTION_HEADER(SoSTLWriteAction); 00061 public: 00063 SoSTLWriteAction(); 00064 00066 ~SoSTLWriteAction(); 00067 00072 void setOutputFileName( const SbString& filename ); 00073 00077 void setBinaryOutput(bool flag); 00078 00082 bool isBinaryOutput() const; 00083 00085 virtual void apply(SoNode *node); 00086 virtual void apply(SoPath *path); 00087 virtual void apply(const SoPathList &pathList, SbBool obeysRules = FALSE); 00088 00089 private: 00091 static void initClass(); 00092 static void exitClass(); 00093 00094 private: 00096 virtual void beginTraversal(SoNode *); 00097 00099 virtual void endTraversal(SoNode *); 00100 00101 // don't need extra work of compactPath 00102 virtual SbBool shouldCompactPathLists() const 00103 { return FALSE; } 00104 00105 private: 00106 // implementation class 00107 SoSTLWriteActionImpl* m_impl; 00108 }; 00109 00110 #endif //_SO_TO_STL_ACTION_H_ 00111