0025180: Visualization - Homogeneous transformation API in TKV3d
[occt.git] / src / PrsMgr / PrsMgr_Presentation.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-01-25
2// Created by: Jean-Louis Frenkel
3// Copyright (c) 1995-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _PrsMgr_Presentation_HeaderFile
18#define _PrsMgr_Presentation_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <PrsMgr_PresentableObjectPointer.hxx>
24#include <Standard_Boolean.hxx>
25#include <Standard_Integer.hxx>
26#include <MMgt_TShared.hxx>
27#include <Aspect_TypeOfHighlightMethod.hxx>
28#include <Quantity_Length.hxx>
29class PrsMgr_PresentationManager;
30class PrsMgr_Prs;
31class PrsMgr_PresentableObject;
32class Quantity_Color;
33class Geom_Transformation;
42cf5bc1 34class Prs3d_Presentation;
35class Graphic3d_Structure;
36class Graphic3d_DataStructureManager;
37class Prs3d_Projector;
38
39
40class PrsMgr_Presentation;
41DEFINE_STANDARD_HANDLE(PrsMgr_Presentation, MMgt_TShared)
42
43
44class PrsMgr_Presentation : public MMgt_TShared
45{
46
47public:
48
49
50 //! Destructor
e6f550da 51 Standard_EXPORT ~PrsMgr_Presentation();
42cf5bc1 52
53 const Handle(Prs3d_Presentation)& Presentation() const;
54
55 //! returns the PresentationManager in which the presentation has been created.
56 const Handle(PrsMgr_PresentationManager)& PresentationManager() const;
57
58 void SetUpdateStatus (const Standard_Boolean theStat);
59
60 Standard_Boolean MustBeUpdated() const;
61
62friend class PrsMgr_PresentationManager;
63friend class PrsMgr_PresentableObject;
64friend class PrsMgr_Prs;
65
66
92efcf78 67 DEFINE_STANDARD_RTTIEXT(PrsMgr_Presentation,MMgt_TShared)
42cf5bc1 68
69protected:
70
71
72
73
74private:
75
76
77 Standard_EXPORT PrsMgr_Presentation(const Handle(PrsMgr_PresentationManager)& thePresentationManager, const Handle(PrsMgr_PresentableObject)& thePresentableObject);
78
79 Standard_EXPORT void Display();
80
81 //! Displays myStructure.
82 Standard_EXPORT void display (const Standard_Boolean theIsHighlight);
83
84 Standard_EXPORT void Erase();
85
86 Standard_EXPORT void SetVisible (const Standard_Boolean theValue);
87
88 Standard_EXPORT void Highlight (const Aspect_TypeOfHighlightMethod theMethod, const Quantity_Color& theColor);
89
90 Standard_EXPORT void Unhighlight() const;
91
92 Standard_EXPORT Standard_Boolean IsHighlighted() const;
93
94 Standard_EXPORT Standard_Boolean IsDisplayed() const;
95
96 Standard_EXPORT Standard_Integer DisplayPriority() const;
97
98 Standard_EXPORT void SetDisplayPriority (const Standard_Integer aNewPrior);
99
100 //! Set Z layer ID for the presentation
101 Standard_EXPORT void SetZLayer (const Standard_Integer theLayerId);
102
103 //! Get Z layer ID for the presentation
104 Standard_EXPORT Standard_Integer GetZLayer() const;
105
106 //! removes the whole content of the presentation.
107 //! Does not remove the other connected presentations.
108 Standard_EXPORT void Clear();
109
110 Standard_EXPORT void Connect (const Handle(PrsMgr_Presentation)& theOther) const;
111
1f7f5a90 112 Standard_EXPORT void SetTransformation (const Handle(Geom_Transformation)& theTrsf) const;
2831708b 113
42cf5bc1 114 Standard_EXPORT void Compute (const Handle(Graphic3d_Structure)& theStructure);
115
116 Standard_EXPORT Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector);
117
118 Standard_EXPORT Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Geom_Transformation)& theTrsf);
119
120 Standard_EXPORT void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Graphic3d_Structure)& theGivenStruct);
121
122 Standard_EXPORT void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Geom_Transformation)& theTrsf, const Handle(Graphic3d_Structure)& theGivenStruct);
123
124 Standard_EXPORT static Handle(Prs3d_Projector) Projector (const Handle(Graphic3d_DataStructureManager)& theProjector);
125
2831708b 126protected:
127
42cf5bc1 128 Handle(PrsMgr_PresentationManager) myPresentationManager;
4796758e 129 Handle(Prs3d_Presentation) myStructure;
42cf5bc1 130 PrsMgr_PresentableObjectPointer myPresentableObject;
131 Standard_Boolean myMustBeUpdated;
132 Standard_Integer myBeforeHighlightState;
133
134
135};
136
137
138#include <PrsMgr_Presentation.lxx>
139
140
141
142
143
144#endif // _PrsMgr_Presentation_HeaderFile