1 // Created on: 2007-07-19
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2007-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef NIS_TriangulatedDrawer_HeaderFile
17 #define NIS_TriangulatedDrawer_HeaderFile
19 #include <NIS_Drawer.hxx>
20 #include <Quantity_Color.hxx>
22 class NIS_Triangulated;
25 * Drawer for interactive object type NIS_Triangulated.
28 class NIS_TriangulatedDrawer : public NIS_Drawer
31 // ---------- PUBLIC METHODS ----------
36 Standard_EXPORT NIS_TriangulatedDrawer(const Quantity_Color theNormal,
37 const Quantity_Color theHilight
38 = Quantity_NOC_GRAY80,
39 const Quantity_Color theDynHilight
40 = Quantity_NOC_CYAN1);
43 * Copy the relevant information from another instance of Drawer.
44 * raises exception if theOther has incompatible type (test IsKind).
46 Standard_EXPORT virtual void Assign (const Handle_NIS_Drawer& theOther);
49 * Called before execution of Draw(), once per group of interactive objects.
51 Standard_EXPORT virtual void BeforeDraw(const DrawType theType,
52 const NIS_DrawList& theDrawList);
55 * Called after execution of Draw(), once per group of interactive objects.
57 Standard_EXPORT virtual void AfterDraw(const DrawType theType,
58 const NIS_DrawList& theDrawList);
61 * Main function: display the given interactive object in the given view.
63 Standard_EXPORT virtual void Draw (const Handle_NIS_InteractiveObject&,
64 const DrawType theType,
65 const NIS_DrawList& theDrawList);
68 * Matching two instances, for Map interface.
70 Standard_EXPORT virtual Standard_Boolean
71 IsEqual (const Handle_NIS_Drawer& theOth)const;
75 * If myPolygonAsLineLoop is true then draw polygons of the object
76 * in the mode GL_LINE_LOOP instead of GL_POLYGON in the case if no filling
77 * was requested. This will eliminate the bug with Intel integrated graphic
78 * cards (e.g. 945G Express) for the sake of polygon offset functionality.
80 Standard_Boolean myPolygonAsLineLoop;
82 Quantity_Color myColor[5];
83 Standard_ShortReal myLineWidth;
84 Standard_Boolean myIsDrawPolygons;
85 unsigned int myPolygonType;
87 friend class NIS_Triangulated;
90 // Declaration of CASCADE RTTI
91 DEFINE_STANDARD_RTTI (NIS_TriangulatedDrawer)
94 // Definition of HANDLE object using Standard_DefineHandle.hxx
95 DEFINE_STANDARD_HANDLE (NIS_TriangulatedDrawer, NIS_Drawer)