0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[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
42cf5bc1 20#include <PrsMgr_PresentableObjectPointer.hxx>
f838dac4 21#include <Standard.hxx>
42cf5bc1 22#include <Standard_Boolean.hxx>
23#include <Standard_Integer.hxx>
f838dac4 24#include <Standard_Transient.hxx>
25#include <Standard_Type.hxx>
42cf5bc1 26#include <Aspect_TypeOfHighlightMethod.hxx>
f838dac4 27
42cf5bc1 28class PrsMgr_PresentationManager;
29class PrsMgr_Prs;
30class PrsMgr_PresentableObject;
31class Quantity_Color;
32class Geom_Transformation;
42cf5bc1 33class Prs3d_Presentation;
f838dac4 34class Prs3d_Drawer;
42cf5bc1 35class Graphic3d_Structure;
36class Graphic3d_DataStructureManager;
37class Prs3d_Projector;
38
f838dac4 39DEFINE_STANDARD_HANDLE(PrsMgr_Presentation, Standard_Transient)
42cf5bc1 40
f838dac4 41class PrsMgr_Presentation : public Standard_Transient
42cf5bc1 42{
f838dac4 43 DEFINE_STANDARD_RTTIEXT(PrsMgr_Presentation, Standard_Transient)
44 friend class PrsMgr_PresentationManager;
45 friend class PrsMgr_PresentableObject;
46 friend class PrsMgr_Prs;
42cf5bc1 47public:
48
42cf5bc1 49 //! Destructor
e6f550da 50 Standard_EXPORT ~PrsMgr_Presentation();
42cf5bc1 51
f838dac4 52 const Handle(Prs3d_Presentation)& Presentation() const { return myStructure; }
42cf5bc1 53
f838dac4 54 //! returns the PresentationManager in which the presentation has been created.
55 const Handle(PrsMgr_PresentationManager)& PresentationManager() const { return myPresentationManager; }
42cf5bc1 56
f838dac4 57 void SetUpdateStatus (const Standard_Boolean theUpdateStatus) { myMustBeUpdated = theUpdateStatus; }
42cf5bc1 58
f838dac4 59 Standard_Boolean MustBeUpdated() const { return myMustBeUpdated; }
42cf5bc1 60
61private:
62
42cf5bc1 63 Standard_EXPORT PrsMgr_Presentation(const Handle(PrsMgr_PresentationManager)& thePresentationManager, const Handle(PrsMgr_PresentableObject)& thePresentableObject);
64
65 Standard_EXPORT void Display();
66
67 //! Displays myStructure.
68 Standard_EXPORT void display (const Standard_Boolean theIsHighlight);
69
70 Standard_EXPORT void Erase();
71
72 Standard_EXPORT void SetVisible (const Standard_Boolean theValue);
73
f838dac4 74 Standard_EXPORT void Highlight (const Handle(Prs3d_Drawer)& theStyle);
42cf5bc1 75
76 Standard_EXPORT void Unhighlight() const;
77
78 Standard_EXPORT Standard_Boolean IsHighlighted() const;
79
80 Standard_EXPORT Standard_Boolean IsDisplayed() const;
81
82 Standard_EXPORT Standard_Integer DisplayPriority() const;
83
84 Standard_EXPORT void SetDisplayPriority (const Standard_Integer aNewPrior);
85
86 //! Set Z layer ID for the presentation
87 Standard_EXPORT void SetZLayer (const Standard_Integer theLayerId);
88
89 //! Get Z layer ID for the presentation
90 Standard_EXPORT Standard_Integer GetZLayer() const;
91
92 //! removes the whole content of the presentation.
93 //! Does not remove the other connected presentations.
94 Standard_EXPORT void Clear();
95
96 Standard_EXPORT void Connect (const Handle(PrsMgr_Presentation)& theOther) const;
97
1f7f5a90 98 Standard_EXPORT void SetTransformation (const Handle(Geom_Transformation)& theTrsf) const;
2831708b 99
42cf5bc1 100 Standard_EXPORT void Compute (const Handle(Graphic3d_Structure)& theStructure);
101
102 Standard_EXPORT Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector);
103
104 Standard_EXPORT Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Geom_Transformation)& theTrsf);
105
106 Standard_EXPORT void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Graphic3d_Structure)& theGivenStruct);
107
108 Standard_EXPORT void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Geom_Transformation)& theTrsf, const Handle(Graphic3d_Structure)& theGivenStruct);
109
110 Standard_EXPORT static Handle(Prs3d_Projector) Projector (const Handle(Graphic3d_DataStructureManager)& theProjector);
111
2831708b 112protected:
113
42cf5bc1 114 Handle(PrsMgr_PresentationManager) myPresentationManager;
4796758e 115 Handle(Prs3d_Presentation) myStructure;
42cf5bc1 116 PrsMgr_PresentableObjectPointer myPresentableObject;
117 Standard_Boolean myMustBeUpdated;
118 Standard_Integer myBeforeHighlightState;
119
42cf5bc1 120};
121
42cf5bc1 122#endif // _PrsMgr_Presentation_HeaderFile