b311480e |
1 | // Copyright (c) 1998-1999 Matra Datavision |
973c2be1 |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
b311480e |
5 | // |
d5f74e42 |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
b311480e |
14 | |
1f7f5a90 |
15 | #include <PrsMgr_Prs.hxx> |
42cf5bc1 |
16 | |
7fd59977 |
17 | #include <Geom_Transformation.hxx> |
42cf5bc1 |
18 | #include <gp_Trsf.hxx> |
19 | #include <Graphic3d_DataStructureManager.hxx> |
20 | #include <Graphic3d_Structure.hxx> |
21 | #include <Graphic3d_StructureManager.hxx> |
22 | #include <Precision.hxx> |
23 | #include <PrsMgr_Presentation.hxx> |
42cf5bc1 |
24 | #include <Standard_Type.hxx> |
7fd59977 |
25 | |
92efcf78 |
26 | IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_Prs,Prs3d_Presentation) |
27 | |
af324faa |
28 | PrsMgr_Prs::PrsMgr_Prs (const Handle(Graphic3d_StructureManager)& theStructManager, |
29 | const PrsMgr_PresentationPointer& thePrs, |
30 | const PrsMgr_TypeOfPresentation3d theTypeOfPresentation) |
31 | : Prs3d_Presentation (theStructManager), |
32 | myPresentation3d (thePrs) |
7fd59977 |
33 | { |
af324faa |
34 | if (theTypeOfPresentation == PrsMgr_TOP_ProjectorDependant) |
7fd59977 |
35 | SetVisual(Graphic3d_TOS_COMPUTED); |
36 | } |
37 | |
38 | //======================================================================= |
39 | //function : Compute |
40 | //purpose : |
41 | //======================================================================= |
42 | |
eb4320f2 |
43 | void PrsMgr_Prs::Compute() |
44 | { |
45 | myPresentation3d->Compute (this); |
46 | } |
47 | |
48 | //======================================================================= |
49 | //function : Compute |
50 | //purpose : |
51 | //======================================================================= |
52 | |
7fd59977 |
53 | Handle(Graphic3d_Structure) PrsMgr_Prs::Compute(const Handle(Graphic3d_DataStructureManager)& aProjector) { |
54 | return myPresentation3d->Compute(aProjector); |
55 | } |
56 | //======================================================================= |
57 | //function : Compute |
1f7f5a90 |
58 | //purpose : |
7fd59977 |
59 | //======================================================================= |
60 | |
1f7f5a90 |
61 | Handle(Graphic3d_Structure) PrsMgr_Prs::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, |
62 | const Handle(Geom_Transformation)& theTrsf) |
7fd59977 |
63 | { |
1f7f5a90 |
64 | return myPresentation3d->Compute (theProjector, theTrsf); |
7fd59977 |
65 | } |
66 | |
67 | //======================================================================= |
68 | //function : Compute |
69 | //purpose : |
70 | //======================================================================= |
71 | |
72 | void PrsMgr_Prs::Compute(const Handle(Graphic3d_DataStructureManager)& aProjector, |
73 | Handle(Graphic3d_Structure)& aGivenStruct) |
74 | { |
75 | myPresentation3d->Compute(aProjector,aGivenStruct); |
76 | } |
77 | |
78 | |
79 | //======================================================================= |
80 | //function : Compute |
1f7f5a90 |
81 | //purpose : |
7fd59977 |
82 | //======================================================================= |
83 | |
1f7f5a90 |
84 | void PrsMgr_Prs::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, |
85 | const Handle(Geom_Transformation)& theTrsf, |
86 | Handle(Graphic3d_Structure)& theGivenStruct) |
7fd59977 |
87 | { |
1f7f5a90 |
88 | myPresentation3d->Compute (theProjector, theTrsf, theGivenStruct); |
7fd59977 |
89 | } |