00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SO_TO_U3D_ACTION_H
00026 #define SO_TO_U3D_ACTION_H
00027
00028 #include <Inventor/actions/SoCallbackAction.h>
00029 #include <Inventor/actions/SoSubAction.h>
00030 #include <HardCopy/SoHardCopy.h>
00031
00032 class SoToU3DActionPrivate;
00033 class SoPath;
00034
00212 class SoToU3DAction : public SoCallbackAction
00213 {
00214 SO_ACTION_HEADER(SoToU3DAction);
00215
00216 public:
00217
00218
00219
00220
00221 SoToU3DAction();
00222
00223
00224
00225
00226 virtual ~SoToU3DAction();
00227
00234 SoNONUNICODE virtual bool openFile( const char* filename );
00235
00239 virtual bool openFile( const SbString& filename );
00240
00241
00245 virtual bool closeFile();
00246
00247
00248
00252 virtual void apply( SoNode* node );
00253
00257 virtual void apply( SoPath* path );
00258
00271 virtual void apply( const SoPathList& pathList, SbBool obeysRules = false );
00272
00276 void forcePolygonalText3( bool force );
00277
00281 bool isPolygonalText3Forced() const;
00282
00286 void setExportDraggers( bool force );
00287
00291 bool areDraggersExported() const;
00292
00293 private:
00297 static void initClass();
00298 static void exitClass();
00299
00300
00301 const SoToU3DActionPrivate* getImpl() { return m_private; }
00302
00303 const SoPath* getCurPath();
00304
00305 SoToU3DActionPrivate* m_private;
00306
00307 private:
00309 virtual void beginTraversal( SoNode* node );
00310
00311 private:
00312
00313
00314 static SoCallbackAction::Response separatorPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00315 static SoCallbackAction::Response separatorPostCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00316 static SoCallbackAction::Response environmentPreCBS( void* userData, SoCallbackAction* action, const SoNode* node );
00317 static SoCallbackAction::Response lightPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00318 static SoCallbackAction::Response cameraPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00319 static SoCallbackAction::Response backgroundPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00320 static SoCallbackAction::Response shapePreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00321 static SoCallbackAction::Response shapePostCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00322 static SoCallbackAction::Response draggerPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00323 static void shapeTriangleCBS( void* userData, SoCallbackAction *action,
00324 const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3 );
00325 static void shapeLineCBS ( void* userData, SoCallbackAction* action,
00326 const SoPrimitiveVertex* v1, const SoPrimitiveVertex* v2 );
00327 static void shapePointCBS ( void* userData, SoCallbackAction* action,
00328 const SoPrimitiveVertex* v1 );
00329
00330 bool m_forcePolygonalText3, m_exportDraggers;
00331 };
00332
00333 #endif // SO_TO_U3D_ACTION_H
00334
00335
00336