cgma
OCCDrawTool.hpp
Go to the documentation of this file.
00001 #ifndef OCC_DRAW_TOOL_HPP
00002 #define OCC_DRAW_TOOL_HPP
00003 
00004 #include "CubitDefines.h"
00005 
00006 class TopoDS_Shape;
00007 class TopoDS_Face;
00008 class TopoDS_Edge;
00009 class TopoDS_Vertex;
00010 class Surface;
00011 class Curve;
00012 
00013 template <class X> class DLIList;
00014 
00015 class OCCDrawTool
00016 {
00017 public:
00018 // ********** BEGIN FRIEND DECLARATIONS        **********
00019 
00020 // ********** END FRIEND DECLARATIONS        **********
00021 
00022   ~OCCDrawTool();
00023 
00024   static OCCDrawTool* instance();
00025   //- Gives access to the singleton object of this class
00026 
00027   //do not remove this function....it is handy for debugging.
00028   CubitStatus draw_TopoDS_Shape( TopoDS_Shape *shape, int color,
00029                            CubitBoolean tessellate = CUBIT_FALSE,
00030                            CubitBoolean flush = CUBIT_FALSE );
00031   //- Draw the given TopoDS_Shape.  Handles entities of type CompSolid, Solid, Shell,
00032   //- Face, Loop, Edge or Vertex.  The tessellate option only applies
00033   //- to Faces - if true, the Face is tessellated and each triangle is drawn;
00034   //- otherwise, only the outer curves are drawn.
00035 
00036   CubitStatus draw_surface( Surface *surface, int color, CubitBoolean tessellate, CubitBoolean flush );
00037   CubitStatus draw_curve( Curve *curve, int color, CubitBoolean flush );
00038 
00039   CubitStatus draw_FACE( TopoDS_Face *face, int color, 
00040                          CubitBoolean tessellate = CUBIT_FALSE,
00041                          CubitBoolean flush = CUBIT_FALSE );
00042   //- Draw the given Face.  If tessellate is true, the FACE is tessellated and
00043   //- each triangle is drawn; otherwise, only the outer curves are drawn.
00044 
00045   CubitStatus draw_EDGE( TopoDS_Edge *edge, int color, 
00046                          CubitBoolean flush = CUBIT_FALSE );
00047   //- Draw the given EDGE
00048 
00049   CubitStatus draw_VERTEX( TopoDS_Vertex *vertex, int color, 
00050                            CubitBoolean flush = CUBIT_FALSE );
00051   //- Draw the given VERTEX
00052 
00053 protected:
00054    OCCDrawTool();
00055    //- Class Constructor. (Not callable by user code. Class is constructed
00056    //- by the {instance()} member function.
00057 
00058 private:
00059   
00060   static OCCDrawTool* instance_;
00061 };
00062 
00063 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines