![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
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>

Public Member Functions | |
| V3d_Viewer (const occ::handle< Graphic3d_GraphicDriver > &theDriver) | |
| Create a Viewer with the given graphic driver and with default parameters: | |
| bool | IfMoreViews () const |
| Returns True if One View more can be defined in this Viewer. | |
| occ::handle< V3d_View > | CreateView () |
| 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 occ::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 occ::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 occ::handle< Graphic3d_GraphicDriver > & | Driver () const |
| Return Graphic Driver instance. | |
| occ::handle< Graphic3d_StructureManager > | StructureManager () const |
| Returns the structure manager associated to this viewer. | |
| const Graphic3d_RenderingParams & | DefaultRenderingParams () 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_GradientBackground & | GetGradientBackground () 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. | |
| double | DefaultViewSize () const |
| Returns the default size of the view. | |
| void | SetDefaultViewSize (const double 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 (NCollection_Sequence< int > &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. | |
| bool | 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). | |
| bool | 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);. | |
| bool | 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);. | |
| bool | RemoveZLayer (const Graphic3d_ZLayerId theLayerId) |
| Remove Z layer with ID <theLayerId>. Method returns 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_ZLayerSettings & | ZLayerSettings (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 NCollection_List< occ::handle< V3d_View > > & | ActiveViews () const |
| Return a list of active views. | |
| NCollection_List< occ::handle< V3d_View > >::Iterator | ActiveViewIterator () const |
| Return an iterator for active views. | |
| bool | LastActiveView () const |
| returns true if there is only one active view. | |
| const NCollection_List< occ::handle< V3d_View > > & | DefinedViews () const |
| Return a list of defined views. | |
| NCollection_List< occ::handle< V3d_View > >::Iterator | DefinedViewIterator () const |
| Return an iterator for defined views. | |
lights management | |
Defines default lights: positional-light 0.3 0. 0. directional-light V3d_XnegYposZpos directional-light V3d_XnegYneg ambient-light | |
| void | SetDefaultLights () |
| Activates MyLight in the viewer. | |
| void | SetLightOn (const occ::handle< V3d_Light > &theLight) |
| Activates MyLight in the viewer. | |
| void | SetLightOn () |
| Activates all the lights defined in this viewer. | |
| void | SetLightOff (const occ::handle< V3d_Light > &theLight) |
| Deactivates MyLight in this viewer. | |
| void | SetLightOff () |
| Deactivate all the Lights defined in this viewer. | |
| void | AddLight (const occ::handle< V3d_Light > &theLight) |
| Adds Light in Sequence Of Lights. | |
| void | DelLight (const occ::handle< V3d_Light > &theLight) |
| Delete Light in Sequence Of Lights. | |
| void | UpdateLights () |
| Updates the lights of all the views of a viewer. | |
| bool | IsGlobalLight (const occ::handle< V3d_Light > &TheLight) const |
| Activates MyLight in the viewer. | |
| const NCollection_List< occ::handle< Graphic3d_CLight > > & | ActiveLights () const |
| Return a list of active lights. | |
| NCollection_List< occ::handle< Graphic3d_CLight > >::Iterator | ActiveLightIterator () const |
| Return an iterator for defined lights. | |
| const NCollection_List< occ::handle< Graphic3d_CLight > > & | DefinedLights () const |
| Return a list of defined lights. | |
| NCollection_List< occ::handle< Graphic3d_CLight > >::Iterator | DefinedLightIterator () const |
| Return an iterator for defined lights. | |
objects management | |
Erase all Objects in All the views. | |
| void | Erase () const |
| UnHighlight all Objects in All the views. | |
| void | UnHighlight () const |
| UnHighlight all Objects in All the views. | |
| bool | ComputedMode () const |
| returns true if the computed mode can be used. | |
| void | SetComputedMode (const bool theMode) |
| Set if the computed mode can be used. | |
| bool | DefaultComputedMode () const |
| returns true if by default the computed mode must be used. | |
| void | SetDefaultComputedMode (const bool theMode) |
| Set if by default the computed mode must be used. | |
privileged plane management | |
| const gp_Ax3 & | PrivilegedPlane () const |
| void | SetPrivilegedPlane (const gp_Ax3 &thePlane) |
| void | DisplayPrivilegedPlane (const bool theOnOff, const double theSize=1) |
grid management (CPU rendering, deprecated) | |
GPU shader grid lives on V3d_View::GridDisplay (mutually exclusive with this path). Arc range on circular grids is unsupported here: warning + ignored. | |
| void | ActivateGrid (const Aspect_GridType aGridType, const Aspect_GridDrawMode aGridDrawMode) |
| Activates the grid in all views of <me>. Lazily creates the V3d_RectangularGrid / V3d_CircularGrid on first use and displays it. | |
| void | DeactivateGrid () |
| Deactivates the grid in all views of <me>. | |
| bool | IsGridActive () |
| Returns true if a grid is currently active in <me>. | |
| occ::handle< Aspect_Grid > | Grid (bool theToCreate=true) |
| Returns the currently selected grid (rectangular / circular per GridType()). | |
| occ::handle< Aspect_Grid > | Grid (Aspect_GridType theGridType, bool theToCreate=true) |
| Returns the grid of the requested type. | |
| Aspect_GridType | GridType () const |
| Returns the currently selected grid type (rectangular / circular). | |
| Aspect_GridDrawMode | GridDrawMode () |
| Returns the draw mode (lines / points / none) of the active grid. | |
| void | RectangularGridValues (double &theXOrigin, double &theYOrigin, double &theXStep, double &theYStep, double &theRotationAngle) |
| Returns the rectangular grid definition. | |
| void | SetRectangularGridValues (const double XOrigin, const double YOrigin, const double XStep, const double YStep, const double RotationAngle) |
| Sets the rectangular grid definition. | |
| void | RectangularGridGraphicValues (double &theXSize, double &theYSize, double &theOffSet) |
| Returns the rectangular grid extent. | |
| void | SetRectangularGridGraphicValues (const double XSize, const double YSize, const double OffSet) |
| Sets the rectangular grid extent. | |
| void | CircularGridValues (double &theXOrigin, double &theYOrigin, double &theRadiusStep, int &theDivisionNumber, double &theRotationAngle) |
| Returns the circular grid definition. | |
| void | SetCircularGridValues (const double XOrigin, const double YOrigin, const double RadiusStep, const int DivisionNumber, const double RotationAngle) |
| Sets the circular grid definition. | |
| void | CircularGridGraphicValues (double &theRadius, double &theOffSet) |
| Returns the circular grid extent. | |
| void | SetCircularGridGraphicValues (const double Radius, const double OffSet) |
| Sets the circular grid extent. | |
| void | SetGridEcho (const bool showGrid=true) |
| Toggle the snap-hit echo marker drawn by ConvertToGrid() at the snapped point. | |
| void | SetGridEcho (const occ::handle< Graphic3d_AspectMarker3d > &aMarker) |
| Replaces the default echo marker. Default attributes when this overload is not called: Aspect_TOM_STAR, Quantity_NOC_GRAY90, size 3.0. | |
| bool | GridEcho () const |
| Returns TRUE when the snap-hit echo marker is enabled. | |
| void | ShowGridEcho (const occ::handle< V3d_View > &theView, const Graphic3d_Vertex &thePoint) |
| Displays the echo marker in a single view. | |
| void | HideGridEcho (const occ::handle< V3d_View > &theView) |
| Temporarily hides the echo marker in a single view (e.g. while not snapping). | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient ()=default |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| bool | IsInstance (const char *const theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| bool | 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. | |
| bool | IsKind (const char *const 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_Transient * | This () 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. | |
| int | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations. | |
| int | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
deprecated methods | |
Returns true if a grid is activated in <me>.
| |
| bool | IsActive () |
| Initializes an internal iterator on the active views. | |
| void | InitActiveViews () |
| Initializes an internal iterator on the active views. | |
| bool | 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 occ::handle< V3d_View > & | ActiveView () const |
| void | InitDefinedViews () |
| Initializes an internal iterator on the Defined views. | |
| bool | 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 occ::handle< V3d_View > & | DefinedView () const |
| void | InitActiveLights () |
| Initializes an internal iteratator on the active Lights. | |
| bool | 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 occ::handle< V3d_Light > & | ActiveLight () const |
| void | InitDefinedLights () |
| Initializes an internal iterattor on the Defined Lights. | |
| bool | 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 occ::handle< V3d_Light > & | DefinedLight () const |
| void | DumpJson (Standard_OStream &theOStream, int 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. | |
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).
| V3d_Viewer::V3d_Viewer | ( | const occ::handle< Graphic3d_GraphicDriver > & | theDriver | ) |
Create a Viewer with the given graphic driver and with default parameters:
| void V3d_Viewer::ActivateGrid | ( | const Aspect_GridType | aGridType, |
| const Aspect_GridDrawMode | aGridDrawMode ) |
Activates the grid in all views of <me>. Lazily creates the V3d_RectangularGrid / V3d_CircularGrid on first use and displays it.
| [in] | aGridType | rectangular or circular |
| [in] | aGridDrawMode | lines, points or none |
|
inline |
|
inline |
Return an iterator for defined lights.
|
inline |
Return a list of active lights.
|
inline |
|
inline |
Return an iterator for active views.
|
inline |
Return a list of active views.
| void V3d_Viewer::AddLight | ( | const occ::handle< V3d_Light > & | theLight | ) |
Adds Light in Sequence Of Lights.
|
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).
| [out] | theLayerId | id of created layer |
| [in] | theSettings | new layer settings |
Returns the circular grid extent.
| [out] | theRadius | outermost ring radius |
| [out] | theOffSet | plane-normal displacement of the rendered grid |
| void V3d_Viewer::CircularGridValues | ( | double & | theXOrigin, |
| double & | theYOrigin, | ||
| double & | theRadiusStep, | ||
| int & | theDivisionNumber, | ||
| double & | theRotationAngle ) |
Returns the circular grid definition.
| [out] | theXOrigin | grid origin X (snap reference) |
| [out] | theYOrigin | grid origin Y |
| [out] | theRadiusStep | radial interval between two concentric circles |
| [out] | theDivisionNumber | number of sectors per half-circle |
| [out] | theRotationAngle | in-plane rotation angle, radians |
|
inline |
returns true if the computed mode can be used.
| occ::handle< V3d_View > V3d_Viewer::CreateView | ( | ) |
Creates a view in the viewer according to its default parameters.
| void V3d_Viewer::DeactivateGrid | ( | ) |
Deactivates the grid in all views of <me>.
|
inline |
Returns the default background colour object.
|
inline |
Returns the gradient background colour objects of the view.
|
inline |
returns true if by default the computed mode must be used.
|
inline |
Return default Rendering Parameters. By default these parameters are set in a new V3d_View.
|
inline |
Returns the default type of Shading; Graphic3d_TypeOfShadingModel_Phong by default.
|
inline |
Returns the default type of View (orthographic or perspective projection) to be returned by CreateView() method.
|
inline |
Returns the default Projection.
|
inline |
Returns the default size of the view.
|
inline |
Returns the default type of Visualization.
|
inline |
|
inline |
Return an iterator for defined lights.
|
inline |
Return a list of defined lights.
|
inline |
|
inline |
Return an iterator for defined views.
|
inline |
Return a list of defined views.
| void V3d_Viewer::DelLight | ( | const occ::handle< V3d_Light > & | theLight | ) |
Delete Light in Sequence Of Lights.
|
inline |
Return Graphic Driver instance.
| void V3d_Viewer::DumpJson | ( | Standard_OStream & | theOStream, |
| int | theDepth = -1 ) const |
Dumps the content of me into the stream.
| void V3d_Viewer::Erase | ( | ) | const |
UnHighlight all Objects in All the views.
| void V3d_Viewer::GetAllZLayers | ( | NCollection_Sequence< int > & | 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.
|
inline |
Returns the gradient background of the view.
| occ::handle< Aspect_Grid > V3d_Viewer::Grid | ( | Aspect_GridType | theGridType, |
| bool | theToCreate = true ) |
Returns the grid of the requested type.
| [in] | theGridType | rectangular or circular |
| [in] | theToCreate | when false, returns null instead of allocating |
|
inline |
Returns the currently selected grid (rectangular / circular per GridType()).
| [in] | theToCreate | when false, returns null instead of allocating |
| Aspect_GridDrawMode V3d_Viewer::GridDrawMode | ( | ) |
Returns the draw mode (lines / points / none) of the active grid.
|
inline |
Returns TRUE when the snap-hit echo marker is enabled.
|
inline |
Returns the currently selected grid type (rectangular / circular).
| void V3d_Viewer::HideGridEcho | ( | const occ::handle< V3d_View > & | theView | ) |
Temporarily hides the echo marker in a single view (e.g. while not snapping).
| [in] | theView | view in which to hide the echo |
| bool V3d_Viewer::IfMoreViews | ( | ) | const |
Returns True if One View more can be defined in this Viewer.
|
inline |
Initializes an internal iteratator on the active Lights.
|
inline |
Initializes an internal iterator on the active views.
|
inline |
Initializes an internal iterattor on the Defined Lights.
|
inline |
Initializes an internal iterator on the Defined views.
| bool 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);.
| [out] | theNewLayerId | id of created layer; layer id is arbitrary and does not depend on layer position in the list |
| [in] | theSettings | new layer settings |
| [in] | theLayerBefore | id of layer to append new layer after |
| bool 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);.
| [out] | theNewLayerId | id of created layer; layer id is arbitrary and does not depend on layer position in the list |
| [in] | theSettings | new layer settings |
| [in] | theLayerAfter | id of layer to append new layer before |
| void V3d_Viewer::Invalidate | ( | ) | const |
Invalidates viewer content but does not redraw it.
|
inline |
Initializes an internal iterator on the active views.
| bool V3d_Viewer::IsGlobalLight | ( | const occ::handle< V3d_Light > & | TheLight | ) | const |
Activates MyLight in the viewer.
| bool V3d_Viewer::IsGridActive | ( | ) |
Returns true if a grid is currently active in <me>.
|
inline |
returns true if there is only one active view.
|
inline |
returns true if there are more active Light(s) to return.
|
inline |
Returns true if there are more active view(s) to return.
|
inline |
Returns true if there are more Defined Light(s) to return.
|
inline |
returns true if there are more Defined view(s) to return.
|
inline |
Go to the next active Light (if there is not, ActiveLight() will raise an exception)
|
inline |
Go to the next active view (if there is not, ActiveView will raise an exception)
|
inline |
Go to the next Defined Light (if there is not, DefinedLight() will raise an exception)
|
inline |
Go to the next Defined view (if there is not, DefinedView will raise an exception)
|
inline |
| void V3d_Viewer::RectangularGridGraphicValues | ( | double & | theXSize, |
| double & | theYSize, | ||
| double & | theOffSet ) |
Returns the rectangular grid extent.
| [out] | theXSize | width along grid X |
| [out] | theYSize | height along grid Y |
| [out] | theOffSet | plane-normal displacement of the rendered grid |
| void V3d_Viewer::RectangularGridValues | ( | double & | theXOrigin, |
| double & | theYOrigin, | ||
| double & | theXStep, | ||
| double & | theYStep, | ||
| double & | theRotationAngle ) |
Returns the rectangular grid definition.
| [out] | theXOrigin | grid origin X (snap reference) |
| [out] | theYOrigin | grid origin Y |
| [out] | theXStep | interval between two vertical lines |
| [out] | theYStep | interval between two horizontal lines |
| [out] | theRotationAngle | in-plane rotation angle, radians |
| 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.
| bool V3d_Viewer::RemoveZLayer | ( | const Graphic3d_ZLayerId | theLayerId | ) |
Remove Z layer with ID <theLayerId>. Method returns 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.
Sets the circular grid extent.
| [in] | Radius | outermost ring radius |
| [in] | OffSet | plane-normal displacement |
| void V3d_Viewer::SetCircularGridValues | ( | const double | XOrigin, |
| const double | YOrigin, | ||
| const double | RadiusStep, | ||
| const int | DivisionNumber, | ||
| const double | RotationAngle ) |
Sets the circular grid definition.
| [in] | XOrigin | grid origin X |
| [in] | YOrigin | grid origin Y |
| [in] | RadiusStep | radial interval between two concentric circles |
| [in] | DivisionNumber | number of sectors per half-circle (>= 1) |
| [in] | RotationAngle | in-plane rotation angle, radians |
|
inline |
Defines the default background colour of views attached to the viewer by supplying the color object.
|
inline |
Defines the default gradient background colours of views attached to the viewer by supplying the colour objects.
Set if by default the computed mode must be used.
| void V3d_Viewer::SetDefaultLights | ( | ) |
Activates MyLight in the viewer.
|
inline |
Set default Rendering Parameters.
|
inline |
Gives the default type of SHADING.
|
inline |
Set the default type of View (orthographic or perspective projection) to be returned by CreateView() method.
|
inline |
Sets the default projection for creating views in the viewer.
Gives a default size for the creation of views of the viewer.
|
inline |
Gives the default visualization mode.
Toggle the snap-hit echo marker drawn by ConvertToGrid() at the snapped point.
| [in] | showGrid | when TRUE, the marker is shown on every snap hit |
| void V3d_Viewer::SetGridEcho | ( | const occ::handle< Graphic3d_AspectMarker3d > & | aMarker | ) |
Replaces the default echo marker. Default attributes when this overload is not called: Aspect_TOM_STAR, Quantity_NOC_GRAY90, size 3.0.
| [in] | aMarker | custom marker aspect to use for echo display |
| void V3d_Viewer::SetLightOff | ( | ) |
Deactivate all the Lights defined in this viewer.
| void V3d_Viewer::SetLightOff | ( | const occ::handle< V3d_Light > & | theLight | ) |
Deactivates MyLight in this viewer.
| void V3d_Viewer::SetLightOn | ( | ) |
Activates all the lights defined in this viewer.
| void V3d_Viewer::SetLightOn | ( | const occ::handle< V3d_Light > & | theLight | ) |
Activates MyLight in the viewer.
| void V3d_Viewer::SetRectangularGridGraphicValues | ( | const double | XSize, |
| const double | YSize, | ||
| const double | OffSet ) |
Sets the rectangular grid extent.
| [in] | XSize | width along grid X |
| [in] | YSize | height along grid Y |
| [in] | OffSet | plane-normal displacement |
| void V3d_Viewer::SetRectangularGridValues | ( | const double | XOrigin, |
| const double | YOrigin, | ||
| const double | XStep, | ||
| const double | YStep, | ||
| const double | RotationAngle ) |
Sets the rectangular grid definition.
| [in] | XOrigin | grid origin X |
| [in] | YOrigin | grid origin Y |
| [in] | XStep | interval between two vertical lines |
| [in] | YStep | interval between two horizontal lines |
| [in] | RotationAngle | in-plane rotation angle, radians |
| void V3d_Viewer::SetViewOff | ( | ) |
Deactivates all the views of a Viewer attached to a window.
| void V3d_Viewer::SetViewOff | ( | const occ::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 V3d_Viewer::SetViewOn | ( | ) |
Activates all of the views of a viewer attached to a window.
| void V3d_Viewer::SetViewOn | ( | const occ::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 V3d_Viewer::SetZLayerSettings | ( | const Graphic3d_ZLayerId | theLayerId, |
| const Graphic3d_ZLayerSettings & | theSettings ) |
Sets the settings for a single Z layer.
| void V3d_Viewer::ShowGridEcho | ( | const occ::handle< V3d_View > & | theView, |
| const Graphic3d_Vertex & | thePoint ) |
Displays the echo marker in a single view.
| [in] | theView | view in which to draw the echo |
| [in] | thePoint | world-space snapped point |
|
inline |
Returns the structure manager associated to this viewer.
| void V3d_Viewer::UnHighlight | ( | ) | const |
UnHighlight all Objects in All the views.
| void V3d_Viewer::UpdateLights | ( | ) |
Updates the lights of all the views of a viewer.
| const Graphic3d_ZLayerSettings & V3d_Viewer::ZLayerSettings | ( | const Graphic3d_ZLayerId | theLayerId | ) | const |
Returns the settings of a single Z layer.