Open CASCADE Technology 7.8.2.dev
V3d_Viewer Class Reference

Defines services on Viewer type objects. The methods of this class allow editing and interrogation of the parameters linked to the viewer its friend classes (View,light,plane). More...

#include <V3d_Viewer.hxx>

Inheritance diagram for V3d_Viewer:

Public Member Functions

 V3d_Viewer (const Handle< Graphic3d_GraphicDriver > &theDriver)
 Create a Viewer with the given graphic driver and with default parameters:
 
Standard_Boolean IfMoreViews () const
 Returns True if One View more can be defined in this Viewer.
 
Handle< V3d_ViewCreateView ()
 Creates a view in the viewer according to its default parameters.
 
void SetViewOn ()
 Activates all of the views of a viewer attached to a window.
 
void SetViewOn (const Handle< V3d_View > &theView)
 Activates a particular view in the Viewer. Must be call if the Window attached to the view has been Deiconified.
 
void SetViewOff ()
 Deactivates all the views of a Viewer attached to a window.
 
void SetViewOff (const Handle< V3d_View > &theView)
 Deactivates a particular view in the Viewer. Must be call if the Window attached to the view has been Iconified .
 
void Update ()
 Deprecated, Redraw() should be used instead.
 
void Redraw () const
 Redraws all the views of the Viewer even if no modification has taken place. Must be called if all the views of the Viewer are exposed, as for example in a global DeIconification.
 
void RedrawImmediate () const
 Updates layer of immediate presentations.
 
void Invalidate () const
 Invalidates viewer content but does not redraw it.
 
void Remove ()
 Suppresses the Viewer.
 
const Handle< Graphic3d_GraphicDriver > & Driver () const
 Return Graphic Driver instance.
 
Handle< Graphic3d_StructureManagerStructureManager () const
 Returns the structure manager associated to this viewer.
 
const Graphic3d_RenderingParamsDefaultRenderingParams () const
 Return default Rendering Parameters. By default these parameters are set in a new V3d_View.
 
void SetDefaultRenderingParams (const Graphic3d_RenderingParams &theParams)
 Set default Rendering Parameters.
 
void SetDefaultBackgroundColor (const Quantity_Color &theColor)
 Defines the default background colour of views attached to the viewer by supplying the color object.
 
const Aspect_GradientBackgroundGetGradientBackground () const
 Returns the gradient background of the view.
 
void SetDefaultBgGradientColors (const Quantity_Color &theColor1, const Quantity_Color &theColor2, const Aspect_GradientFillMethod theFillStyle=Aspect_GradientFillMethod_Horizontal)
 Defines the default gradient background colours of views attached to the viewer by supplying the colour objects.
 
Standard_Real DefaultViewSize () const
 Returns the default size of the view.
 
void SetDefaultViewSize (const Standard_Real theSize)
 Gives a default size for the creation of views of the viewer.
 
V3d_TypeOfOrientation DefaultViewProj () const
 Returns the default Projection.
 
void SetDefaultViewProj (const V3d_TypeOfOrientation theOrientation)
 Sets the default projection for creating views in the viewer.
 
V3d_TypeOfVisualization DefaultVisualization () const
 Returns the default type of Visualization.
 
void SetDefaultVisualization (const V3d_TypeOfVisualization theType)
 Gives the default visualization mode.
 
Graphic3d_TypeOfShadingModel DefaultShadingModel () const
 Returns the default type of Shading; Graphic3d_TypeOfShadingModel_Phong by default.
 
void SetDefaultShadingModel (const Graphic3d_TypeOfShadingModel theType)
 Gives the default type of SHADING.
 
V3d_TypeOfView DefaultTypeOfView () const
 Returns the default type of View (orthographic or perspective projection) to be returned by CreateView() method.
 
void SetDefaultTypeOfView (const V3d_TypeOfView theType)
 Set the default type of View (orthographic or perspective projection) to be returned by CreateView() method.
 
Quantity_Color DefaultBackgroundColor () const
 Returns the default background colour object.
 
void DefaultBgGradientColors (Quantity_Color &theColor1, Quantity_Color &theColor2) const
 Returns the gradient background colour objects of the view.
 
void GetAllZLayers (TColStd_SequenceOfInteger &theLayerSeq) const
 Return all Z layer ids in sequence ordered by overlay level from lowest layer to highest ( foreground ). The first layer ID in sequence is the default layer that can't be removed.
 
Standard_Boolean AddZLayer (Graphic3d_ZLayerId &theLayerId, const Graphic3d_ZLayerSettings &theSettings=Graphic3d_ZLayerSettings())
 Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value. The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view. Custom layers will be inserted before Graphic3d_ZLayerId_Top (e.g. between Graphic3d_ZLayerId_Default and before Graphic3d_ZLayerId_Top).
 
Standard_Boolean InsertLayerBefore (Graphic3d_ZLayerId &theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerAfter)
 Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value. The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view. Layer rendering order is defined by its position in list (altered by theLayerAfter) and IsImmediate() flag (all layers with IsImmediate() flag are drawn afterwards);.
 
Standard_Boolean InsertLayerAfter (Graphic3d_ZLayerId &theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerBefore)
 Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value. The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view. Layer rendering order is defined by its position in list (altered by theLayerAfter) and IsImmediate() flag (all layers with IsImmediate() flag are drawn afterwards);.
 
Standard_Boolean RemoveZLayer (const Graphic3d_ZLayerId theLayerId)
 Remove Z layer with ID <theLayerId>. Method returns Standard_False if the layer can not be removed or doesn't exists. By default, there are always default bottom-level layer that can't be removed.
 
const Graphic3d_ZLayerSettingsZLayerSettings (const Graphic3d_ZLayerId theLayerId) const
 Returns the settings of a single Z layer.
 
void SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings)
 Sets the settings for a single Z layer.
 
const V3d_ListOfViewActiveViews () const
 Return a list of active views.
 
V3d_ListOfViewIterator ActiveViewIterator () const
 Return an iterator for active views.
 
Standard_Boolean LastActiveView () const
 returns true if there is only one active view.
 
const V3d_ListOfViewDefinedViews () const
 Return a list of defined views.
 
V3d_ListOfViewIterator DefinedViewIterator () const
 Return an iterator for defined views.
 
lights management
void SetDefaultLights ()
 Defines default lights: positional-light 0.3 0. 0. directional-light V3d_XnegYposZpos directional-light V3d_XnegYneg ambient-light.
 
void SetLightOn (const Handle< V3d_Light > &theLight)
 Activates MyLight in the viewer.
 
void SetLightOn ()
 Activates all the lights defined in this viewer.
 
void SetLightOff (const Handle< V3d_Light > &theLight)
 Deactivates MyLight in this viewer.
 
void SetLightOff ()
 Deactivate all the Lights defined in this viewer.
 
void AddLight (const Handle< V3d_Light > &theLight)
 Adds Light in Sequence Of Lights.
 
void DelLight (const Handle< V3d_Light > &theLight)
 Delete Light in Sequence Of Lights.
 
void UpdateLights ()
 Updates the lights of all the views of a viewer.
 
Standard_Boolean IsGlobalLight (const Handle< V3d_Light > &TheLight) const
 Defines default lights: positional-light 0.3 0. 0. directional-light V3d_XnegYposZpos directional-light V3d_XnegYneg ambient-light.
 
const V3d_ListOfLightActiveLights () const
 Return a list of active lights.
 
V3d_ListOfLightIterator ActiveLightIterator () const
 Return an iterator for defined lights.
 
const V3d_ListOfLightDefinedLights () const
 Return a list of defined lights.
 
V3d_ListOfLightIterator DefinedLightIterator () const
 Return an iterator for defined lights.
 
objects management
void Erase () const
 Erase all Objects in All the views.
 
void UnHighlight () const
 UnHighlight all Objects in All the views.
 
Standard_Boolean ComputedMode () const
 returns true if the computed mode can be used.
 
void SetComputedMode (const Standard_Boolean theMode)
 Set if the computed mode can be used.
 
Standard_Boolean DefaultComputedMode () const
 returns true if by default the computed mode must be used.
 
void SetDefaultComputedMode (const Standard_Boolean theMode)
 Set if by default the computed mode must be used.
 
privileged plane management
const gp_Ax3PrivilegedPlane () const
 
void SetPrivilegedPlane (const gp_Ax3 &thePlane)
 
void DisplayPrivilegedPlane (const Standard_Boolean theOnOff, const Standard_Real theSize=1)
 
grid management
void ActivateGrid (const Aspect_GridType aGridType, const Aspect_GridDrawMode aGridDrawMode)
 Activates the grid in all views of <me>.
 
void DeactivateGrid ()
 Deactivates the grid in all views of <me>.
 
void SetGridEcho (const Standard_Boolean showGrid=Standard_True)
 Show/Don't show grid echo to the hit point. If TRUE,the grid echo will be shown at ConvertToGrid() time.
 
void SetGridEcho (const Handle< Graphic3d_AspectMarker3d > &aMarker)
 Show grid echo <aMarker> to the hit point. Warning: When the grid echo marker is not set, a default marker is build with the attributes: marker type : Aspect_TOM_STAR marker color : Quantity_NOC_GRAY90 marker size : 3.0.
 
Standard_Boolean GridEcho () const
 Returns TRUE when grid echo must be displayed at hit point.
 
Standard_Boolean IsGridActive ()
 Returns Standard_True if a grid is activated in <me>.
 
Handle< Aspect_GridGrid (bool theToCreate=true)
 Returns the defined grid in <me>.
 
Handle< Aspect_GridGrid (Aspect_GridType theGridType, bool theToCreate=true)
 Returns the defined grid in <me>.
 
Aspect_GridType GridType () const
 Returns the current grid type defined in <me>.
 
Aspect_GridDrawMode GridDrawMode ()
 Returns the current grid draw mode defined in <me>.
 
void RectangularGridValues (Standard_Real &theXOrigin, Standard_Real &theYOrigin, Standard_Real &theXStep, Standard_Real &theYStep, Standard_Real &theRotationAngle)
 Returns the definition of the rectangular grid.
 
void SetRectangularGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real XStep, const Standard_Real YStep, const Standard_Real RotationAngle)
 Sets the definition of the rectangular grid. <XOrigin>, <YOrigin> defines the origin of the grid. <XStep> defines the interval between 2 vertical lines. <YStep> defines the interval between 2 horizontal lines. <RotationAngle> defines the rotation angle of the grid.
 
void CircularGridValues (Standard_Real &theXOrigin, Standard_Real &theYOrigin, Standard_Real &theRadiusStep, Standard_Integer &theDivisionNumber, Standard_Real &theRotationAngle)
 Returns the definition of the circular grid.
 
void SetCircularGridValues (const Standard_Real XOrigin, const Standard_Real YOrigin, const Standard_Real RadiusStep, const Standard_Integer DivisionNumber, const Standard_Real RotationAngle)
 Sets the definition of the circular grid. <XOrigin>, <YOrigin> defines the origin of the grid. <RadiusStep> defines the interval between 2 circles. <DivisionNumber> defines the section number of one half circle. <RotationAngle> defines the rotation angle of the grid.
 
void CircularGridGraphicValues (Standard_Real &theRadius, Standard_Real &theOffSet)
 Returns the location and the size of the grid.
 
void SetCircularGridGraphicValues (const Standard_Real Radius, const Standard_Real OffSet)
 Sets the location and the size of the grid. <XSize> defines the width of the grid. <YSize> defines the height of the grid. <OffSet> defines the displacement along the plane normal.
 
void RectangularGridGraphicValues (Standard_Real &theXSize, Standard_Real &theYSize, Standard_Real &theOffSet)
 Returns the location and the size of the grid.
 
void SetRectangularGridGraphicValues (const Standard_Real XSize, const Standard_Real YSize, const Standard_Real OffSet)
 Sets the location and the size of the grid. <XSize> defines the width of the grid. <YSize> defines the height of the grid. <OffSet> defines the displacement along the plane normal.
 
void ShowGridEcho (const Handle< V3d_View > &theView, const Graphic3d_Vertex &thePoint)
 Display grid echo at requested point in the view.
 
void HideGridEcho (const Handle< V3d_View > &theView)
 Temporarily hide grid echo.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
Standard_Integer GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object.
 
Standard_Integer DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

deprecated methods

Standard_Boolean IsActive ()
 Returns Standard_True if a grid is activated in <me>.
 
void InitActiveViews ()
 Initializes an internal iterator on the active views.
 
Standard_Boolean MoreActiveViews () const
 Returns true if there are more active view(s) to return.
 
void NextActiveViews ()
 Go to the next active view (if there is not, ActiveView will raise an exception)
 
const Handle< V3d_View > & ActiveView () const
 
void InitDefinedViews ()
 Initializes an internal iterator on the Defined views.
 
Standard_Boolean MoreDefinedViews () const
 returns true if there are more Defined view(s) to return.
 
void NextDefinedViews ()
 Go to the next Defined view (if there is not, DefinedView will raise an exception)
 
const Handle< V3d_View > & DefinedView () const
 
void InitActiveLights ()
 Initializes an internal iteratator on the active Lights.
 
Standard_Boolean MoreActiveLights () const
 returns true if there are more active Light(s) to return.
 
void NextActiveLights ()
 Go to the next active Light (if there is not, ActiveLight() will raise an exception)
 
const Handle< V3d_Light > & ActiveLight () const
 
void InitDefinedLights ()
 Initializes an internal iterattor on the Defined Lights.
 
Standard_Boolean MoreDefinedLights () const
 Returns true if there are more Defined Light(s) to return.
 
void NextDefinedLights ()
 Go to the next Defined Light (if there is not, DefinedLight() will raise an exception)
 
const Handle< V3d_Light > & DefinedLight () const
 
void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream.
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const char * get_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

Defines services on Viewer type objects. The methods of this class allow editing and interrogation of the parameters linked to the viewer its friend classes (View,light,plane).

Constructor & Destructor Documentation

◆ V3d_Viewer()

V3d_Viewer::V3d_Viewer ( const Handle< Graphic3d_GraphicDriver > & theDriver)

Create a Viewer with the given graphic driver and with default parameters:

  • View orientation: V3d_XposYnegZpos
  • View background: Quantity_NOC_GRAY30
  • Shading model: V3d_GOURAUD

Member Function Documentation

◆ ActivateGrid()

void V3d_Viewer::ActivateGrid ( const Aspect_GridType aGridType,
const Aspect_GridDrawMode aGridDrawMode )

Activates the grid in all views of <me>.

◆ ActiveLight()

const Handle< V3d_Light > & V3d_Viewer::ActiveLight ( ) const
inline
Deprecated
("Deprecated method - ActiveLights() should be used instead")

◆ ActiveLightIterator()

V3d_ListOfLightIterator V3d_Viewer::ActiveLightIterator ( ) const
inline

Return an iterator for defined lights.

◆ ActiveLights()

const V3d_ListOfLight & V3d_Viewer::ActiveLights ( ) const
inline

Return a list of active lights.

◆ ActiveView()

const Handle< V3d_View > & V3d_Viewer::ActiveView ( ) const
inline
Deprecated
("Deprecated method - ActiveViews() should be used instead")

◆ ActiveViewIterator()

V3d_ListOfViewIterator V3d_Viewer::ActiveViewIterator ( ) const
inline

Return an iterator for active views.

◆ ActiveViews()

const V3d_ListOfView & V3d_Viewer::ActiveViews ( ) const
inline

Return a list of active views.

◆ AddLight()

void V3d_Viewer::AddLight ( const Handle< V3d_Light > & theLight)

Adds Light in Sequence Of Lights.

◆ AddZLayer()

Standard_Boolean V3d_Viewer::AddZLayer ( Graphic3d_ZLayerId & theLayerId,
const Graphic3d_ZLayerSettings & theSettings = Graphic3d_ZLayerSettings() )
inline

Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value. The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view. Custom layers will be inserted before Graphic3d_ZLayerId_Top (e.g. between Graphic3d_ZLayerId_Default and before Graphic3d_ZLayerId_Top).

Parameters
theLayerId[out] id of created layer
theSettings[in] new layer settings
Returns
FALSE if the layer can not be created

◆ CircularGridGraphicValues()

void V3d_Viewer::CircularGridGraphicValues ( Standard_Real & theRadius,
Standard_Real & theOffSet )

Returns the location and the size of the grid.

◆ CircularGridValues()

void V3d_Viewer::CircularGridValues ( Standard_Real & theXOrigin,
Standard_Real & theYOrigin,
Standard_Real & theRadiusStep,
Standard_Integer & theDivisionNumber,
Standard_Real & theRotationAngle )

Returns the definition of the circular grid.

◆ ComputedMode()

Standard_Boolean V3d_Viewer::ComputedMode ( ) const
inline

returns true if the computed mode can be used.

◆ CreateView()

Handle< V3d_View > V3d_Viewer::CreateView ( )

Creates a view in the viewer according to its default parameters.

◆ DeactivateGrid()

void V3d_Viewer::DeactivateGrid ( )

Deactivates the grid in all views of <me>.

◆ DefaultBackgroundColor()

Quantity_Color V3d_Viewer::DefaultBackgroundColor ( ) const
inline

Returns the default background colour object.

◆ DefaultBgGradientColors()

void V3d_Viewer::DefaultBgGradientColors ( Quantity_Color & theColor1,
Quantity_Color & theColor2 ) const
inline

Returns the gradient background colour objects of the view.

◆ DefaultComputedMode()

Standard_Boolean V3d_Viewer::DefaultComputedMode ( ) const
inline

returns true if by default the computed mode must be used.

◆ DefaultRenderingParams()

const Graphic3d_RenderingParams & V3d_Viewer::DefaultRenderingParams ( ) const
inline

Return default Rendering Parameters. By default these parameters are set in a new V3d_View.

◆ DefaultShadingModel()

Graphic3d_TypeOfShadingModel V3d_Viewer::DefaultShadingModel ( ) const
inline

Returns the default type of Shading; Graphic3d_TypeOfShadingModel_Phong by default.

◆ DefaultTypeOfView()

V3d_TypeOfView V3d_Viewer::DefaultTypeOfView ( ) const
inline

Returns the default type of View (orthographic or perspective projection) to be returned by CreateView() method.

◆ DefaultViewProj()

V3d_TypeOfOrientation V3d_Viewer::DefaultViewProj ( ) const
inline

Returns the default Projection.

◆ DefaultViewSize()

Standard_Real V3d_Viewer::DefaultViewSize ( ) const
inline

Returns the default size of the view.

◆ DefaultVisualization()

V3d_TypeOfVisualization V3d_Viewer::DefaultVisualization ( ) const
inline

Returns the default type of Visualization.

◆ DefinedLight()

const Handle< V3d_Light > & V3d_Viewer::DefinedLight ( ) const
inline
Deprecated
("Deprecated method - DefinedLights() should be used instead")

◆ DefinedLightIterator()

V3d_ListOfLightIterator V3d_Viewer::DefinedLightIterator ( ) const
inline

Return an iterator for defined lights.

◆ DefinedLights()

const V3d_ListOfLight & V3d_Viewer::DefinedLights ( ) const
inline

Return a list of defined lights.

◆ DefinedView()

const Handle< V3d_View > & V3d_Viewer::DefinedView ( ) const
inline
Deprecated
("Deprecated method - DefinedViews() should be used instead")

◆ DefinedViewIterator()

V3d_ListOfViewIterator V3d_Viewer::DefinedViewIterator ( ) const
inline

Return an iterator for defined views.

◆ DefinedViews()

const V3d_ListOfView & V3d_Viewer::DefinedViews ( ) const
inline

Return a list of defined views.

◆ DelLight()

void V3d_Viewer::DelLight ( const Handle< V3d_Light > & theLight)

Delete Light in Sequence Of Lights.

◆ DisplayPrivilegedPlane()

void V3d_Viewer::DisplayPrivilegedPlane ( const Standard_Boolean theOnOff,
const Standard_Real theSize = 1 )

◆ Driver()

const Handle< Graphic3d_GraphicDriver > & V3d_Viewer::Driver ( ) const
inline

Return Graphic Driver instance.

◆ DumpJson()

void V3d_Viewer::DumpJson ( Standard_OStream & theOStream,
Standard_Integer theDepth = -1 ) const

Dumps the content of me into the stream.

◆ Erase()

void V3d_Viewer::Erase ( ) const

Erase all Objects in All the views.

◆ GetAllZLayers()

void V3d_Viewer::GetAllZLayers ( TColStd_SequenceOfInteger & theLayerSeq) const

Return all Z layer ids in sequence ordered by overlay level from lowest layer to highest ( foreground ). The first layer ID in sequence is the default layer that can't be removed.

◆ GetGradientBackground()

const Aspect_GradientBackground & V3d_Viewer::GetGradientBackground ( ) const
inline

Returns the gradient background of the view.

◆ Grid() [1/2]

Handle< Aspect_Grid > V3d_Viewer::Grid ( Aspect_GridType theGridType,
bool theToCreate = true )

Returns the defined grid in <me>.

◆ Grid() [2/2]

Handle< Aspect_Grid > V3d_Viewer::Grid ( bool theToCreate = true)
inline

Returns the defined grid in <me>.

◆ GridDrawMode()

Aspect_GridDrawMode V3d_Viewer::GridDrawMode ( )

Returns the current grid draw mode defined in <me>.

◆ GridEcho()

Standard_Boolean V3d_Viewer::GridEcho ( ) const
inline

Returns TRUE when grid echo must be displayed at hit point.

◆ GridType()

Aspect_GridType V3d_Viewer::GridType ( ) const
inline

Returns the current grid type defined in <me>.

◆ HideGridEcho()

void V3d_Viewer::HideGridEcho ( const Handle< V3d_View > & theView)

Temporarily hide grid echo.

◆ IfMoreViews()

Standard_Boolean V3d_Viewer::IfMoreViews ( ) const

Returns True if One View more can be defined in this Viewer.

◆ InitActiveLights()

void V3d_Viewer::InitActiveLights ( )
inline

Initializes an internal iteratator on the active Lights.

Deprecated
("Deprecated method - ActiveLights() should be used instead")

◆ InitActiveViews()

void V3d_Viewer::InitActiveViews ( )
inline

Initializes an internal iterator on the active views.

Deprecated
("Deprecated method - ActiveViews() should be used instead")

◆ InitDefinedLights()

void V3d_Viewer::InitDefinedLights ( )
inline

Initializes an internal iterattor on the Defined Lights.

Deprecated
("Deprecated method - DefinedLights() should be used instead")

◆ InitDefinedViews()

void V3d_Viewer::InitDefinedViews ( )
inline

Initializes an internal iterator on the Defined views.

Deprecated
("Deprecated method - DefinedViews() should be used instead")

◆ InsertLayerAfter()

Standard_Boolean V3d_Viewer::InsertLayerAfter ( Graphic3d_ZLayerId & theNewLayerId,
const Graphic3d_ZLayerSettings & theSettings,
const Graphic3d_ZLayerId theLayerBefore )

Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value. The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view. Layer rendering order is defined by its position in list (altered by theLayerAfter) and IsImmediate() flag (all layers with IsImmediate() flag are drawn afterwards);.

Parameters
theNewLayerId[out] id of created layer; layer id is arbitrary and does not depend on layer position in the list
theSettings[in] new layer settings
theLayerBefore[in] id of layer to append new layer after
Returns
FALSE if the layer can not be created

◆ InsertLayerBefore()

Standard_Boolean V3d_Viewer::InsertLayerBefore ( Graphic3d_ZLayerId & theNewLayerId,
const Graphic3d_ZLayerSettings & theSettings,
const Graphic3d_ZLayerId theLayerAfter )

Add a new top-level Z layer to all managed views and get its ID as <theLayerId> value. The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view. Layer rendering order is defined by its position in list (altered by theLayerAfter) and IsImmediate() flag (all layers with IsImmediate() flag are drawn afterwards);.

Parameters
theNewLayerId[out] id of created layer; layer id is arbitrary and does not depend on layer position in the list
theSettings[in] new layer settings
theLayerAfter[in] id of layer to append new layer before
Returns
FALSE if the layer can not be created

◆ Invalidate()

void V3d_Viewer::Invalidate ( ) const

Invalidates viewer content but does not redraw it.

◆ IsActive()

Standard_Boolean V3d_Viewer::IsActive ( )
inline

Returns Standard_True if a grid is activated in <me>.

Deprecated
("Deprecated method - IsGridActive() should be used instead")

◆ IsGlobalLight()

Standard_Boolean V3d_Viewer::IsGlobalLight ( const Handle< V3d_Light > & TheLight) const

Defines default lights: positional-light 0.3 0. 0. directional-light V3d_XnegYposZpos directional-light V3d_XnegYneg ambient-light.

◆ IsGridActive()

Standard_Boolean V3d_Viewer::IsGridActive ( )

Returns Standard_True if a grid is activated in <me>.

◆ LastActiveView()

Standard_Boolean V3d_Viewer::LastActiveView ( ) const
inline

returns true if there is only one active view.

◆ MoreActiveLights()

Standard_Boolean V3d_Viewer::MoreActiveLights ( ) const
inline

returns true if there are more active Light(s) to return.

Deprecated
("Deprecated method - ActiveLights() should be used instead")

◆ MoreActiveViews()

Standard_Boolean V3d_Viewer::MoreActiveViews ( ) const
inline

Returns true if there are more active view(s) to return.

Deprecated
("Deprecated method - ActiveViews() should be used instead")

◆ MoreDefinedLights()

Standard_Boolean V3d_Viewer::MoreDefinedLights ( ) const
inline

Returns true if there are more Defined Light(s) to return.

Deprecated
("Deprecated method - DefinedLights() should be used instead")

◆ MoreDefinedViews()

Standard_Boolean V3d_Viewer::MoreDefinedViews ( ) const
inline

returns true if there are more Defined view(s) to return.

Deprecated
("Deprecated method - DefinedViews() should be used instead")

◆ NextActiveLights()

void V3d_Viewer::NextActiveLights ( )
inline

Go to the next active Light (if there is not, ActiveLight() will raise an exception)

Deprecated
("Deprecated method - ActiveLights() should be used instead")

◆ NextActiveViews()

void V3d_Viewer::NextActiveViews ( )
inline

Go to the next active view (if there is not, ActiveView will raise an exception)

Deprecated
("Deprecated method - ActiveViews() should be used instead")

◆ NextDefinedLights()

void V3d_Viewer::NextDefinedLights ( )
inline

Go to the next Defined Light (if there is not, DefinedLight() will raise an exception)

Deprecated
("Deprecated method - DefinedLights() should be used instead")

◆ NextDefinedViews()

void V3d_Viewer::NextDefinedViews ( )
inline

Go to the next Defined view (if there is not, DefinedView will raise an exception)

Deprecated
("Deprecated method - DefinedViews() should be used instead")

◆ PrivilegedPlane()

const gp_Ax3 & V3d_Viewer::PrivilegedPlane ( ) const
inline

◆ RectangularGridGraphicValues()

void V3d_Viewer::RectangularGridGraphicValues ( Standard_Real & theXSize,
Standard_Real & theYSize,
Standard_Real & theOffSet )

Returns the location and the size of the grid.

◆ RectangularGridValues()

void V3d_Viewer::RectangularGridValues ( Standard_Real & theXOrigin,
Standard_Real & theYOrigin,
Standard_Real & theXStep,
Standard_Real & theYStep,
Standard_Real & theRotationAngle )

Returns the definition of the rectangular grid.

◆ Redraw()

void V3d_Viewer::Redraw ( ) const

Redraws all the views of the Viewer even if no modification has taken place. Must be called if all the views of the Viewer are exposed, as for example in a global DeIconification.

◆ RedrawImmediate()

void V3d_Viewer::RedrawImmediate ( ) const

Updates layer of immediate presentations.

◆ Remove()

void V3d_Viewer::Remove ( )

Suppresses the Viewer.

◆ RemoveZLayer()

Standard_Boolean V3d_Viewer::RemoveZLayer ( const Graphic3d_ZLayerId theLayerId)

Remove Z layer with ID <theLayerId>. Method returns Standard_False if the layer can not be removed or doesn't exists. By default, there are always default bottom-level layer that can't be removed.

◆ SetCircularGridGraphicValues()

void V3d_Viewer::SetCircularGridGraphicValues ( const Standard_Real Radius,
const Standard_Real OffSet )

Sets the location and the size of the grid. <XSize> defines the width of the grid. <YSize> defines the height of the grid. <OffSet> defines the displacement along the plane normal.

◆ SetCircularGridValues()

void V3d_Viewer::SetCircularGridValues ( const Standard_Real XOrigin,
const Standard_Real YOrigin,
const Standard_Real RadiusStep,
const Standard_Integer DivisionNumber,
const Standard_Real RotationAngle )

Sets the definition of the circular grid. <XOrigin>, <YOrigin> defines the origin of the grid. <RadiusStep> defines the interval between 2 circles. <DivisionNumber> defines the section number of one half circle. <RotationAngle> defines the rotation angle of the grid.

◆ SetComputedMode()

void V3d_Viewer::SetComputedMode ( const Standard_Boolean theMode)
inline

Set if the computed mode can be used.

◆ SetDefaultBackgroundColor()

void V3d_Viewer::SetDefaultBackgroundColor ( const Quantity_Color & theColor)
inline

Defines the default background colour of views attached to the viewer by supplying the color object.

◆ SetDefaultBgGradientColors()

void V3d_Viewer::SetDefaultBgGradientColors ( const Quantity_Color & theColor1,
const Quantity_Color & theColor2,
const Aspect_GradientFillMethod theFillStyle = Aspect_GradientFillMethod_Horizontal )
inline

Defines the default gradient background colours of views attached to the viewer by supplying the colour objects.

◆ SetDefaultComputedMode()

void V3d_Viewer::SetDefaultComputedMode ( const Standard_Boolean theMode)
inline

Set if by default the computed mode must be used.

◆ SetDefaultLights()

void V3d_Viewer::SetDefaultLights ( )

Defines default lights: positional-light 0.3 0. 0. directional-light V3d_XnegYposZpos directional-light V3d_XnegYneg ambient-light.

◆ SetDefaultRenderingParams()

void V3d_Viewer::SetDefaultRenderingParams ( const Graphic3d_RenderingParams & theParams)
inline

Set default Rendering Parameters.

◆ SetDefaultShadingModel()

void V3d_Viewer::SetDefaultShadingModel ( const Graphic3d_TypeOfShadingModel theType)
inline

Gives the default type of SHADING.

◆ SetDefaultTypeOfView()

void V3d_Viewer::SetDefaultTypeOfView ( const V3d_TypeOfView theType)
inline

Set the default type of View (orthographic or perspective projection) to be returned by CreateView() method.

◆ SetDefaultViewProj()

void V3d_Viewer::SetDefaultViewProj ( const V3d_TypeOfOrientation theOrientation)
inline

Sets the default projection for creating views in the viewer.

◆ SetDefaultViewSize()

void V3d_Viewer::SetDefaultViewSize ( const Standard_Real theSize)

Gives a default size for the creation of views of the viewer.

◆ SetDefaultVisualization()

void V3d_Viewer::SetDefaultVisualization ( const V3d_TypeOfVisualization theType)
inline

Gives the default visualization mode.

◆ SetGridEcho() [1/2]

void V3d_Viewer::SetGridEcho ( const Handle< Graphic3d_AspectMarker3d > & aMarker)

Show grid echo <aMarker> to the hit point. Warning: When the grid echo marker is not set, a default marker is build with the attributes: marker type : Aspect_TOM_STAR marker color : Quantity_NOC_GRAY90 marker size : 3.0.

◆ SetGridEcho() [2/2]

void V3d_Viewer::SetGridEcho ( const Standard_Boolean showGrid = Standard_True)

Show/Don't show grid echo to the hit point. If TRUE,the grid echo will be shown at ConvertToGrid() time.

◆ SetLightOff() [1/2]

void V3d_Viewer::SetLightOff ( )

Deactivate all the Lights defined in this viewer.

◆ SetLightOff() [2/2]

void V3d_Viewer::SetLightOff ( const Handle< V3d_Light > & theLight)

Deactivates MyLight in this viewer.

◆ SetLightOn() [1/2]

void V3d_Viewer::SetLightOn ( )

Activates all the lights defined in this viewer.

◆ SetLightOn() [2/2]

void V3d_Viewer::SetLightOn ( const Handle< V3d_Light > & theLight)

Activates MyLight in the viewer.

◆ SetPrivilegedPlane()

void V3d_Viewer::SetPrivilegedPlane ( const gp_Ax3 & thePlane)

◆ SetRectangularGridGraphicValues()

void V3d_Viewer::SetRectangularGridGraphicValues ( const Standard_Real XSize,
const Standard_Real YSize,
const Standard_Real OffSet )

Sets the location and the size of the grid. <XSize> defines the width of the grid. <YSize> defines the height of the grid. <OffSet> defines the displacement along the plane normal.

◆ SetRectangularGridValues()

void V3d_Viewer::SetRectangularGridValues ( const Standard_Real XOrigin,
const Standard_Real YOrigin,
const Standard_Real XStep,
const Standard_Real YStep,
const Standard_Real RotationAngle )

Sets the definition of the rectangular grid. <XOrigin>, <YOrigin> defines the origin of the grid. <XStep> defines the interval between 2 vertical lines. <YStep> defines the interval between 2 horizontal lines. <RotationAngle> defines the rotation angle of the grid.

◆ SetViewOff() [1/2]

void V3d_Viewer::SetViewOff ( )

Deactivates all the views of a Viewer attached to a window.

◆ SetViewOff() [2/2]

void V3d_Viewer::SetViewOff ( const Handle< V3d_View > & theView)

Deactivates a particular view in the Viewer. Must be call if the Window attached to the view has been Iconified .

◆ SetViewOn() [1/2]

void V3d_Viewer::SetViewOn ( )

Activates all of the views of a viewer attached to a window.

◆ SetViewOn() [2/2]

void V3d_Viewer::SetViewOn ( const Handle< V3d_View > & theView)

Activates a particular view in the Viewer. Must be call if the Window attached to the view has been Deiconified.

◆ SetZLayerSettings()

void V3d_Viewer::SetZLayerSettings ( const Graphic3d_ZLayerId theLayerId,
const Graphic3d_ZLayerSettings & theSettings )

Sets the settings for a single Z layer.

◆ ShowGridEcho()

void V3d_Viewer::ShowGridEcho ( const Handle< V3d_View > & theView,
const Graphic3d_Vertex & thePoint )

Display grid echo at requested point in the view.

◆ StructureManager()

Handle< Graphic3d_StructureManager > V3d_Viewer::StructureManager ( ) const
inline

Returns the structure manager associated to this viewer.

◆ UnHighlight()

void V3d_Viewer::UnHighlight ( ) const

UnHighlight all Objects in All the views.

◆ Update()

void V3d_Viewer::Update ( )
inline

Deprecated, Redraw() should be used instead.

◆ UpdateLights()

void V3d_Viewer::UpdateLights ( )

Updates the lights of all the views of a viewer.

◆ ZLayerSettings()

const Graphic3d_ZLayerSettings & V3d_Viewer::ZLayerSettings ( const Graphic3d_ZLayerId theLayerId) const

Returns the settings of a single Z layer.


The documentation for this class was generated from the following file: