Open CASCADE Technology  6.9.0
Public Member Functions | Protected Member Functions

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:
Inheritance graph
[legend]

Public Member Functions

 V3d_Viewer (const Handle< Graphic3d_GraphicDriver > &theDriver, const Standard_ExtString theName, const Standard_CString theDomain="", const Quantity_Length theViewSize=1000.0, const V3d_TypeOfOrientation theViewProj=V3d_XposYnegZpos, const Quantity_NameOfColor theViewBackground=Quantity_NOC_GRAY30, const V3d_TypeOfVisualization theVisualization=V3d_ZBUFFER, const V3d_TypeOfShadingModel theShadingModel=V3d_GOURAUD, const V3d_TypeOfUpdate theUpdateMode=V3d_WAIT, const Standard_Boolean theComputedMode=Standard_True, const Standard_Boolean theDefaultComputedMode=Standard_True, const V3d_TypeOfSurfaceDetail theSurfaceDetail=V3d_TEX_NONE)
 Create a Viewer with the given graphic driver and the given parameters or with their default values. Currently creating of more than 100 viewer instances is not supported and leads to an exception. This limitation might be addressed in some future OCCT releases. If the size of the view is <= 0 Warning: Client must creates a graphic driver. More...
 
Handle< V3d_ViewCreateView ()
 creates a view in the viewer according to its default parameters. More...
 
void SetViewOn ()
 Activates all of the views of a viewer attached to a window. More...
 
void SetViewOn (const Handle< V3d_View > &View)
 Activates a particular view in the Viewer . Must be call if the Window attached to the view has been Deiconified . More...
 
void SetViewOff ()
 Deactivates all the views of a Viewer attached to a window. More...
 
void SetViewOff (const Handle< V3d_View > &View)
 Deactivates a particular view in the Viewer. Must be call if the Window attached to the view has been Iconified . More...
 
void Update ()
 Deprecated, Redraw() should be used instead. More...
 
void UpdateLights ()
 Updates the lights of all the views of a viewer. More...
 
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. More...
 
void RedrawImmediate () const
 Updates layer of immediate presentations. More...
 
void Invalidate () const
 Invalidates viewer content but does not redraw it. More...
 
void Remove ()
 Suppresses the Viewer. More...
 
void Erase () const
 Erase all Objects in All the views. More...
 
void UnHighlight () const
 UnHighlight all Objects in All the views. More...
 
void SetDefaultBackgroundColor (const Quantity_TypeOfColor Type, const Quantity_Parameter V1, const Quantity_Parameter V2, const Quantity_Parameter V3)
 Defines the default base colour of views attached to the Viewer by supplying the type of colour definition and the three component values.. More...
 
void SetDefaultBackgroundColor (const Quantity_NameOfColor Name)
 Defines the default background colour of views attached to the viewer by supplying the name of the colour under the form Quantity_NOC_xxxx . More...
 
void SetDefaultBackgroundColor (const Quantity_Color &Color)
 Defines the default background colour of views attached to the viewer by supplying the color object. More...
 
void SetDefaultBgGradientColors (const Quantity_NameOfColor Name1, const Quantity_NameOfColor Name2, const Aspect_GradientFillMethod FillStyle=Aspect_GFM_HOR)
 Defines the default gradient background colours of view attached to the viewer by supplying the name of the colours under the form Quantity_NOC_xxxx . More...
 
void SetDefaultBgGradientColors (const Quantity_Color &Color1, const Quantity_Color &Color2, const Aspect_GradientFillMethod FillStyle=Aspect_GFM_HOR)
 Defines the default gradient background colours of views attached to the viewer by supplying the colour objects. More...
 
void SetDefaultViewSize (const Quantity_Length Size)
 Gives a default size for the creation of views of the viewer. More...
 
void SetDefaultViewProj (const V3d_TypeOfOrientation Orientation)
 Gives the default projection for creating views in the viewer. More...
 
void SetDefaultVisualization (const V3d_TypeOfVisualization Type)
 Gives the default visualisation mode.. More...
 
void SetZBufferManagment (const Standard_Boolean Automatic)
 defines the strategy concerning the ZBuffer activity. If Automatic is true, ZBuffer will be activated or deactivated depending on the fact that faces exist or not in the Viewer. This will optimize the response time in the case where only wireframe objects are displayed. If Automatic is False, ZBuffer will be activated or deactivated depending on the choice of SetVisualization in each View. Note that by default, the ZBufferManagment is not automatic. More...
 
Standard_Boolean ZBufferManagment () const
 returns the ZBuffer stategy choice. More...
 
void SetDefaultShadingModel (const V3d_TypeOfShadingModel Type)
 Gives the default type of SHADING. More...
 
void SetDefaultSurfaceDetail (const V3d_TypeOfSurfaceDetail Type)
 Gives the default type of texture mapping. More...
 
void SetDefaultAngle (const Quantity_PlaneAngle Angle)
 
void SetUpdateMode (const V3d_TypeOfUpdate Mode)
 Defines the mode of regenerating the views making up the viewer. This can be immediate <ASAP> or deferred <WAIT>. In this latter case, the views are updated when the method Update(me) is called. More...
 
void SetDefaultTypeOfView (const V3d_TypeOfView Type)
 
void SetPrivilegedPlane (const gp_Ax3 &aPlane)
 
gp_Ax3 PrivilegedPlane () const
 
void DisplayPrivilegedPlane (const Standard_Boolean OnOff, const Quantity_Length aSize=1)
 
void SetLightOn (const Handle< V3d_Light > &MyLight)
 Activates MyLight in the viewer. More...
 
void SetLightOn ()
 Activates all the lights defined in this viewer. More...
 
void SetLightOff (const Handle< V3d_Light > &MyLight)
 Desactivate MyLight in this viewer. More...
 
void SetLightOff ()
 Deactivate all the Lights defined in this viewer. More...
 
void DelLight (const Handle< V3d_Light > &MyLight)
 Delete Light in Sequence Of Lights. More...
 
void SetCurrentSelectedLight (const Handle< V3d_Light > &TheLight)
 Defines the selected light. More...
 
void ClearCurrentSelectedLight ()
 Defines the selected light at NULL. More...
 
void DefaultBackgroundColor (const Quantity_TypeOfColor Type, Quantity_Parameter &V1, Quantity_Parameter &V2, Quantity_Parameter &V3) const
 Returns the default background colour depending of the type. More...
 
Quantity_Color DefaultBackgroundColor () const
 Returns the default background colour object. More...
 
void DefaultBgGradientColors (Quantity_Color &Color1, Quantity_Color &Color2) const
 Returns the gradient background colour objects of the view. More...
 
Quantity_Length DefaultViewSize () const
 Returns the default size of the view. More...
 
V3d_TypeOfOrientation DefaultViewProj () const
 Returns the default Projection. More...
 
V3d_TypeOfVisualization DefaultVisualization () const
 Returns the default type of Visualization. More...
 
V3d_TypeOfShadingModel DefaultShadingModel () const
 Returns the default type of Shading. More...
 
V3d_TypeOfSurfaceDetail DefaultSurfaceDetail () const
 Returns the default type of texture mapping. More...
 
Quantity_PlaneAngle DefaultAngle () const
 
V3d_TypeOfUpdate UpdateMode () const
 Returns the regeneration mode of views in the viewer. More...
 
Standard_Boolean IfMoreViews () const
 Returns True if One View more can be activated in this Viewer. More...
 
void InitActiveViews ()
 initializes an iteration on the active views. More...
 
Standard_Boolean MoreActiveViews () const
 returns true if there are more active view(s) to return. More...
 
void NextActiveViews ()
 Go to the next active view (if there is not, ActiveView will raise an exception) More...
 
Handle< V3d_ViewActiveView () const
 
Standard_Boolean LastActiveView () const
 returns true if there is only one active view. More...
 
void InitDefinedViews ()
 initializes an iteration on the Defined views. More...
 
Standard_Boolean MoreDefinedViews () const
 returns true if there are more Defined view(s) to return. More...
 
void NextDefinedViews ()
 Go to the next Defined view (if there is not, DefinedView will raise an exception) More...
 
Handle< V3d_ViewDefinedView () const
 
void InitActiveLights ()
 initializes an iteration on the active Lights. More...
 
Standard_Boolean MoreActiveLights () const
 returns true if there are more active Light(s) to return. More...
 
void NextActiveLights ()
 Go to the next active Light (if there is not, ActiveLight will raise an exception) More...
 
Handle< V3d_LightActiveLight () const
 
void InitDefinedLights ()
 initializes an iteration on the Defined Lights. More...
 
Standard_Boolean MoreDefinedLights () const
 returns true if there are more Defined Light(s) to return. More...
 
void NextDefinedLights ()
 Go to the next Defined Light (if there is not, DefinedLight will raise an exception) More...
 
Handle< V3d_LightDefinedLight () const
 
Handle< Visual3d_ViewManagerViewer () const
 Returns the viewer associated to Visual3d . More...
 
Handle< V3d_LightCurrentSelectedLight () const
 Returns the Selected Light. More...
 
Standard_Boolean IsGlobalLight (const Handle< V3d_Light > &TheLight) const
 
Standard_Boolean ComputedMode () const
 returns true if the computed mode can be used. More...
 
Standard_Boolean DefaultComputedMode () const
 returns true if by default the computed mode must be used. More...
 
void ActivateGrid (const Aspect_GridType aGridType, const Aspect_GridDrawMode aGridDrawMode)
 Activates the grid in all views of <me>. More...
 
void DeactivateGrid ()
 Deactivates the grid in all views of <me>. More...
 
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. More...
 
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. More...
 
Standard_Boolean GridEcho () const
 Returns TRUE when grid echo must be displayed at hit point. More...
 
Standard_Boolean IsActive () const
 Returns Standard_True if a grid is activated in <me>. More...
 
Handle< Aspect_GridGrid () const
 Returns the defined grid in <me>. More...
 
Aspect_GridType GridType () const
 Returns the current grid type defined in <me>. More...
 
Aspect_GridDrawMode GridDrawMode () const
 Returns the current grid draw mode defined in <me>. More...
 
void RectangularGridValues (Quantity_Length &XOrigin, Quantity_Length &YOrigin, Quantity_Length &XStep, Quantity_Length &YStep, Quantity_PlaneAngle &RotationAngle) const
 Returns the definition of the rectangular grid. More...
 
void SetRectangularGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length XStep, const Quantity_Length YStep, const Quantity_PlaneAngle 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. More...
 
void CircularGridValues (Quantity_Length &XOrigin, Quantity_Length &YOrigin, Quantity_Length &RadiusStep, Standard_Integer &DivisionNumber, Quantity_PlaneAngle &RotationAngle) const
 Returns the definition of the circular grid. More...
 
void SetCircularGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length RadiusStep, const Standard_Integer DivisionNumber, const Quantity_PlaneAngle 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. More...
 
void CircularGridGraphicValues (Quantity_Length &Radius, Quantity_Length &OffSet) const
 Returns the location and the size of the grid. More...
 
void SetCircularGridGraphicValues (const Quantity_Length Radius, const Quantity_Length 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. More...
 
void RectangularGridGraphicValues (Quantity_Length &XSize, Quantity_Length &YSize, Quantity_Length &OffSet) const
 Returns the location and the size of the grid. More...
 
void SetRectangularGridGraphicValues (const Quantity_Length XSize, const Quantity_Length YSize, const Quantity_Length 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. More...
 
Aspect_GradientBackground GetGradientBackground () const
 Returns the gradient background of the view. More...
 
void SetDefaultLights ()
 defines default lights - positional-light 0.3 0. 0. directional-light V3d_XnegYposZpos directional-light V3d_XnegYneg ambient-light More...
 
void ShowGridEcho (const Handle< V3d_View > &theView, const Graphic3d_Vertex &thePoint)
 Display grid echo at requested point in the view. More...
 
void HideGridEcho (const Handle< V3d_View > &theView)
 Temporarly hide grid echo. More...
 
void SetZLayerSettings (const Standard_Integer theLayerId, const Graphic3d_ZLayerSettings &theSettings)
 Sets the settings for a single Z layer. More...
 
Graphic3d_ZLayerSettings ZLayerSettings (const Standard_Integer theLayerId)
 Returns the settings of a single Z layer. More...
 
Standard_Boolean AddZLayer (Standard_Integer &theLayerId)
 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. The method returns Standard_False if the layer can not be created. The layer mechanism allows to display structures in higher layers in overlay of structures in lower layers. More...
 
Standard_Boolean RemoveZLayer (const Standard_Integer 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. More...
 
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. More...
 
const Handle
< Graphic3d_GraphicDriver > & 
Driver () const
 
Standard_ExtString NextName () const
 
Standard_CString Domain () const
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const 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. More...
 
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. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Protected Member Functions

void IncrCount ()
 

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 ( const Handle< Graphic3d_GraphicDriver > &  theDriver,
const Standard_ExtString  theName,
const Standard_CString  theDomain = "",
const Quantity_Length  theViewSize = 1000.0,
const V3d_TypeOfOrientation  theViewProj = V3d_XposYnegZpos,
const Quantity_NameOfColor  theViewBackground = Quantity_NOC_GRAY30,
const V3d_TypeOfVisualization  theVisualization = V3d_ZBUFFER,
const V3d_TypeOfShadingModel  theShadingModel = V3d_GOURAUD,
const V3d_TypeOfUpdate  theUpdateMode = V3d_WAIT,
const Standard_Boolean  theComputedMode = Standard_True,
const Standard_Boolean  theDefaultComputedMode = Standard_True,
const V3d_TypeOfSurfaceDetail  theSurfaceDetail = V3d_TEX_NONE 
)

Create a Viewer with the given graphic driver and the given parameters or with their default values. Currently creating of more than 100 viewer instances is not supported and leads to an exception. This limitation might be addressed in some future OCCT releases. If the size of the view is <= 0 Warning: Client must creates a graphic driver.

Member Function Documentation

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

Activates the grid in all views of <me>.

Handle< V3d_Light > V3d_Viewer::ActiveLight ( ) const
Handle< V3d_View > V3d_Viewer::ActiveView ( ) const
Standard_Boolean V3d_Viewer::AddZLayer ( Standard_Integer theLayerId)

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. The method returns Standard_False if the layer can not be created. The layer mechanism allows to display structures in higher layers in overlay of structures in lower layers.

void V3d_Viewer::CircularGridGraphicValues ( Quantity_Length Radius,
Quantity_Length OffSet 
) const

Returns the location and the size of the grid.

void V3d_Viewer::CircularGridValues ( Quantity_Length XOrigin,
Quantity_Length YOrigin,
Quantity_Length RadiusStep,
Standard_Integer DivisionNumber,
Quantity_PlaneAngle RotationAngle 
) const

Returns the definition of the circular grid.

void V3d_Viewer::ClearCurrentSelectedLight ( )

Defines the selected light at NULL.

Standard_Boolean V3d_Viewer::ComputedMode ( ) const

returns true if the computed mode can be used.

Handle< V3d_View > V3d_Viewer::CreateView ( )

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

Handle< V3d_Light > V3d_Viewer::CurrentSelectedLight ( ) const

Returns the Selected Light.

void V3d_Viewer::DeactivateGrid ( )

Deactivates the grid in all views of <me>.

Quantity_PlaneAngle V3d_Viewer::DefaultAngle ( ) const
void V3d_Viewer::DefaultBackgroundColor ( const Quantity_TypeOfColor  Type,
Quantity_Parameter V1,
Quantity_Parameter V2,
Quantity_Parameter V3 
) const

Returns the default background colour depending of the type.

Quantity_Color V3d_Viewer::DefaultBackgroundColor ( ) const

Returns the default background colour object.

void V3d_Viewer::DefaultBgGradientColors ( Quantity_Color Color1,
Quantity_Color Color2 
) const

Returns the gradient background colour objects of the view.

Standard_Boolean V3d_Viewer::DefaultComputedMode ( ) const

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

V3d_TypeOfShadingModel V3d_Viewer::DefaultShadingModel ( ) const

Returns the default type of Shading.

V3d_TypeOfSurfaceDetail V3d_Viewer::DefaultSurfaceDetail ( ) const

Returns the default type of texture mapping.

V3d_TypeOfOrientation V3d_Viewer::DefaultViewProj ( ) const

Returns the default Projection.

Quantity_Length V3d_Viewer::DefaultViewSize ( ) const

Returns the default size of the view.

V3d_TypeOfVisualization V3d_Viewer::DefaultVisualization ( ) const

Returns the default type of Visualization.

Handle< V3d_Light > V3d_Viewer::DefinedLight ( ) const
Handle< V3d_View > V3d_Viewer::DefinedView ( ) const
void V3d_Viewer::DelLight ( const Handle< V3d_Light > &  MyLight)

Delete Light in Sequence Of Lights.

void V3d_Viewer::DisplayPrivilegedPlane ( const Standard_Boolean  OnOff,
const Quantity_Length  aSize = 1 
)
Standard_CString V3d_Viewer::Domain ( ) const
const Handle< Graphic3d_GraphicDriver >& V3d_Viewer::Driver ( ) const
void V3d_Viewer::Erase ( ) const

Erase all Objects in All the views.

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.

Aspect_GradientBackground V3d_Viewer::GetGradientBackground ( ) const

Returns the gradient background of the view.

Handle< Aspect_Grid > V3d_Viewer::Grid ( ) const

Returns the defined grid in <me>.

Aspect_GridDrawMode V3d_Viewer::GridDrawMode ( ) const

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

Standard_Boolean V3d_Viewer::GridEcho ( ) const

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

Aspect_GridType V3d_Viewer::GridType ( ) const

Returns the current grid type defined in <me>.

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

Temporarly hide grid echo.

Standard_Boolean V3d_Viewer::IfMoreViews ( ) const

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

void V3d_Viewer::IncrCount ( )
protected
void V3d_Viewer::InitActiveLights ( )

initializes an iteration on the active Lights.

void V3d_Viewer::InitActiveViews ( )

initializes an iteration on the active views.

void V3d_Viewer::InitDefinedLights ( )

initializes an iteration on the Defined Lights.

void V3d_Viewer::InitDefinedViews ( )

initializes an iteration on the Defined views.

void V3d_Viewer::Invalidate ( ) const

Invalidates viewer content but does not redraw it.

Standard_Boolean V3d_Viewer::IsActive ( ) const

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

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

returns true if there is only one active view.

Standard_Boolean V3d_Viewer::MoreActiveLights ( ) const

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

Standard_Boolean V3d_Viewer::MoreActiveViews ( ) const

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

Standard_Boolean V3d_Viewer::MoreDefinedLights ( ) const

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

Standard_Boolean V3d_Viewer::MoreDefinedViews ( ) const

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

void V3d_Viewer::NextActiveLights ( )

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

void V3d_Viewer::NextActiveViews ( )

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

void V3d_Viewer::NextDefinedLights ( )

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

void V3d_Viewer::NextDefinedViews ( )

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

Standard_ExtString V3d_Viewer::NextName ( ) const
gp_Ax3 V3d_Viewer::PrivilegedPlane ( ) const
void V3d_Viewer::RectangularGridGraphicValues ( Quantity_Length XSize,
Quantity_Length YSize,
Quantity_Length OffSet 
) const

Returns the location and the size of the grid.

void V3d_Viewer::RectangularGridValues ( Quantity_Length XOrigin,
Quantity_Length YOrigin,
Quantity_Length XStep,
Quantity_Length YStep,
Quantity_PlaneAngle RotationAngle 
) const

Returns the definition of the rectangular grid.

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.

void V3d_Viewer::RedrawImmediate ( ) const

Updates layer of immediate presentations.

void V3d_Viewer::Remove ( )

Suppresses the Viewer.

Standard_Boolean V3d_Viewer::RemoveZLayer ( const Standard_Integer  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.

void V3d_Viewer::SetCircularGridGraphicValues ( const Quantity_Length  Radius,
const Quantity_Length  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 V3d_Viewer::SetCircularGridValues ( const Quantity_Length  XOrigin,
const Quantity_Length  YOrigin,
const Quantity_Length  RadiusStep,
const Standard_Integer  DivisionNumber,
const Quantity_PlaneAngle  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 V3d_Viewer::SetCurrentSelectedLight ( const Handle< V3d_Light > &  TheLight)

Defines the selected light.

void V3d_Viewer::SetDefaultAngle ( const Quantity_PlaneAngle  Angle)
void V3d_Viewer::SetDefaultBackgroundColor ( const Quantity_TypeOfColor  Type,
const Quantity_Parameter  V1,
const Quantity_Parameter  V2,
const Quantity_Parameter  V3 
)

Defines the default base colour of views attached to the Viewer by supplying the type of colour definition and the three component values..

void V3d_Viewer::SetDefaultBackgroundColor ( const Quantity_NameOfColor  Name)

Defines the default background colour of views attached to the viewer by supplying the name of the colour under the form Quantity_NOC_xxxx .

void V3d_Viewer::SetDefaultBackgroundColor ( const Quantity_Color Color)

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

void V3d_Viewer::SetDefaultBgGradientColors ( const Quantity_NameOfColor  Name1,
const Quantity_NameOfColor  Name2,
const Aspect_GradientFillMethod  FillStyle = Aspect_GFM_HOR 
)

Defines the default gradient background colours of view attached to the viewer by supplying the name of the colours under the form Quantity_NOC_xxxx .

void V3d_Viewer::SetDefaultBgGradientColors ( const Quantity_Color Color1,
const Quantity_Color Color2,
const Aspect_GradientFillMethod  FillStyle = Aspect_GFM_HOR 
)

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

void V3d_Viewer::SetDefaultLights ( )

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

void V3d_Viewer::SetDefaultShadingModel ( const V3d_TypeOfShadingModel  Type)

Gives the default type of SHADING.

void V3d_Viewer::SetDefaultSurfaceDetail ( const V3d_TypeOfSurfaceDetail  Type)

Gives the default type of texture mapping.

void V3d_Viewer::SetDefaultTypeOfView ( const V3d_TypeOfView  Type)
void V3d_Viewer::SetDefaultViewProj ( const V3d_TypeOfOrientation  Orientation)

Gives the default projection for creating views in the viewer.

void V3d_Viewer::SetDefaultViewSize ( const Quantity_Length  Size)

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

void V3d_Viewer::SetDefaultVisualization ( const V3d_TypeOfVisualization  Type)

Gives the default visualisation mode..

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.

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.

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

Desactivate MyLight in this viewer.

void V3d_Viewer::SetLightOff ( )

Deactivate all the Lights defined in this viewer.

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

Activates MyLight in the viewer.

void V3d_Viewer::SetLightOn ( )

Activates all the lights defined in this viewer.

void V3d_Viewer::SetPrivilegedPlane ( const gp_Ax3 aPlane)
void V3d_Viewer::SetRectangularGridGraphicValues ( const Quantity_Length  XSize,
const Quantity_Length  YSize,
const Quantity_Length  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 V3d_Viewer::SetRectangularGridValues ( const Quantity_Length  XOrigin,
const Quantity_Length  YOrigin,
const Quantity_Length  XStep,
const Quantity_Length  YStep,
const Quantity_PlaneAngle  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 V3d_Viewer::SetUpdateMode ( const V3d_TypeOfUpdate  Mode)

Defines the mode of regenerating the views making up the viewer. This can be immediate <ASAP> or deferred <WAIT>. In this latter case, the views are updated when the method Update(me) is called.

void V3d_Viewer::SetViewOff ( )

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

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

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

void V3d_Viewer::SetViewOn ( )

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

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

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

void V3d_Viewer::SetZBufferManagment ( const Standard_Boolean  Automatic)

defines the strategy concerning the ZBuffer activity. If Automatic is true, ZBuffer will be activated or deactivated depending on the fact that faces exist or not in the Viewer. This will optimize the response time in the case where only wireframe objects are displayed. If Automatic is False, ZBuffer will be activated or deactivated depending on the choice of SetVisualization in each View. Note that by default, the ZBufferManagment is not automatic.

void V3d_Viewer::SetZLayerSettings ( const Standard_Integer  theLayerId,
const Graphic3d_ZLayerSettings theSettings 
)

Sets the settings for a single Z layer.

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

Display grid echo at requested point in the view.

void V3d_Viewer::UnHighlight ( ) const

UnHighlight all Objects in All the views.

void V3d_Viewer::Update ( )

Deprecated, Redraw() should be used instead.

void V3d_Viewer::UpdateLights ( )

Updates the lights of all the views of a viewer.

V3d_TypeOfUpdate V3d_Viewer::UpdateMode ( ) const

Returns the regeneration mode of views in the viewer.

Handle< Visual3d_ViewManager > V3d_Viewer::Viewer ( ) const

Returns the viewer associated to Visual3d .

Standard_Boolean V3d_Viewer::ZBufferManagment ( ) const

returns the ZBuffer stategy choice.

Graphic3d_ZLayerSettings V3d_Viewer::ZLayerSettings ( const Standard_Integer  theLayerId)

Returns the settings of a single Z layer.


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