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
00213 class SoToU3DAction : public SoCallbackAction
00214 {
00215 SO_ACTION_HEADER(SoToU3DAction);
00216
00217 public:
00218
00219
00220
00221
00222 SoToU3DAction();
00223
00224
00225
00226
00227 virtual ~SoToU3DAction();
00228
00235 SoNONUNICODE bool openFile( const char* filename );
00236
00240 bool openFile( const SbString& filename );
00241
00242
00246 bool closeFile();
00247
00248
00249
00253 virtual void apply( SoNode* node );
00254
00258 virtual void apply( SoPath* path );
00259
00272 virtual void apply( const SoPathList& pathList, SbBool obeysRules = false );
00273
00277 void forcePolygonalText3( bool force );
00278
00282 bool isPolygonalText3Forced() const;
00283
00287 void setExportDraggers( bool force );
00288
00292 bool areDraggersExported() const;
00293
00294 private:
00298 static void initClass();
00299 static void exitClass();
00300
00301
00302 const SoToU3DActionPrivate* getImpl() { return m_private; }
00303
00304 virtual void beginTraversal( SoNode* node );
00305
00306 const SoPath* getCurPath();
00307
00308 SoToU3DActionPrivate* m_private;
00309
00310 private:
00311
00312
00313 static SoCallbackAction::Response separatorPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00314 static SoCallbackAction::Response separatorPostCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00315 static SoCallbackAction::Response environmentPreCBS( void* userData, SoCallbackAction* action, const SoNode* node );
00316 static SoCallbackAction::Response lightPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00317 static SoCallbackAction::Response cameraPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00318 static SoCallbackAction::Response backgroundPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00319 static SoCallbackAction::Response shapePreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00320 static SoCallbackAction::Response shapePostCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00321 static SoCallbackAction::Response draggerPreCBS ( void* userData, SoCallbackAction* action, const SoNode* node );
00322 static void shapeTriangleCBS( void* userData, SoCallbackAction *action,
00323 const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3 );
00324 static void shapeLineCBS ( void* userData, SoCallbackAction* action,
00325 const SoPrimitiveVertex* v1, const SoPrimitiveVertex* v2 );
00326 static void shapePointCBS ( void* userData, SoCallbackAction* action,
00327 const SoPrimitiveVertex* v1 );
00328
00329 bool m_forcePolygonalText3, m_exportDraggers;
00330 };
00331
00332 #endif // SO_TO_U3D_ACTION_H
00333
00334
00335