0024814: Avoid using explicit names of Handle classes
[occt.git] / src / NIS / NIS_TriangulatedDrawer.hxx
CommitLineData
b311480e 1// Created on: 2007-07-19
2// Created by: Alexander GRIGORIEV
973c2be1 3// Copyright (c) 2007-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 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
973c2be1 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
16#ifndef NIS_TriangulatedDrawer_HeaderFile
17#define NIS_TriangulatedDrawer_HeaderFile
18
19#include <NIS_Drawer.hxx>
20#include <Quantity_Color.hxx>
21
22class NIS_Triangulated;
23
24/**
25 * Drawer for interactive object type NIS_Triangulated.
26 */
27
28class NIS_TriangulatedDrawer : public NIS_Drawer
29{
30 public:
31 // ---------- PUBLIC METHODS ----------
32
33 /**
34 * Constructor.
35 */
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);
41
42 /**
43 * Copy the relevant information from another instance of Drawer.
44 * raises exception if theOther has incompatible type (test IsKind).
45 */
857ffd5e 46 Standard_EXPORT virtual void Assign (const Handle(NIS_Drawer)& theOther);
7fd59977 47
48 /**
49 * Called before execution of Draw(), once per group of interactive objects.
50 */
51 Standard_EXPORT virtual void BeforeDraw(const DrawType theType,
52 const NIS_DrawList& theDrawList);
53
54 /**
55 * Called after execution of Draw(), once per group of interactive objects.
56 */
57 Standard_EXPORT virtual void AfterDraw(const DrawType theType,
58 const NIS_DrawList& theDrawList);
59
60 /**
61 * Main function: display the given interactive object in the given view.
62 */
857ffd5e 63 Standard_EXPORT virtual void Draw (const Handle(NIS_InteractiveObject)&,
7fd59977 64 const DrawType theType,
65 const NIS_DrawList& theDrawList);
66
67 /**
68 * Matching two instances, for Map interface.
69 */
70 Standard_EXPORT virtual Standard_Boolean
857ffd5e 71 IsEqual (const Handle(NIS_Drawer)& theOth)const;
ffe2bea7
A
72
73protected:
74 /**
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.
79 */
80 Standard_Boolean myPolygonAsLineLoop;
81
82 Quantity_Color myColor[5];
7fd59977 83 Standard_ShortReal myLineWidth;
84 Standard_Boolean myIsDrawPolygons;
ffe2bea7 85 unsigned int myPolygonType;
7fd59977 86
87 friend class NIS_Triangulated;
88
89 public:
90// Declaration of CASCADE RTTI
91DEFINE_STANDARD_RTTI (NIS_TriangulatedDrawer)
92};
93
94// Definition of HANDLE object using Standard_DefineHandle.hxx
95DEFINE_STANDARD_HANDLE (NIS_TriangulatedDrawer, NIS_Drawer)
96
97
98#endif