fc519efb0d5c836e0ba3a2bf25ed982c99c8add9
[occt.git] / src / Graphic3d / Graphic3d_Aspects.hxx
1 // Copyright (c) 2019 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #ifndef _Graphic3d_Aspects_HeaderFile
15 #define _Graphic3d_Aspects_HeaderFile
16
17 #include <Aspect_PolygonOffsetMode.hxx>
18 #include <Aspect_InteriorStyle.hxx>
19 #include <Aspect_TypeOfDisplayText.hxx>
20 #include <Aspect_TypeOfLine.hxx>
21 #include <Aspect_TypeOfMarker.hxx>
22 #include <Aspect_TypeOfStyleText.hxx>
23 #include <Font_FontAspect.hxx>
24 #include <Font_NameOfFont.hxx>
25 #include <Graphic3d_AlphaMode.hxx>
26 #include <Graphic3d_MarkerImage.hxx>
27 #include <Graphic3d_HatchStyle.hxx>
28 #include <Graphic3d_MaterialAspect.hxx>
29 #include <Graphic3d_PolygonOffset.hxx>
30 #include <Graphic3d_ShaderProgram.hxx>
31 #include <Graphic3d_TextureMap.hxx>
32 #include <Graphic3d_TextureSet.hxx>
33 #include <Graphic3d_TypeOfShadingModel.hxx>
34 #include <TCollection_HAsciiString.hxx>
35
36 //! This class defines graphic attributes.
37 class Graphic3d_Aspects : public Standard_Transient
38 {
39   DEFINE_STANDARD_RTTIEXT(Graphic3d_Aspects, Standard_Transient)
40 public:
41
42   //! Creates a context table for drawing primitives defined with the following default values:
43   Standard_EXPORT Graphic3d_Aspects();
44
45   //! Return interior rendering style; Aspect_IS_SOLID by default.
46   Aspect_InteriorStyle InteriorStyle() const { return myInteriorStyle; }
47
48   //! Modifies the interior type used for rendering
49   void SetInteriorStyle (const Aspect_InteriorStyle theStyle) { myInteriorStyle = theStyle; }
50
51   //! Returns shading model; Graphic3d_TOSM_DEFAULT by default.
52   //! Graphic3d_TOSM_DEFAULT means that Shading Model set as default for entire Viewer will be used.
53   Graphic3d_TypeOfShadingModel ShadingModel() const { return myShadingModel; }
54
55   //! Sets shading model
56   void SetShadingModel (const Graphic3d_TypeOfShadingModel theShadingModel) { myShadingModel = theShadingModel; }
57
58   //! Returns the way how alpha value should be treated (Graphic3d_AlphaMode_BlendAuto by default, for backward compatibility).
59   Graphic3d_AlphaMode AlphaMode() const { return myAlphaMode; }
60
61   //! Returns alpha cutoff threshold, for discarding fragments within Graphic3d_AlphaMode_Mask mode (0.5 by default).
62   //! If the alpha value is greater than or equal to this value then it is rendered as fully opaque, otherwise, it is rendered as fully transparent.
63   Standard_ShortReal AlphaCutoff() const { return myAlphaCutoff; }
64
65   //! Defines the way how alpha value should be treated.
66   void SetAlphaMode (Graphic3d_AlphaMode theMode, Standard_ShortReal theAlphaCutoff = 0.5f)
67   {
68     myAlphaMode = theMode;
69     myAlphaCutoff = theAlphaCutoff;
70   }
71
72   //! Return color
73   const Quantity_ColorRGBA& ColorRGBA() const { return myInteriorColor; }
74
75   //! Return the color.
76   const Quantity_Color& Color() const { return myInteriorColor.GetRGB(); }
77
78   //! Modifies the color.
79   void SetColor (const Quantity_Color& theColor) { myInteriorColor.SetRGB(theColor); }
80
81   //! Return interior color.
82   const Quantity_Color& InteriorColor() const { return myInteriorColor.GetRGB(); }
83
84   //! Return interior color.
85   const Quantity_ColorRGBA& InteriorColorRGBA() const { return myInteriorColor; }
86
87   //! Modifies the color of the interior of the face
88   void SetInteriorColor (const Quantity_Color& theColor) { myInteriorColor.SetRGB (theColor); }
89
90   //! Modifies the color of the interior of the face
91   void SetInteriorColor (const Quantity_ColorRGBA& theColor) { myInteriorColor = theColor; }
92
93   //! Return back interior color.
94   const Quantity_Color& BackInteriorColor() const { return myBackInteriorColor.GetRGB(); }
95
96   //! Return back interior color.
97   const Quantity_ColorRGBA& BackInteriorColorRGBA() const { return myBackInteriorColor; }
98
99   //! Modifies the color of the interior of the back face
100   void SetBackInteriorColor (const Quantity_Color& theColor) { myBackInteriorColor.SetRGB (theColor); }
101
102   //! Modifies the color of the interior of the back face
103   void SetBackInteriorColor (const Quantity_ColorRGBA& theColor) { myBackInteriorColor = theColor; }
104
105   //! Returns the surface material of external faces
106   const Graphic3d_MaterialAspect& FrontMaterial() const { return myFrontMaterial; }
107
108   //! Returns the surface material of external faces
109   Graphic3d_MaterialAspect& ChangeFrontMaterial() { return myFrontMaterial; }
110
111   //! Modifies the surface material of external faces
112   void SetFrontMaterial (const Graphic3d_MaterialAspect& theMaterial) { myFrontMaterial = theMaterial; }
113
114   //! Returns the surface material of internal faces
115   const Graphic3d_MaterialAspect& BackMaterial() const { return myBackMaterial; }
116
117   //! Returns the surface material of internal faces
118   Graphic3d_MaterialAspect& ChangeBackMaterial() { return myBackMaterial; }
119
120   //! Modifies the surface material of internal faces
121   void SetBackMaterial (const Graphic3d_MaterialAspect& theMaterial) { myBackMaterial = theMaterial; }
122
123   //! Returns true if back faces should be suppressed (true by default).
124   bool ToSuppressBackFaces() const { return myToSuppressBackFaces; }
125
126   //! Assign back faces culling flag.
127   void SetSuppressBackFaces (bool theToSuppress) { myToSuppressBackFaces = theToSuppress; }
128
129   //! Returns true if back faces should be suppressed (true by default).
130   bool BackFace() const { return myToSuppressBackFaces; }
131
132   //! Allows the display of back-facing filled polygons.
133   void AllowBackFace() { myToSuppressBackFaces = false; }
134
135   //! Suppress the display of back-facing filled polygons.
136   //! A back-facing polygon is defined as a polygon whose
137   //! vertices are in a clockwise order with respect to screen coordinates.
138   void SuppressBackFace() { myToSuppressBackFaces = true; }
139
140   //! Returns true if material properties should be distinguished for back and front faces (false by default).
141   bool Distinguish() const { return myToDistinguishMaterials; }
142
143   //! Set material distinction between front and back faces.
144   void SetDistinguish (bool toDistinguish) { myToDistinguishMaterials = toDistinguish; }
145
146   //! Allows material distinction between front and back faces.
147   void SetDistinguishOn() { myToDistinguishMaterials = true; }
148
149   //! Forbids material distinction between front and back faces.
150   void SetDistinguishOff() { myToDistinguishMaterials = false; }
151
152   //! Return shader program.
153   const Handle(Graphic3d_ShaderProgram)& ShaderProgram() const { return myProgram; }
154
155   //! Sets up OpenGL/GLSL shader program.
156   void SetShaderProgram (const Handle(Graphic3d_ShaderProgram)& theProgram) { myProgram = theProgram; }
157
158   //! Return texture array to be mapped.
159   const Handle(Graphic3d_TextureSet)& TextureSet() const { return myTextureSet; }
160
161   //! Setup texture array to be mapped.
162   void SetTextureSet (const Handle(Graphic3d_TextureSet)& theTextures) { myTextureSet = theTextures; }
163
164   //! Return texture to be mapped.
165   //Standard_DEPRECATED("Deprecated method, TextureSet() should be used instead")
166   Handle(Graphic3d_TextureMap) TextureMap() const
167   {
168     return !myTextureSet.IsNull() && !myTextureSet->IsEmpty()
169           ? myTextureSet->First()
170           : Handle(Graphic3d_TextureMap)();
171   }
172
173   //! Assign texture to be mapped.
174   //! See also SetTextureMapOn() to actually activate texture mapping.
175   //Standard_DEPRECATED("Deprecated method, SetTextureSet() should be used instead")
176   Standard_EXPORT void SetTextureMap (const Handle(Graphic3d_TextureMap)& theTexture);
177
178   //! Return true if texture mapping is enabled (false by default).
179   bool ToMapTexture() const { return myToMapTexture; }
180
181   //! Return true if texture mapping is enabled (false by default).
182   bool TextureMapState() const { return myToMapTexture; }
183
184   //! Enable or disable texture mapping (has no effect if texture is not set).
185   void SetTextureMapOn (bool theToMap) { myToMapTexture = theToMap; }
186
187   //! Enable texture mapping (has no effect if texture is not set).
188   void SetTextureMapOn() { myToMapTexture = true; }
189
190   //! Disable texture mapping.
191   void SetTextureMapOff() { myToMapTexture = false; }
192
193   //! Returns current polygon offsets settings.
194   const Graphic3d_PolygonOffset& PolygonOffset() const { return myPolygonOffset; }
195
196   //! Sets polygon offsets settings.
197   void SetPolygonOffset (const Graphic3d_PolygonOffset& theOffset) { myPolygonOffset = theOffset; }
198
199   //! Returns current polygon offsets settings.
200   void PolygonOffsets (Standard_Integer&   theMode,
201                        Standard_ShortReal& theFactor,
202                        Standard_ShortReal& theUnits) const
203   {
204     theMode   = myPolygonOffset.Mode;
205     theFactor = myPolygonOffset.Factor;
206     theUnits  = myPolygonOffset.Units;
207   }
208
209   //! Sets up OpenGL polygon offsets mechanism.
210   //! <aMode> parameter can contain various combinations of
211   //! Aspect_PolygonOffsetMode enumeration elements (Aspect_POM_None means
212   //! that polygon offsets are not changed).
213   //! If <aMode> is different from Aspect_POM_Off and Aspect_POM_None, then <aFactor> and <aUnits>
214   //! arguments are used by graphic renderer to calculate a depth offset value:
215   //!
216   //! offset = <aFactor> * m + <aUnits> * r, where
217   //! m - maximum depth slope for the polygon currently being displayed,
218   //! r - minimum window coordinates depth resolution (implementation-specific)
219   //!
220   //! Default settings for OCC 3D viewer: mode = Aspect_POM_Fill, factor = 1., units = 0.
221   //!
222   //! Negative offset values move polygons closer to the viewport,
223   //! while positive values shift polygons away.
224   //! Consult OpenGL reference for details (glPolygonOffset function description).
225   void SetPolygonOffsets (const Standard_Integer   theMode,
226                           const Standard_ShortReal theFactor = 1.0f,
227                           const Standard_ShortReal theUnits  = 0.0f)
228   {
229     myPolygonOffset.Mode   = (Aspect_PolygonOffsetMode )(theMode & Aspect_POM_Mask);
230     myPolygonOffset.Factor = theFactor;
231     myPolygonOffset.Units  = theUnits;
232   }
233
234 //! @name parameters specific to Line primitive rendering
235 public:
236
237   //! Return line type; Aspect_TOL_SOLID by default.
238   Aspect_TypeOfLine LineType() const { return myLineType; }
239
240   //! Modifies the line type
241   void SetLineType (Aspect_TypeOfLine theType)
242   {
243     myLineType = theType;
244     myLinePattern = DefaultLinePatternForType (theType);
245   }
246
247   //! Return custom stipple line pattern; 0xFFFF by default.
248   uint16_t LinePattern() const { return myLinePattern; }
249
250   //! Modifies the stipple line pattern, and changes line type to Aspect_TOL_USERDEFINED for non-standard pattern.
251   void SetLinePattern (uint16_t thePattern)
252   {
253     myLineType = DefaultLineTypeForPattern (thePattern);
254     myLinePattern = thePattern;
255   }
256
257   //! Return width for edges in pixels; 1.0 by default.
258   Standard_ShortReal LineWidth() const { return myLineWidth; }
259
260   //! Modifies the line thickness
261   //! Warning: Raises Standard_OutOfRange if the width is a negative value.
262   void SetLineWidth (Standard_ShortReal theWidth)
263   {
264     if (theWidth <= 0.0f)
265     {
266       throw Standard_OutOfRange ("Bad value for EdgeLineWidth");
267     }
268     myLineWidth = theWidth;
269   }
270
271   //! Return stipple line pattern for line type.
272   static uint16_t DefaultLinePatternForType (Aspect_TypeOfLine theType)
273   {
274     switch (theType)
275     {
276       case Aspect_TOL_DASH:        return 0xFFC0;
277       case Aspect_TOL_DOT:         return 0xCCCC;
278       case Aspect_TOL_DOTDASH:     return 0xFF18;
279       case Aspect_TOL_EMPTY:       return 0x0000;
280       case Aspect_TOL_SOLID:       return 0xFFFF;
281       case Aspect_TOL_USERDEFINED: return 0xFF24;
282     }
283     return 0xFFFF;
284   }
285
286   //! Return line type for stipple line pattern.
287   static Aspect_TypeOfLine DefaultLineTypeForPattern (uint16_t thePattern)
288   {
289     switch (thePattern)
290     {
291       case 0x0000: return Aspect_TOL_EMPTY;
292       case 0xFFC0: return Aspect_TOL_DASH;
293       case 0xCCCC: return Aspect_TOL_DOT;
294       case 0xFF18: return Aspect_TOL_DOTDASH;
295       case 0xFFFF: return Aspect_TOL_SOLID;
296       case 0xFF24: return Aspect_TOL_USERDEFINED;
297     }
298     return Aspect_TOL_USERDEFINED;
299   }
300
301 //! @name parameters specific to Point (Marker) primitive rendering
302 public:
303
304   //! Return marker type; Aspect_TOM_POINT by default.
305   Aspect_TypeOfMarker MarkerType() const { return myMarkerType; }
306
307   //! Modifies the type of marker.
308   void SetMarkerType (Aspect_TypeOfMarker theType) { myMarkerType = theType; }
309
310   //! Return marker scale factor; 1.0 by default.
311   Standard_ShortReal MarkerScale() const { return myMarkerScale; }
312
313   //! Modifies the scale factor.
314   //! Marker type Aspect_TOM_POINT is not affected by the marker size scale factor.
315   //! It is always the smallest displayable dot.
316   //! Warning: Raises Standard_OutOfRange if the scale is a negative value.
317   void SetMarkerScale (const Standard_ShortReal theScale)
318   {
319     if (theScale <= 0.0f)
320     {
321       throw Standard_OutOfRange ("Bad value for MarkerScale");
322     }
323     myMarkerScale = theScale;
324   }
325
326   //! Returns marker's image texture.
327   //! Could be null handle if marker aspect has been initialized as default type of marker.
328   const Handle(Graphic3d_MarkerImage)& MarkerImage() const { return myMarkerImage; }
329
330   //! Set marker's image texture.
331   void SetMarkerImage (const Handle(Graphic3d_MarkerImage)& theImage) { myMarkerImage = theImage; }
332
333   //! Returns TRUE if marker should be drawn using marker sprite (either user-provided or generated).
334   bool IsMarkerSprite() const
335   {
336     if (myMarkerType == Aspect_TOM_POINT
337      || myMarkerType == Aspect_TOM_EMPTY)
338     {
339       return false;
340     }
341
342     return myMarkerType != Aspect_TOM_USERDEFINED
343        || !myMarkerImage.IsNull();
344   }
345
346 //! @name parameters specific to text rendering
347 public:
348
349   //! Returns the font; NULL string by default.
350   const Handle(TCollection_HAsciiString)& TextFont() const { return myTextFont; }
351
352   //! Modifies the font.
353   void SetTextFont (const Handle(TCollection_HAsciiString)& theFont) { myTextFont = theFont; }
354
355   //! Returns text FontAspect
356   Font_FontAspect TextFontAspect() const { return myTextFontAspect; }
357
358   //! Turns usage of Aspect text
359   void SetTextFontAspect (Font_FontAspect theFontAspect) { myTextFontAspect = theFontAspect; }
360
361   //! Returns display type; Aspect_TODT_NORMAL by default.
362   Aspect_TypeOfDisplayText TextDisplayType() const { return myTextDisplayType; }
363
364   //! Sets display type.
365   void SetTextDisplayType (Aspect_TypeOfDisplayText theType) { myTextDisplayType = theType; }
366
367   //! Returns text background/shadow color; equals to EdgeColor() property.
368   const Quantity_ColorRGBA& ColorSubTitleRGBA() const { return myEdgeColor; }
369
370   //! Return text background/shadow color; equals to EdgeColor() property.
371   const Quantity_Color& ColorSubTitle() const { return myEdgeColor.GetRGB(); }
372
373   //! Modifies text background/shadow color; equals to EdgeColor() property.
374   void SetColorSubTitle (const Quantity_Color& theColor) { myEdgeColor.SetRGB (theColor); }
375
376   //! Modifies text background/shadow color; equals to EdgeColor() property.
377   void SetColorSubTitle (const Quantity_ColorRGBA& theColor) { myEdgeColor = theColor; }
378
379   //! Returns TRUE when the Text Zoomable is on.
380   bool IsTextZoomable() const { return myIsTextZoomable; }
381
382   //! Turns usage of text zoomable on/off
383   void SetTextZoomable (bool theFlag) { myIsTextZoomable = theFlag; }
384
385   //! Returns the text style; Aspect_TOST_NORMAL by default.
386   Aspect_TypeOfStyleText TextStyle() const { return myTextStyle; }
387
388   //! Modifies the style of the text.
389   void SetTextStyle (Aspect_TypeOfStyleText theStyle) { myTextStyle = theStyle; }
390
391   //! Returns Angle of degree
392   Standard_ShortReal TextAngle() const { return myTextAngle; }
393
394   //! Turns usage of text rotated
395   void SetTextAngle (Standard_ShortReal theAngle) { myTextAngle = (Standard_ShortReal )theAngle; }
396
397 //! @name parameters specific to Mesh Edges (of triangulation primitive) rendering
398 public:
399
400   //! Returns true if mesh edges should be drawn (false by default).
401   bool ToDrawEdges() const { return myToDrawEdges && myLineType != Aspect_TOL_EMPTY; }
402
403   //! Set if mesh edges should be drawn or not.
404   void SetDrawEdges (bool theToDraw)
405   {
406     myToDrawEdges = theToDraw;
407     if (myLineType == Aspect_TOL_EMPTY)
408     {
409       myLineType = Aspect_TOL_SOLID;
410     }
411   }
412
413   //! The edges of FillAreas are drawn.
414   void SetEdgeOn() { SetDrawEdges (true); }
415
416   //! The edges of FillAreas are not drawn.
417   void SetEdgeOff() { SetDrawEdges (false); }
418
419   //! Return color of edges.
420   const Quantity_Color& EdgeColor() const { return myEdgeColor.GetRGB(); }
421
422   //! Return color of edges.
423   const Quantity_ColorRGBA& EdgeColorRGBA() const { return myEdgeColor; }
424
425   //! Modifies the color of the edge of the face
426   void SetEdgeColor (const Quantity_Color& theColor) { myEdgeColor.SetRGB (theColor); }
427
428   //! Modifies the color of the edge of the face
429   void SetEdgeColor (const Quantity_ColorRGBA& theColor) { myEdgeColor = theColor; }
430
431   //! Return edges line type (same as LineType()).
432   Aspect_TypeOfLine EdgeLineType() const { return myLineType; }
433
434   //! Modifies the edge line type (same as SetLineType())
435   void SetEdgeLineType (Aspect_TypeOfLine theType) { SetLineType (theType); }
436
437   //! Return width for edges in pixels (same as LineWidth()).
438   Standard_ShortReal EdgeWidth() const { return myLineWidth; }
439
440   //! Modifies the edge thickness (same as SetLineWidth())
441   void SetEdgeWidth (Standard_Real theWidth) { SetLineWidth ((Standard_ShortReal )theWidth); }
442
443   //! Returns TRUE if drawing element edges should discard first edge in triangle; FALSE by default.
444   //! Graphics hardware works mostly with triangles, so that wireframe presentation will draw triangle edges by default.
445   //! This flag allows rendering wireframe presentation of quad-only array split into triangles.
446   //! For this, quads should be split in specific order, so that the quad diagonal (to be NOT rendered) goes first:
447   //!     1------2
448   //!    /      /   Triangle #1: 2-0-1; Triangle #2: 0-2-3
449   //!   0------3
450   bool ToSkipFirstEdge() const { return myToSkipFirstEdge; }
451
452   //! Set skip first triangle edge flag for drawing wireframe presentation of quads array split into triangles.
453   void SetSkipFirstEdge (bool theToSkipFirstEdge) { myToSkipFirstEdge = theToSkipFirstEdge; }
454
455   //! Returns TRUE if silhouette (outline) should be drawn (with edge color and width); FALSE by default.
456   bool ToDrawSilhouette() const { return myToDrawSilhouette; }
457
458   //! Enables/disables drawing silhouette (outline).
459   void SetDrawSilhouette (bool theToDraw) { myToDrawSilhouette = theToDraw; }
460
461 public:
462
463   //! Returns the hatch type used when InteriorStyle is IS_HATCH
464   const Handle(Graphic3d_HatchStyle)& HatchStyle() const { return myHatchStyle; }
465
466   //! Modifies the hatch type used when InteriorStyle is IS_HATCH
467   void SetHatchStyle (const Handle(Graphic3d_HatchStyle)& theStyle) { myHatchStyle = theStyle; }
468
469   //! Modifies the hatch type used when InteriorStyle is IS_HATCH
470   //! @warning This method always creates a new handle for a given hatch style
471   void SetHatchStyle (const Aspect_HatchStyle theStyle)
472   {
473     if (theStyle == Aspect_HS_SOLID)
474     {
475       myHatchStyle.Nullify();
476       return;
477     }
478
479     myHatchStyle = new Graphic3d_HatchStyle (theStyle);
480   }
481
482 public:
483
484   //! Check for equality with another aspects.
485   bool IsEqual (const Graphic3d_Aspects& theOther)
486   {
487     if (this == &theOther)
488     {
489       return true;
490     }
491
492     return myProgram == theOther.myProgram
493         && myTextureSet == theOther.myTextureSet
494         && myMarkerImage == theOther.myMarkerImage
495         && myInteriorColor == theOther.myInteriorColor
496         && myBackInteriorColor == theOther.myBackInteriorColor
497         && myFrontMaterial == theOther.myFrontMaterial
498         && myBackMaterial  == theOther.myBackMaterial
499         && myInteriorStyle == theOther.myInteriorStyle
500         && myShadingModel == theOther.myShadingModel
501         && myAlphaMode == theOther.myAlphaMode
502         && myAlphaCutoff == theOther.myAlphaCutoff
503         && myLineType  == theOther.myLineType
504         && myEdgeColor == theOther.myEdgeColor
505         && myLineWidth == theOther.myLineWidth
506         && myLinePattern == theOther.myLinePattern
507         && myMarkerType == theOther.myMarkerType
508         && myMarkerScale == theOther.myMarkerScale
509         && myHatchStyle == theOther.myHatchStyle
510         && myTextFont == theOther.myTextFont
511         && myPolygonOffset == theOther.myPolygonOffset
512         && myTextStyle == theOther.myTextStyle
513         && myTextDisplayType == theOther.myTextDisplayType
514         && myTextFontAspect == theOther.myTextFontAspect
515         && myTextAngle == theOther.myTextAngle
516         && myToSkipFirstEdge == theOther.myToSkipFirstEdge
517         && myToDistinguishMaterials == theOther.myToDistinguishMaterials
518         && myToDrawEdges == theOther.myToDrawEdges
519         && myToDrawSilhouette == theOther.myToDrawSilhouette
520         && myToSuppressBackFaces == theOther.myToSuppressBackFaces
521         && myToMapTexture == theOther.myToMapTexture
522         && myIsTextZoomable == theOther.myIsTextZoomable;
523   }
524
525   //! Dumps the content of me into the stream
526   Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
527
528
529 protected:
530
531   Handle(Graphic3d_ShaderProgram)  myProgram;
532   Handle(Graphic3d_TextureSet)     myTextureSet;
533   Handle(Graphic3d_MarkerImage)    myMarkerImage;
534   Handle(Graphic3d_HatchStyle)     myHatchStyle;
535   Handle(TCollection_HAsciiString) myTextFont;
536   Graphic3d_MaterialAspect         myFrontMaterial;
537   Graphic3d_MaterialAspect         myBackMaterial;
538
539   Quantity_ColorRGBA           myInteriorColor;
540   Quantity_ColorRGBA           myBackInteriorColor;
541   Quantity_ColorRGBA           myEdgeColor;
542
543   Graphic3d_PolygonOffset      myPolygonOffset;
544   Aspect_InteriorStyle         myInteriorStyle;
545   Graphic3d_TypeOfShadingModel myShadingModel;
546   Graphic3d_AlphaMode          myAlphaMode;
547   Standard_ShortReal           myAlphaCutoff;
548
549   Aspect_TypeOfLine            myLineType;
550   Standard_ShortReal           myLineWidth;
551   uint16_t                     myLinePattern;
552
553   Aspect_TypeOfMarker          myMarkerType;
554   Standard_ShortReal           myMarkerScale;
555
556   Aspect_TypeOfStyleText   myTextStyle;
557   Aspect_TypeOfDisplayText myTextDisplayType;
558   Font_FontAspect          myTextFontAspect;
559   Standard_ShortReal       myTextAngle;
560
561   bool myToSkipFirstEdge;
562   bool myToDistinguishMaterials;
563   bool myToDrawEdges;
564   bool myToDrawSilhouette;
565   bool myToSuppressBackFaces;
566   bool myToMapTexture;
567   bool myIsTextZoomable;
568
569 };
570
571 DEFINE_STANDARD_HANDLE(Graphic3d_Aspects, Standard_Transient)
572
573 #endif // _Graphic3d_Aspects_HeaderFile