Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:23

0001 // Created on: 1998-09-07
0002 // Created by: Denis PASCAL
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _DDataStd_DrawDriver_HeaderFile
0018 #define _DDataStd_DrawDriver_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Transient.hxx>
0024 #include <Draw_ColorKind.hxx>
0025 class Draw_Drawable3D;
0026 class TDF_Label;
0027 class TDataXtd_Constraint;
0028 class TopoDS_Shape;
0029 
0030 
0031 class DDataStd_DrawDriver;
0032 DEFINE_STANDARD_HANDLE(DDataStd_DrawDriver, Standard_Transient)
0033 
0034 //! Root class of drivers to build draw variables from TDF_Label.
0035 //! Priority rule to display standard attributes is :
0036 //! * 1 Constraint
0037 //! * 2 Object
0038 //! * 3 Datum      (Point,Axis,Plane)
0039 //! * 4 Geometry
0040 //! * 5 NamedShape
0041 class DDataStd_DrawDriver : public Standard_Transient
0042 {
0043 
0044 public:
0045 
0046   
0047   //! access to the current DrawDriver
0048   //! ================================
0049   Standard_EXPORT static void Set (const Handle(DDataStd_DrawDriver)& DD);
0050   
0051   Standard_EXPORT static Handle(DDataStd_DrawDriver) Get();
0052   
0053   //! next method is called by DrawPresentation (may be redefined)
0054   //! ============================================================
0055   Standard_EXPORT DDataStd_DrawDriver();
0056   
0057   //! reusable methods (may used when redefined <Drawable>)
0058   //! =====================================================
0059   Standard_EXPORT virtual Handle(Draw_Drawable3D) Drawable (const TDF_Label& L) const;
0060   
0061   Standard_EXPORT Handle(Draw_Drawable3D) DrawableConstraint (const Handle(TDataXtd_Constraint)& C) const;
0062   
0063   Standard_EXPORT Handle(Draw_Drawable3D) DrawableShape (const TDF_Label& L, const Draw_ColorKind color, const Standard_Boolean current = Standard_True) const;
0064   
0065   //! May be used for temporary display of a shape
0066   Standard_EXPORT static Handle(Draw_Drawable3D) DrawableShape (const TopoDS_Shape& s, const Draw_ColorKind color);
0067 
0068 
0069 
0070 
0071   DEFINE_STANDARD_RTTIEXT(DDataStd_DrawDriver,Standard_Transient)
0072 
0073 protected:
0074 
0075 
0076 
0077 
0078 private:
0079 
0080 
0081 
0082 
0083 };
0084 
0085 
0086 
0087 
0088 
0089 
0090 
0091 #endif // _DDataStd_DrawDriver_HeaderFile