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