Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:31

0001 // Created on: 1992-01-17
0002 // Created by: GG
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _V3d_Viewer_HeaderFile
0018 #define _V3d_Viewer_HeaderFile
0019 
0020 #include <Aspect_GridDrawMode.hxx>
0021 #include <Aspect_GridType.hxx>
0022 #include <Graphic3d_StructureManager.hxx>
0023 #include <Graphic3d_Vertex.hxx>
0024 #include <Graphic3d_ZLayerSettings.hxx>
0025 #include <TColStd_MapOfInteger.hxx>
0026 #include <TColStd_SequenceOfInteger.hxx>
0027 #include <TCollection_ExtendedString.hxx>
0028 #include <V3d_ListOfLight.hxx>
0029 #include <V3d_ListOfView.hxx>
0030 #include <V3d_TypeOfOrientation.hxx>
0031 #include <V3d_TypeOfView.hxx>
0032 #include <V3d_TypeOfVisualization.hxx>
0033 #include <Quantity_Color.hxx>
0034 
0035 class Aspect_Grid;
0036 class Graphic3d_AspectMarker3d;
0037 class Graphic3d_GraphicDriver;
0038 class Graphic3d_Group;
0039 class Graphic3d_Structure;
0040 class V3d_CircularGrid;
0041 class V3d_RectangularGrid;
0042 class V3d_View;
0043 
0044 //! Defines services on Viewer type objects.
0045 //! The methods of this class allow editing and
0046 //! interrogation of the parameters linked to the viewer
0047 //! its friend classes (View,light,plane).
0048 class V3d_Viewer : public Standard_Transient
0049 {
0050   friend class V3d_View;
0051   DEFINE_STANDARD_RTTIEXT(V3d_Viewer, Standard_Transient)
0052 public:
0053 
0054   //! Create a Viewer with the given graphic driver and with default parameters:
0055   //! - View orientation: V3d_XposYnegZpos
0056   //! - View background: Quantity_NOC_GRAY30
0057   //! - Shading model: V3d_GOURAUD
0058   Standard_EXPORT V3d_Viewer (const Handle(Graphic3d_GraphicDriver)& theDriver);
0059 
0060   //! Returns True if One View more can be defined in this Viewer.
0061   Standard_EXPORT Standard_Boolean IfMoreViews() const;
0062 
0063   //! Creates a view in the viewer according to its default parameters.
0064   Standard_EXPORT Handle(V3d_View) CreateView();
0065   
0066   //! Activates all of the views of a viewer attached to a window.
0067   Standard_EXPORT void SetViewOn();
0068   
0069   //! Activates a particular view in the Viewer.
0070   //! Must be call if the Window attached to the view has been Deiconified.
0071   Standard_EXPORT void SetViewOn (const Handle(V3d_View)& theView);
0072 
0073   //! Deactivates all the views of a Viewer
0074   //! attached to a window.
0075   Standard_EXPORT void SetViewOff();
0076   
0077   //! Deactivates a particular view in the Viewer.
0078   //! Must be call if the Window attached to the view
0079   //! has been Iconified .
0080   Standard_EXPORT void SetViewOff (const Handle(V3d_View)& theView);
0081   
0082   //! Deprecated, Redraw() should be used instead.
0083   void Update() { Redraw(); }
0084 
0085   //! Redraws all the views of the Viewer even if no
0086   //! modification has taken place. Must be called if
0087   //! all the views of the Viewer are exposed, as for
0088   //! example in a global DeIconification.
0089   Standard_EXPORT void Redraw() const;
0090   
0091   //! Updates layer of immediate presentations.
0092   Standard_EXPORT void RedrawImmediate() const;
0093   
0094   //! Invalidates viewer content but does not redraw it.
0095   Standard_EXPORT void Invalidate() const;
0096   
0097   //! Suppresses the Viewer.
0098   Standard_EXPORT void Remove();
0099 
0100   //! Return Graphic Driver instance.
0101   const Handle(Graphic3d_GraphicDriver)& Driver() const { return myDriver; }
0102 
0103   //! Returns the structure manager associated to this viewer.
0104   Handle(Graphic3d_StructureManager) StructureManager() const { return myStructureManager; }
0105 
0106   //! Return default Rendering Parameters.
0107   //! By default these parameters are set in a new V3d_View.
0108   const Graphic3d_RenderingParams& DefaultRenderingParams() const { return myDefaultRenderingParams; }
0109 
0110   //! Set default Rendering Parameters.
0111   void SetDefaultRenderingParams (const Graphic3d_RenderingParams& theParams) { myDefaultRenderingParams = theParams; }
0112 
0113   //! Defines the default background colour of views
0114   //! attached to the viewer by supplying the color object
0115   void SetDefaultBackgroundColor (const Quantity_Color& theColor) { myBackground.SetColor (theColor); }
0116 
0117   //! Returns the gradient background of the view.
0118   const Aspect_GradientBackground& GetGradientBackground() const { return myGradientBackground; }
0119   
0120   //! Defines the default gradient background colours of views
0121   //! attached to the viewer by supplying the colour objects
0122   void SetDefaultBgGradientColors (const Quantity_Color& theColor1,
0123                                    const Quantity_Color& theColor2,
0124                                    const Aspect_GradientFillMethod theFillStyle = Aspect_GradientFillMethod_Horizontal)
0125   {
0126     myGradientBackground.SetColors (theColor1, theColor2, theFillStyle);
0127   }
0128 
0129   //! Returns the default size of the view.
0130   Standard_Real DefaultViewSize() const { return myViewSize; }
0131 
0132   //! Gives a default size for the creation of views of the viewer.
0133   Standard_EXPORT void SetDefaultViewSize (const Standard_Real theSize);
0134 
0135   //! Returns the default Projection.
0136   V3d_TypeOfOrientation DefaultViewProj() const { return myViewProj; }
0137 
0138   //! Sets the default projection for creating views in the viewer.
0139   void SetDefaultViewProj (const V3d_TypeOfOrientation theOrientation) { myViewProj = theOrientation; }
0140 
0141   //! Returns the default type of Visualization.
0142   V3d_TypeOfVisualization DefaultVisualization() const { return myVisualization; }
0143 
0144   //! Gives the default visualization mode.
0145   void SetDefaultVisualization (const V3d_TypeOfVisualization theType) { myVisualization = theType; }
0146 
0147   //! Returns the default type of Shading; Graphic3d_TypeOfShadingModel_Phong by default.
0148   Graphic3d_TypeOfShadingModel DefaultShadingModel() const { return myDefaultRenderingParams.ShadingModel; }
0149 
0150   //! Gives the default type of SHADING.
0151   void SetDefaultShadingModel (const Graphic3d_TypeOfShadingModel theType) { myDefaultRenderingParams.ShadingModel = theType; }
0152 
0153   //! Returns the default type of View (orthographic or perspective projection) to be returned by CreateView() method.
0154   V3d_TypeOfView DefaultTypeOfView() const { return myDefaultTypeOfView; }
0155 
0156   //! Set the default type of View (orthographic or perspective projection) to be returned by CreateView() method.
0157   void SetDefaultTypeOfView (const V3d_TypeOfView theType) { myDefaultTypeOfView = theType; }
0158 
0159   //! Returns the default background colour object.
0160   Quantity_Color DefaultBackgroundColor() const { return myBackground.Color(); }
0161 
0162   //! Returns the gradient background colour objects of the view.
0163   void DefaultBgGradientColors (Quantity_Color& theColor1, Quantity_Color& theColor2) const { myGradientBackground.Colors (theColor1, theColor2); }
0164 
0165   //! Return all Z layer ids in sequence ordered by overlay level from lowest layer to highest ( foreground ).
0166   //! The first layer ID in sequence is the default layer that can't be removed.
0167   Standard_EXPORT void GetAllZLayers (TColStd_SequenceOfInteger& theLayerSeq) const;
0168 
0169   //! Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value.
0170   //! The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view.
0171   //! Custom layers will be inserted before Graphic3d_ZLayerId_Top (e.g. between Graphic3d_ZLayerId_Default and before Graphic3d_ZLayerId_Top).
0172   //! @param theLayerId [out] id of created layer
0173   //! @param theSettings [in] new layer settings
0174   //! @return FALSE if the layer can not be created
0175   Standard_Boolean AddZLayer (Graphic3d_ZLayerId& theLayerId,
0176                               const Graphic3d_ZLayerSettings& theSettings = Graphic3d_ZLayerSettings())
0177   {
0178     return InsertLayerBefore (theLayerId, theSettings, Graphic3d_ZLayerId_Top);
0179   }
0180 
0181   //! Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value.
0182   //! The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view.
0183   //! Layer rendering order is defined by its position in list (altered by theLayerAfter)
0184   //! and IsImmediate() flag (all layers with IsImmediate() flag are drawn afterwards);
0185   //! @param theNewLayerId [out] id of created layer; layer id is arbitrary and does not depend on layer position in the list
0186   //! @param theSettings    [in] new layer settings
0187   //! @param theLayerAfter  [in] id of layer to append new layer before
0188   //! @return FALSE if the layer can not be created
0189   Standard_EXPORT Standard_Boolean InsertLayerBefore (Graphic3d_ZLayerId& theNewLayerId,
0190                                                       const Graphic3d_ZLayerSettings& theSettings,
0191                                                       const Graphic3d_ZLayerId theLayerAfter);
0192 
0193   //! Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value.
0194   //! The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view.
0195   //! Layer rendering order is defined by its position in list (altered by theLayerAfter)
0196   //! and IsImmediate() flag (all layers with IsImmediate() flag are drawn afterwards);
0197   //! @param theNewLayerId [out] id of created layer; layer id is arbitrary and does not depend on layer position in the list
0198   //! @param theSettings    [in] new layer settings
0199   //! @param theLayerBefore [in] id of layer to append new layer after
0200   //! @return FALSE if the layer can not be created
0201   Standard_EXPORT Standard_Boolean InsertLayerAfter (Graphic3d_ZLayerId& theNewLayerId,
0202                                                      const Graphic3d_ZLayerSettings& theSettings,
0203                                                      const Graphic3d_ZLayerId theLayerBefore);
0204 
0205   //! Remove Z layer with ID <theLayerId>.
0206   //! Method returns Standard_False if the layer can not be removed or doesn't exists.
0207   //! By default, there are always default bottom-level layer that can't be removed.
0208   Standard_EXPORT Standard_Boolean RemoveZLayer (const Graphic3d_ZLayerId theLayerId);
0209 
0210   //! Returns the settings of a single Z layer.
0211   Standard_EXPORT const Graphic3d_ZLayerSettings& ZLayerSettings (const Graphic3d_ZLayerId theLayerId) const;
0212 
0213   //! Sets the settings for a single Z layer.
0214   Standard_EXPORT void SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings& theSettings);
0215 
0216 public:
0217 
0218   //! Return a list of active views.
0219   const V3d_ListOfView& ActiveViews() const { return myActiveViews; }
0220 
0221   //! Return an iterator for active views.
0222   V3d_ListOfViewIterator ActiveViewIterator() const { return V3d_ListOfViewIterator (myActiveViews); }
0223 
0224   //! returns true if there is only one active view.
0225   Standard_Boolean LastActiveView() const { return myActiveViews.Extent() == 1; }
0226 
0227 public:
0228 
0229   //! Return a list of defined views.
0230   const V3d_ListOfView& DefinedViews() const { return myDefinedViews; }
0231 
0232   //! Return an iterator for defined views.
0233   V3d_ListOfViewIterator DefinedViewIterator() const { return V3d_ListOfViewIterator (myDefinedViews); }
0234 
0235 public: //! @name lights management
0236 
0237   //! Defines default lights:
0238   //!  positional-light 0.3 0. 0.
0239   //!  directional-light V3d_XnegYposZpos
0240   //!  directional-light V3d_XnegYneg
0241   //!  ambient-light
0242   Standard_EXPORT void SetDefaultLights();
0243 
0244   //! Activates MyLight in the viewer.
0245   Standard_EXPORT void SetLightOn (const Handle(V3d_Light)& theLight);
0246   
0247   //! Activates all the lights defined in this viewer.
0248   Standard_EXPORT void SetLightOn();
0249   
0250   //! Deactivates MyLight in this viewer.
0251   Standard_EXPORT void SetLightOff (const Handle(V3d_Light)& theLight);
0252   
0253   //! Deactivate all the Lights defined in this viewer.
0254   Standard_EXPORT void SetLightOff();
0255 
0256   //! Adds Light in Sequence Of Lights.
0257   Standard_EXPORT void AddLight (const Handle(V3d_Light)& theLight);
0258 
0259   //! Delete Light in Sequence Of Lights.
0260   Standard_EXPORT void DelLight (const Handle(V3d_Light)& theLight);
0261   
0262   //! Updates the lights of all the views of a viewer.
0263   Standard_EXPORT void UpdateLights();
0264 
0265   Standard_EXPORT Standard_Boolean IsGlobalLight (const Handle(V3d_Light)& TheLight) const;
0266 
0267   //! Return a list of active lights.
0268   const V3d_ListOfLight& ActiveLights() const { return myActiveLights; }
0269 
0270   //! Return an iterator for defined lights.
0271   V3d_ListOfLightIterator ActiveLightIterator() const { return V3d_ListOfLightIterator (myActiveLights); }
0272 
0273 public:
0274 
0275   //! Return a list of defined lights.
0276   const V3d_ListOfLight& DefinedLights() const { return myDefinedLights; }
0277 
0278   //! Return an iterator for defined lights.
0279   V3d_ListOfLightIterator DefinedLightIterator() const { return V3d_ListOfLightIterator (myDefinedLights); }
0280 
0281 public: //! @name objects management
0282 
0283   //! Erase all Objects in All the views.
0284   Standard_EXPORT void Erase() const;
0285 
0286   //! UnHighlight all Objects in All the views.
0287   Standard_EXPORT void UnHighlight() const;
0288 
0289 public:
0290 
0291   //! returns true if the computed mode can be used.
0292   Standard_Boolean ComputedMode() const { return myComputedMode; }
0293 
0294   //! Set if the computed mode can be used.
0295   void SetComputedMode (const Standard_Boolean theMode) { myComputedMode = theMode; }
0296 
0297   //! returns true if by default the computed mode must be used.
0298   Standard_Boolean DefaultComputedMode() const { return myDefaultComputedMode; }
0299 
0300   //! Set if by default the computed mode must be used.
0301   void SetDefaultComputedMode (const Standard_Boolean theMode) { myDefaultComputedMode = theMode; }
0302 
0303 public: //! @name privileged plane management
0304 
0305   const gp_Ax3& PrivilegedPlane() const { return myPrivilegedPlane; }
0306 
0307   Standard_EXPORT void SetPrivilegedPlane (const gp_Ax3& thePlane);
0308 
0309   Standard_EXPORT void DisplayPrivilegedPlane (const Standard_Boolean theOnOff, const Standard_Real theSize = 1);
0310 
0311 public: //! @name grid management
0312 
0313   //! Activates the grid in all views of <me>.
0314   Standard_EXPORT void ActivateGrid (const Aspect_GridType aGridType, const Aspect_GridDrawMode aGridDrawMode);
0315   
0316   //! Deactivates the grid in all views of <me>.
0317   Standard_EXPORT void DeactivateGrid();
0318   
0319   //! Show/Don't show grid echo to the hit point.
0320   //! If TRUE,the grid echo will be shown at ConvertToGrid() time.
0321   Standard_EXPORT void SetGridEcho (const Standard_Boolean showGrid = Standard_True);
0322   
0323   //! Show grid echo <aMarker> to the hit point.
0324   //! Warning: When the grid echo marker is not set,
0325   //! a default marker is build with the attributes:
0326   //! marker type : Aspect_TOM_STAR
0327   //! marker color : Quantity_NOC_GRAY90
0328   //! marker size : 3.0
0329   Standard_EXPORT void SetGridEcho (const Handle(Graphic3d_AspectMarker3d)& aMarker);
0330   
0331   //! Returns TRUE when grid echo must be displayed at hit point.
0332   Standard_Boolean GridEcho() const { return myGridEcho; }
0333 
0334   //! Returns Standard_True if a grid is activated in <me>.
0335   Standard_EXPORT Standard_Boolean IsGridActive();
0336 
0337   //! Returns the defined grid in <me>.
0338   Handle(Aspect_Grid) Grid (bool theToCreate = true) { return Grid (myGridType, theToCreate); }
0339 
0340   //! Returns the defined grid in <me>.
0341   Standard_EXPORT Handle(Aspect_Grid) Grid (Aspect_GridType theGridType, bool theToCreate = true);
0342 
0343   //! Returns the current grid type defined in <me>.
0344   Aspect_GridType GridType() const { return myGridType; }
0345 
0346   //! Returns the current grid draw mode defined in <me>.
0347   Standard_EXPORT Aspect_GridDrawMode GridDrawMode();
0348 
0349   //! Returns the definition of the rectangular grid.
0350   Standard_EXPORT void RectangularGridValues (Standard_Real& theXOrigin, Standard_Real& theYOrigin,
0351                                               Standard_Real& theXStep, Standard_Real& theYStep,
0352                                               Standard_Real& theRotationAngle);
0353 
0354   //! Sets the definition of the rectangular grid.
0355   //! <XOrigin>, <YOrigin> defines the origin of the grid.
0356   //! <XStep> defines the interval between 2 vertical lines.
0357   //! <YStep> defines the interval between 2 horizontal lines.
0358   //! <RotationAngle> defines the rotation angle of the grid.
0359   Standard_EXPORT void SetRectangularGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real XStep, const Standard_Real YStep, const Standard_Real RotationAngle);
0360 
0361   //! Returns the definition of the circular grid.
0362   Standard_EXPORT void CircularGridValues (Standard_Real& theXOrigin, Standard_Real& theYOrigin,
0363                                            Standard_Real& theRadiusStep,
0364                                            Standard_Integer& theDivisionNumber,
0365                                            Standard_Real& theRotationAngle);
0366 
0367   //! Sets the definition of the circular grid.
0368   //! <XOrigin>, <YOrigin> defines the origin of the grid.
0369   //! <RadiusStep> defines the interval between 2 circles.
0370   //! <DivisionNumber> defines the section number of one half circle.
0371   //! <RotationAngle> defines the rotation angle of the grid.
0372   Standard_EXPORT void SetCircularGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real RadiusStep, const Standard_Integer DivisionNumber, const Standard_Real RotationAngle);
0373 
0374   //! Returns the location and the size of the grid.
0375   Standard_EXPORT void CircularGridGraphicValues (Standard_Real& theRadius,
0376                                                   Standard_Real& theOffSet);
0377 
0378   //! Sets the location and the size of the grid.
0379   //! <XSize> defines the width of the grid.
0380   //! <YSize> defines the height of the grid.
0381   //! <OffSet> defines the displacement along the plane normal.
0382   Standard_EXPORT void SetCircularGridGraphicValues (const Standard_Real Radius, const Standard_Real OffSet);
0383 
0384   //! Returns the location and the size of the grid.
0385   Standard_EXPORT void RectangularGridGraphicValues (Standard_Real& theXSize, Standard_Real& theYSize,
0386                                                      Standard_Real& theOffSet);
0387 
0388   //! Sets the location and the size of the grid.
0389   //! <XSize> defines the width of the grid.
0390   //! <YSize> defines the height of the grid.
0391   //! <OffSet> defines the displacement along the plane normal.
0392   Standard_EXPORT void SetRectangularGridGraphicValues (const Standard_Real XSize, const Standard_Real YSize, const Standard_Real OffSet);
0393   
0394   //! Display grid echo at requested point in the view.
0395   Standard_EXPORT void ShowGridEcho (const Handle(V3d_View)& theView, const Graphic3d_Vertex& thePoint);
0396 
0397   //! Temporarly hide grid echo.
0398   Standard_EXPORT void HideGridEcho (const Handle(V3d_View)& theView);
0399 
0400 public: //! @name deprecated methods
0401 
0402   //! Returns Standard_True if a grid is activated in <me>.
0403   Standard_DEPRECATED ("Deprecated method - IsGridActive() should be used instead")
0404   Standard_Boolean IsActive() { return IsGridActive(); }
0405 
0406   //! Initializes an internal iterator on the active views.
0407   Standard_DEPRECATED ("Deprecated method - ActiveViews() should be used instead")
0408   void InitActiveViews() { myActiveViewsIterator.Initialize (myActiveViews); }
0409 
0410   //! Returns true if there are more active view(s) to return.
0411   Standard_DEPRECATED ("Deprecated method - ActiveViews() should be used instead")
0412   Standard_Boolean MoreActiveViews() const { return myActiveViewsIterator.More(); }
0413 
0414   //! Go to the next active view (if there is not, ActiveView will raise an exception)
0415   Standard_DEPRECATED ("Deprecated method - ActiveViews() should be used instead")
0416   void NextActiveViews() { if (!myActiveViews.IsEmpty()) myActiveViewsIterator.Next(); }
0417 
0418   Standard_DEPRECATED ("Deprecated method - ActiveViews() should be used instead")
0419   const Handle(V3d_View)& ActiveView() const { return myActiveViewsIterator.Value(); }
0420 
0421   //! Initializes an internal iterator on the Defined views.
0422   Standard_DEPRECATED ("Deprecated method - DefinedViews() should be used instead")
0423   void InitDefinedViews() { myDefinedViewsIterator.Initialize (myDefinedViews); }
0424 
0425   //! returns true if there are more Defined view(s) to return.
0426   Standard_DEPRECATED ("Deprecated method - DefinedViews() should be used instead")
0427   Standard_Boolean MoreDefinedViews() const { return myDefinedViewsIterator.More(); }
0428 
0429   //! Go to the next Defined view (if there is not, DefinedView will raise an exception)
0430   Standard_DEPRECATED ("Deprecated method - DefinedViews() should be used instead")
0431   void NextDefinedViews() { if (!myDefinedViews.IsEmpty()) myDefinedViewsIterator.Next(); }
0432 
0433   Standard_DEPRECATED ("Deprecated method - DefinedViews() should be used instead")
0434   const Handle(V3d_View)& DefinedView() const { return myDefinedViewsIterator.Value(); }
0435 
0436   //! Initializes an internal iteratator on the active Lights.
0437   Standard_DEPRECATED ("Deprecated method - ActiveLights() should be used instead")
0438   void InitActiveLights() { myActiveLightsIterator.Initialize (myActiveLights); }
0439 
0440   //! returns true if there are more active Light(s) to return.
0441   Standard_DEPRECATED ("Deprecated method - ActiveLights() should be used instead")
0442   Standard_Boolean MoreActiveLights() const { return myActiveLightsIterator.More(); }
0443 
0444   //! Go to the next active Light (if there is not, ActiveLight() will raise an exception)
0445   Standard_DEPRECATED ("Deprecated method - ActiveLights() should be used instead")
0446   void NextActiveLights() { myActiveLightsIterator.Next(); }
0447 
0448   Standard_DEPRECATED ("Deprecated method - ActiveLights() should be used instead")
0449   const Handle(V3d_Light)& ActiveLight() const { return myActiveLightsIterator.Value(); }
0450 
0451   //! Initializes an internal iterattor on the Defined Lights.
0452   Standard_DEPRECATED ("Deprecated method - DefinedLights() should be used instead")
0453   void InitDefinedLights() { myDefinedLightsIterator.Initialize (myDefinedLights); }
0454 
0455   //! Returns true if there are more Defined Light(s) to return.
0456   Standard_DEPRECATED ("Deprecated method - DefinedLights() should be used instead")
0457   Standard_Boolean MoreDefinedLights() const { return myDefinedLightsIterator.More(); }
0458 
0459   //! Go to the next Defined Light (if there is not, DefinedLight() will raise an exception)
0460   Standard_DEPRECATED ("Deprecated method - DefinedLights() should be used instead")
0461   void NextDefinedLights() { if (!myDefinedLights.IsEmpty()) myDefinedLightsIterator.Next(); }
0462 
0463   Standard_DEPRECATED ("Deprecated method - DefinedLights() should be used instead")
0464   const Handle(V3d_Light)& DefinedLight() const { return myDefinedLightsIterator.Value(); }
0465 
0466   //! Dumps the content of me into the stream
0467   Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0468 
0469 private:
0470 
0471   //! Returns the default background colour.
0472   const Aspect_Background& GetBackgroundColor() const { return myBackground; }
0473 
0474   //! Adds View in Sequence Of Views.
0475   Standard_EXPORT void AddView (const Handle(V3d_View)& theView);
0476   
0477   //! Delete View in Sequence Of Views.
0478   Standard_EXPORT void DelView (const V3d_View* theView);
0479   
0480 private:
0481 
0482   Handle(Graphic3d_GraphicDriver) myDriver;
0483   Handle(Graphic3d_StructureManager) myStructureManager;
0484   TColStd_MapOfInteger myLayerIds;
0485   Aspect_GenId myZLayerGenId;
0486 
0487   V3d_ListOfView  myDefinedViews;
0488   V3d_ListOfView  myActiveViews;
0489   V3d_ListOfLight myDefinedLights;
0490   V3d_ListOfLight myActiveLights;
0491 
0492   Aspect_Background myBackground;
0493   Aspect_GradientBackground myGradientBackground;
0494   Standard_Real myViewSize;
0495   V3d_TypeOfOrientation myViewProj;
0496   V3d_TypeOfVisualization myVisualization;
0497   V3d_TypeOfView myDefaultTypeOfView;
0498   Graphic3d_RenderingParams myDefaultRenderingParams;
0499 
0500   V3d_ListOfView::Iterator  myActiveViewsIterator;
0501   V3d_ListOfView::Iterator  myDefinedViewsIterator;
0502   V3d_ListOfLight::Iterator myActiveLightsIterator;
0503   V3d_ListOfLight::Iterator myDefinedLightsIterator;
0504 
0505   Standard_Boolean myComputedMode;
0506   Standard_Boolean myDefaultComputedMode;
0507 
0508   gp_Ax3 myPrivilegedPlane;
0509   Handle(Graphic3d_Structure) myPlaneStructure;
0510   Standard_Boolean myDisplayPlane;
0511   Standard_Real myDisplayPlaneLength;
0512 
0513   Handle(V3d_RectangularGrid) myRGrid;
0514   Handle(V3d_CircularGrid) myCGrid;
0515   Aspect_GridType myGridType;
0516   Standard_Boolean myGridEcho;
0517   Handle(Graphic3d_Structure) myGridEchoStructure;
0518   Handle(Graphic3d_Group) myGridEchoGroup;
0519   Handle(Graphic3d_AspectMarker3d) myGridEchoAspect;
0520   Graphic3d_Vertex myGridEchoLastVert;
0521 
0522 };
0523 
0524 DEFINE_STANDARD_HANDLE(V3d_Viewer, Standard_Transient)
0525 
0526 #endif // _V3d_Viewer_HeaderFile