0023544: Texture management in TKOpenGl should be redesigned
[occt.git] / src / MeshVS / MeshVS_MeshPrsBuilder.cdl
CommitLineData
b311480e 1-- Created on: 2003-10-10
2-- Created by: Alexander SOLOVYOV
3-- Copyright (c) 2003-2012 OPEN CASCADE SAS
4--
5-- The content of this file is subject to the Open CASCADE Technology Public
6-- License Version 6.5 (the "License"). You may not use the content of this file
7-- except in compliance with the License. Please obtain a copy of the License
8-- at http://www.opencascade.org and read it completely before using this file.
9--
10-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12--
13-- The Original Code and all software distributed under the License is
14-- distributed on an "AS IS" basis, without warranty of any kind, and the
15-- Initial Developer hereby disclaims all such warranties, including without
16-- limitation, any warranties of merchantability, fitness for a particular
17-- purpose or non-infringement. Please see the License for the specific terms
18-- and conditions governing the rights and limitations under the License.
19
7fd59977 20
21
22class MeshPrsBuilder from MeshVS inherits PrsBuilder from MeshVS
23
24 ---Purpose: This class provides methods to compute base mesh presentation
25
26uses
27 Integer from Standard,
28 Boolean from Standard,
29
30 Presentation from Prs3d,
31
32 PrsBuilder from MeshVS,
33 Mesh from MeshVS,
34 MeshPtr from MeshVS,
35 DisplayModeFlags from MeshVS,
36 DataSource from MeshVS,
37 BuilderPriority from MeshVS,
38 Drawer from MeshVS,
39 HArray1OfSequenceOfInteger from MeshVS,
40 MaterialAspect from Graphic3d,
41 AspectFillArea3d from Graphic3d,
42 AspectLine3d from Graphic3d,
43 AspectMarker3d from Graphic3d,
44 Array1OfReal from TColStd,
45 ArrayOfPolylines from Graphic3d,
46 ArrayOfPolygons from Graphic3d,
47 ArrayOfPrimitives from Graphic3d,
48 PackedMapOfInteger from TColStd
49
50is
51
52 Create ( Parent : Mesh from MeshVS;
53 Flags : DisplayModeFlags from MeshVS = MeshVS_DMF_OCCMask;
54 DS : DataSource from MeshVS = 0;
55 Id : Integer = -1;
56 Priority : BuilderPriority from MeshVS = MeshVS_BP_Mesh ) returns mutable MeshPrsBuilder from MeshVS;
57 ---Purpose: Creates builder with certain display mode flags, data source, ID and priority
58
59 Build ( me; Prs : Presentation from Prs3d;
60 IDs : PackedMapOfInteger;
61 IDsToExclude: in out PackedMapOfInteger;
62 IsElement : Boolean;
63 DisplayMode : Integer ) is virtual;
64 ---Purpose: Builds base mesh presentation by calling the methods below
65
66 BuildNodes ( me; Prs : Presentation from Prs3d;
67 IDs : PackedMapOfInteger;
68 IDsToExclude: in out PackedMapOfInteger;
69 DisplayMode : Integer ) is virtual;
70 ---Purpose: Builds nodes presentation
71
72 BuildElements ( me; Prs : Presentation from Prs3d;
73 IDs : PackedMapOfInteger;
74 IDsToExclude: in out PackedMapOfInteger;
75 DisplayMode : Integer ) is virtual;
76 ---Purpose: Builds elements presentation
77
78 BuildHilightPrs ( me; Prs : Presentation from Prs3d;
79 IDs : PackedMapOfInteger;
80 IsElement : Boolean
81 ) is virtual;
82 ---Purpose: Builds presentation of hilighted entity
83
84 AddLinkPrs ( me; theCoords : Array1OfReal from TColStd;
85 theLines : ArrayOfPolylines from Graphic3d;
86 IsShrinked : Boolean;
87 ShrinkCoef : Real
88 ) is protected;
89 ---Purpose: Add to array of polylines some lines representing link
90
91 AddFaceWirePrs ( me; theCoords : Array1OfReal from TColStd;
92 NbNodes : Integer;
93 theLines : ArrayOfPolylines from Graphic3d;
94 IsShrinked : Boolean;
95 ShrinkCoef : Real
96 ) is protected;
97 ---Purpose: Add to array of polylines some lines representing face's wire
98
99 AddFaceSolidPrs ( me; ID : Integer;
100 theCoords : Array1OfReal from TColStd;
101 NbNodes : Integer;
102 MaxNodes : Integer;
103 thePolygons : ArrayOfPolygons from Graphic3d;
104 IsReflected : Boolean;
105 IsShrinked : Boolean;
106 ShrinkCoef : Real;
107 IsMeshSmoothShading : Boolean
108 ) is protected;
109 ---Purpose: Add to array of polygons a polygon representing face
110
111 AddVolumePrs ( myclass; Topo : HArray1OfSequenceOfInteger from MeshVS;
112 Nodes : Array1OfReal from TColStd;
113 NbNodes : Integer;
114 Array : ArrayOfPrimitives from Graphic3d;
115 IsReflected : Boolean;
116 IsShrinked : Boolean;
117 IsSelect : Boolean;
118 ShrinkCoef : Real );
119 ---Purpose: Add to array polygons or polylines representing volume
120
121 HowManyPrimitives( myclass; Topo : HArray1OfSequenceOfInteger from MeshVS;
122 AsPolygons : Boolean;
123 IsSelect : Boolean;
124 NbNodes : Integer;
125 Vertices, Bounds : out Integer );
126 ---Purpose: Calculate how many polygons or polylines are necessary to draw passed topology
127
128 DrawArrays ( me; Prs : Presentation from Prs3d;
129 thePolygons : ArrayOfPolygons from Graphic3d;
130 theLines : ArrayOfPolylines from Graphic3d;
131 theLinkLines : ArrayOfPolylines from Graphic3d;
132 theVolumesInShad : ArrayOfPolygons from Graphic3d;
133 IsPolygonsEdgesOff : Boolean;
134 IsSelected : Boolean;
135 theFillAsp : AspectFillArea3d from Graphic3d;
136 theLineAsp : AspectLine3d from Graphic3d
137 ) is protected;
138 ---Purpose: Draw array of polygons and polylines in the certain order according to transparency
139
140 CalculateCenter ( myclass; theCoords : Array1OfReal from TColStd;
141 NbNodes : Integer;
142 xG, yG, zG : out Real ) is protected;
143 ---Purpose: Default calculation of center of face or link. This method if useful for shrink mode presentation
144 -- theCoords is array of nodes co-ordinates in the strict order X1, Y1, Z1, X2...
145 -- NbNodes is number of nodes an element consist of
146 -- xG, yG, zG are co-ordinates of center whose will be returned
147
148end MeshPrsBuilder;