![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Base class of a graphical view that carries out rendering process for a concrete implementation of graphical driver. Provides virtual interfaces for redrawing its contents, management of displayed structures and render settings. The source code of the class itself implements functionality related to management of computed (HLR or "view-dependent") structures. More...
#include <Graphic3d_CView.hxx>

Public Member Functions | |
| Graphic3d_CView (const occ::handle< Graphic3d_StructureManager > &theMgr) | |
| Constructor. | |
| ~Graphic3d_CView () override | |
| Destructor. | |
| int | Identification () const |
| Returns the identification number of the view. | |
| virtual void | Activate () |
| Activates the view. Maps presentations defined within structure manager onto this view. | |
| virtual void | Deactivate () |
| Deactivates the view. Unmaps presentations defined within structure manager. The view in deactivated state will ignore actions on structures such as Display(). | |
| bool | IsActive () const |
| Returns the activity flag of the view. | |
| virtual void | Remove () |
| Erases the view and removes from graphic driver. No more graphic operations are allowed in this view after the call. | |
| bool | IsRemoved () const |
| Returns true if the view was removed. | |
| const occ::handle< Graphic3d_Camera > & | Camera () const override |
| Returns camera object of the view. | |
| virtual void | SetCamera (const occ::handle< Graphic3d_Camera > &theCamera) |
| Sets camera used by the view. | |
| virtual bool | ToFlipOutput () const |
| Returns necessity to flip OY in projection matrix. | |
| virtual void | SetToFlipOutput (const bool) |
| Sets state of flip OY necessity in projection matrix. | |
| Graphic3d_TypeOfShadingModel | ShadingModel () const |
| Returns default Shading Model of the view; Graphic3d_TypeOfShadingModel_Phong by default. | |
| void | SetShadingModel (Graphic3d_TypeOfShadingModel theModel) |
| Sets default Shading Model of the view. Will throw an exception on attempt to set Graphic3d_TypeOfShadingModel_DEFAULT. | |
| Graphic3d_TypeOfBackfacingModel | BackfacingModel () const |
| Return backfacing model used for the view; Graphic3d_TypeOfBackfacingModel_Auto by default, which means that backface culling is defined by each presentation. | |
| void | SetBackfacingModel (const Graphic3d_TypeOfBackfacingModel theModel) |
| Sets backfacing model for the view. | |
| Graphic3d_TypeOfVisualization | VisualizationType () const |
| Returns visualization type of the view. | |
| void | SetVisualizationType (const Graphic3d_TypeOfVisualization theType) |
| Sets visualization type of the view. | |
| Graphic3d_ZLayerId | ZLayerTarget () const |
| Returns ZLayerId target. | |
| void | SetZLayerTarget (const Graphic3d_ZLayerId theTarget) |
| Sets ZLayerId target. | |
| bool | ZLayerRedrawMode () const |
| Returns ZLayerId redraw mode. | |
| void | SetZLayerRedrawMode (const bool theMode) |
| Sets ZLayerId redraw mode. | |
| void | SetComputedMode (const bool theMode) |
| Switches computed HLR mode in the view. | |
| bool | ComputedMode () const |
| Returns the computed HLR mode state. | |
| void | ReCompute (const occ::handle< Graphic3d_Structure > &theStructure) |
| Computes the new presentation of the structure displayed in this view with the type Graphic3d_TOS_COMPUTED. | |
| void | Update (const Graphic3d_ZLayerId theLayerId=Graphic3d_ZLayerId_UNKNOWN) |
| Invalidates bounding box of specified ZLayerId. | |
| void | Compute () |
| Computes the new presentation of the structures displayed in this view with the type Graphic3d_TOS_COMPUTED. | |
| void | DisplayedStructures (NCollection_Map< occ::handle< Graphic3d_Structure > > &theStructures) const |
| Returns the set of structures displayed in this view. | |
| virtual int | NumberOfDisplayedStructures () const |
| Returns number of displayed structures in the view. | |
| bool | IsComputed (const int theStructId, occ::handle< Graphic3d_Structure > &theComputedStruct) const |
| Returns true in case if the structure with the given <theStructId> is in list of structures to be computed and stores computed struct to <theComputedStruct>. | |
| virtual Bnd_Box | MinMaxValues (const bool theToIncludeAuxiliary=false) const |
| Returns the bounding box of all structures displayed in the view. If theToIncludeAuxiliary is TRUE, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite and other auxiliary structures. | |
| Bnd_Box | MinMaxValues (const NCollection_Map< occ::handle< Graphic3d_Structure > > &theSet, const bool theToIncludeAuxiliary=false) const |
| Returns the coordinates of the boundary box of all structures in the set <theSet>. If <theToIgnoreInfiniteFlag> is TRUE, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite structures. | |
| const occ::handle< Graphic3d_StructureManager > & | StructureManager () const |
| Returns the structure manager handle which manage structures associated with this view. | |
| virtual void | Redraw ()=0 |
| Redraw content of the view. | |
| virtual void | RedrawImmediate ()=0 |
| Redraw immediate content of the view. | |
| virtual void | Invalidate ()=0 |
| Invalidates content of the view but does not redraw it. | |
| virtual bool | IsInvalidated ()=0 |
| Return true if view content cache has been invalidated. | |
| virtual void | Resized ()=0 |
| Handle changing size of the rendering window. | |
| virtual bool | SetImmediateModeDrawToFront (const bool theDrawToFrontBuffer)=0 |
| virtual void | SetWindow (const occ::handle< Graphic3d_CView > &theParentVIew, const occ::handle< Aspect_Window > &theWindow, const Aspect_RenderingContext theContext)=0 |
| Creates and maps rendering window to the view. | |
| virtual occ::handle< Aspect_Window > | Window () const =0 |
| Returns the window associated to the view. | |
| virtual bool | IsDefined () const =0 |
| Returns True if the window associated to the view is defined. | |
| virtual bool | BufferDump (Image_PixMap &theImage, const Graphic3d_BufferType &theBufferType)=0 |
| Dump active rendering buffer into specified memory buffer. | |
| virtual bool | ShadowMapDump (Image_PixMap &theImage, const TCollection_AsciiString &theLightName)=0 |
| Dumps the graphical contents of a shadowmap framebuffer into an image. | |
| virtual void | InvalidateBVHData (const Graphic3d_ZLayerId theLayerId)=0 |
| Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated. | |
| virtual void | InsertLayerBefore (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerAfter)=0 |
| Add a layer to the view. | |
| virtual void | InsertLayerAfter (const Graphic3d_ZLayerId theNewLayerId, const Graphic3d_ZLayerSettings &theSettings, const Graphic3d_ZLayerId theLayerBefore)=0 |
| Add a layer to the view. | |
| virtual int | ZLayerMax () const =0 |
| Returns the maximum Z layer ID. First layer ID is Graphic3d_ZLayerId_Default, last ID is ZLayerMax(). | |
| virtual const NCollection_List< occ::handle< Graphic3d_Layer > > & | Layers () const =0 |
| Returns the list of layers. | |
| virtual occ::handle< Graphic3d_Layer > | Layer (const Graphic3d_ZLayerId theLayerId) const =0 |
| Returns layer with given ID or NULL if undefined. | |
| virtual void | InvalidateZLayerBoundingBox (const Graphic3d_ZLayerId theLayerId) |
| Returns the bounding box of all structures displayed in the Z layer. | |
| virtual void | RemoveZLayer (const Graphic3d_ZLayerId theLayerId)=0 |
| Remove Z layer from the specified view. All structures displayed at the moment in layer will be displayed in default layer ( the bottom-level z layer ). To unset layer ID from associated structures use method UnsetZLayer (...). | |
| virtual void | SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings &theSettings)=0 |
| Sets the settings for a single Z layer of specified view. | |
| double | ConsiderZoomPersistenceObjects () |
| Returns zoom-scale factor. | |
| virtual occ::handle< Standard_Transient > | FBO () const =0 |
| Returns pointer to an assigned framebuffer object. | |
| virtual void | SetFBO (const occ::handle< Standard_Transient > &theFbo)=0 |
| Sets framebuffer object for offscreen rendering. | |
| virtual occ::handle< Standard_Transient > | FBOCreate (const int theWidth, const int theHeight)=0 |
| Generate offscreen FBO in the graphic library. If not supported on hardware returns NULL. | |
| virtual void | FBORelease (occ::handle< Standard_Transient > &theFbo)=0 |
| Remove offscreen FBO from the graphic library. | |
| virtual void | FBOGetDimensions (const occ::handle< Standard_Transient > &theFbo, int &theWidth, int &theHeight, int &theWidthMax, int &theHeightMax)=0 |
| Read offscreen FBO configuration. | |
| virtual void | FBOChangeViewport (const occ::handle< Standard_Transient > &theFbo, const int theWidth, const int theHeight)=0 |
| Change offscreen FBO viewport. | |
| virtual void | CopySettings (const occ::handle< Graphic3d_CView > &theOther) |
| Copy visualization settings from another view. Method is used for cloning views in viewer when its required to create view with same view properties. | |
| const Graphic3d_RenderingParams & | RenderingParams () const |
| Returns current rendering parameters and effect settings. | |
| Graphic3d_RenderingParams & | ChangeRenderingParams () |
| Returns reference to current rendering parameters and effect settings. | |
| virtual Aspect_Background | Background () const |
| Returns background fill color. | |
| virtual void | SetBackground (const Aspect_Background &theBackground) |
| Sets background fill color. | |
| virtual Aspect_GradientBackground | GradientBackground () const =0 |
| Returns gradient background fill colors. | |
| virtual void | SetGradientBackground (const Aspect_GradientBackground &theBackground)=0 |
| Sets gradient background fill colors. | |
| const occ::handle< Graphic3d_TextureMap > & | BackgroundImage () |
| Returns background image texture map. | |
| const occ::handle< Graphic3d_CubeMap > & | BackgroundCubeMap () const |
| Returns cubemap being set last time on background. | |
| const occ::handle< Graphic3d_CubeMap > & | IBLCubeMap () const |
| Returns cubemap being set last time on background. | |
| virtual void | SetBackgroundImage (const occ::handle< Graphic3d_TextureMap > &theTextureMap, bool theToUpdatePBREnv=true)=0 |
| Sets image texture or environment cubemap as background. | |
| virtual Aspect_FillMethod | BackgroundImageStyle () const =0 |
| Returns background image fill style. | |
| virtual void | SetBackgroundImageStyle (const Aspect_FillMethod theFillStyle)=0 |
| Sets background image fill style. | |
| Graphic3d_TypeOfBackground | BackgroundType () const |
| Returns background type. | |
| void | SetBackgroundType (Graphic3d_TypeOfBackground theType) |
| Sets background type. | |
| const Aspect_SkydomeBackground & | BackgroundSkydome () const |
| Returns skydome aspect;. | |
| void | SetBackgroundSkydome (const Aspect_SkydomeBackground &theAspect, bool theToUpdatePBREnv=true) |
| Sets skydome aspect. | |
| virtual void | SetImageBasedLighting (bool theToEnableIBL)=0 |
| Enables or disables IBL (Image Based Lighting) from background cubemap. Has no effect if PBR is not used. | |
| virtual void | GridDisplay (const Aspect_GridParams &theParams, const gp_Ax3 &thePlane) |
| Display a shader-rendered grid on the given plane. The default implementation is a no-op; drivers with shader support override it. | |
| virtual void | GridErase () |
| Erase the shader-rendered grid. The default implementation is a no-op; drivers with shader support override it. | |
| const occ::handle< Graphic3d_TextureEnv > & | TextureEnv () const |
| Returns environment texture set for the view. | |
| virtual void | SetTextureEnv (const occ::handle< Graphic3d_TextureEnv > &theTextureEnv)=0 |
| Sets environment texture for the view. | |
| virtual const occ::handle< Graphic3d_LightSet > & | Lights () const =0 |
| Returns list of lights of the view. | |
| virtual void | SetLights (const occ::handle< Graphic3d_LightSet > &theLights)=0 |
| Sets list of lights for the view. | |
| virtual const occ::handle< Graphic3d_SequenceOfHClipPlane > & | ClipPlanes () const =0 |
| Returns list of clip planes set for the view. | |
| virtual void | SetClipPlanes (const occ::handle< Graphic3d_SequenceOfHClipPlane > &thePlanes)=0 |
| Sets list of clip planes for the view. | |
| virtual void | DiagnosticInformation (NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > &theDict, Graphic3d_DiagnosticInfo theFlags) const =0 |
| Fill in the dictionary with diagnostic info. Should be called within rendering thread. | |
| virtual TCollection_AsciiString | StatisticInformation () const =0 |
| Returns string with statistic performance info. | |
| virtual void | StatisticInformation (NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > &theDict) const =0 |
| Fills in the dictionary with statistic performance info. | |
| double | UnitFactor () const |
| Return unit scale factor defined as scale factor for m (meters); 1.0 by default. Normally, view definition is unitless, however some operations like VR input requires proper units mapping. | |
| void | SetUnitFactor (double theFactor) |
| Set unit scale factor. | |
| const occ::handle< Aspect_XRSession > & | XRSession () const |
| Return XR session. | |
| void | SetXRSession (const occ::handle< Aspect_XRSession > &theSession) |
| Set XR session. | |
| bool | IsActiveXR () const |
| Return TRUE if there is active XR session. | |
| virtual bool | InitXR () |
| Initialize XR session. | |
| virtual void | ReleaseXR () |
| Release XR session. | |
| virtual void | ProcessXRInput () |
| Process input. | |
| void | SetupXRPosedCamera () |
| Compute PosedXRCamera() based on current XR head pose and make it active. | |
| void | UnsetXRPosedCamera () |
| Set current camera back to BaseXRCamera() and copy temporary modifications of PosedXRCamera(). Calls SynchronizeXRPosedToBaseCamera() beforehand. | |
| const occ::handle< Graphic3d_Camera > & | PosedXRCamera () const |
| Returns transient XR camera position with tracked head orientation applied. | |
| void | SetPosedXRCamera (const occ::handle< Graphic3d_Camera > &theCamera) |
| Sets transient XR camera position with tracked head orientation applied. | |
| const occ::handle< Graphic3d_Camera > & | BaseXRCamera () const |
| Returns anchor camera definition (without tracked head orientation). | |
| void | SetBaseXRCamera (const occ::handle< Graphic3d_Camera > &theCamera) |
| Sets anchor camera definition. | |
| gp_Trsf | PoseXRToWorld (const gp_Trsf &thePoseXR) const |
| Convert XR pose to world space. | |
| gp_Ax1 | ViewAxisInWorld (const gp_Trsf &thePoseXR) const |
| Returns view direction in the world space based on XR pose. | |
| void | SynchronizeXRBaseToPosedCamera () |
| Recomputes PosedXRCamera() based on BaseXRCamera() and head orientation. | |
| void | SynchronizeXRPosedToBaseCamera () |
| Checks if PosedXRCamera() has been modified since SetupXRPosedCamera() and copies these modifications to BaseXRCamera(). | |
| void | ComputeXRPosedCameraFromBase (Graphic3d_Camera &theCam, const gp_Trsf &theXRTrsf) const |
| Compute camera position based on XR pose. | |
| void | ComputeXRBaseCameraFromPosed (const Graphic3d_Camera &theCamPosed, const gp_Trsf &thePoseTrsf) |
| Update based camera from posed camera by applying reversed transformation. | |
| void | TurnViewXRCamera (const gp_Trsf &theTrsfTurn) |
| Turn XR camera direction using current (head) eye position as anchor. | |
obsolete Graduated Trihedron functionality | |
Returns data of a graduated trihedron | |
| virtual const Graphic3d_GraduatedTrihedron & | GetGraduatedTrihedron () |
| Displays Graduated Trihedron. | |
| virtual void | GraduatedTrihedronDisplay (const Graphic3d_GraduatedTrihedron &theTrihedronData) |
| Displays Graduated Trihedron. | |
| virtual void | GraduatedTrihedronErase () |
| Erases Graduated Trihedron. | |
| virtual void | GraduatedTrihedronMinMaxValues (const NCollection_Vec3< float > theMin, const NCollection_Vec3< float > theMax) |
| Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object. | |
| void | DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override |
| Dumps the content of me into the stream. | |
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. | |
subview properties | |
Return TRUE if this is a subview of another view. | |
| int | myId |
| list of child views | |
| Graphic3d_RenderingParams | myRenderParams |
| list of child views | |
| NCollection_Sequence< occ::handle< Graphic3d_CView > > | mySubviews |
| list of child views | |
| Graphic3d_CView * | myParentView |
| back-pointer to the parent view | |
| bool | myIsSubviewComposer |
| flag to skip rendering of viewer contents | |
| Aspect_TypeOfTriedronPosition | mySubviewCorner |
| position within parent view | |
| NCollection_Vec2< int > | mySubviewTopLeft |
| subview top-left position relative to parent view | |
| NCollection_Vec2< int > | mySubviewMargins |
| subview margins in pixels | |
| NCollection_Vec2< double > | mySubviewSize |
| subview size | |
| NCollection_Vec2< double > | mySubviewOffset |
| subview corner offset within parent view | |
| occ::handle< Graphic3d_StructureManager > | myStructureManager |
| list of child views | |
| occ::handle< Graphic3d_Camera > | myCamera |
| list of child views | |
| NCollection_Sequence< occ::handle< Graphic3d_Structure > > | myStructsToCompute |
| list of child views | |
| NCollection_Sequence< occ::handle< Graphic3d_Structure > > | myStructsComputed |
| list of child views | |
| NCollection_Map< occ::handle< Graphic3d_Structure > > | myStructsDisplayed |
| list of child views | |
| bool | myIsInComputedMode |
| list of child views | |
| bool | myIsActive |
| list of child views | |
| bool | myIsRemoved |
| list of child views | |
| Graphic3d_TypeOfBackfacingModel | myBackfacing |
| list of child views | |
| Graphic3d_TypeOfVisualization | myVisualization |
| list of child views | |
| Graphic3d_ZLayerId | myZLayerTarget |
| ZLayerId for redrawing the content of specific zlayers. | |
| bool | myZLayerRedrawMode |
| If true redraws single layer, otherwise redraws group of layers. | |
| Quantity_ColorRGBA | myBgColor |
| list of child views | |
| occ::handle< Graphic3d_TextureMap > | myBackgroundImage |
| list of child views | |
| occ::handle< Graphic3d_CubeMap > | myCubeMapBackground |
| Cubemap displayed at background. | |
| occ::handle< Graphic3d_CubeMap > | myCubeMapIBL |
| Cubemap used for environment lighting. | |
| occ::handle< Graphic3d_TextureEnv > | myTextureEnvData |
| list of child views | |
| Graphic3d_GraduatedTrihedron | myGTrihedronData |
| list of child views | |
| Graphic3d_TypeOfBackground | myBackgroundType |
| Current type of background. | |
| Aspect_SkydomeBackground | mySkydomeAspect |
| list of child views | |
| bool | myToUpdateSkydome |
| list of child views | |
| occ::handle< Aspect_XRSession > | myXRSession |
| list of child views | |
| occ::handle< Graphic3d_Camera > | myBackXRCamera |
| camera projection parameters to restore after closing XR session (FOV, aspect and similar) | |
| occ::handle< Graphic3d_Camera > | myBaseXRCamera |
| neutral camera orientation defining coordinate system in which head tracking is defined | |
| occ::handle< Graphic3d_Camera > | myPosedXRCamera |
| transient XR camera orientation with tracked head orientation applied (based on myBaseXRCamera) | |
| occ::handle< Graphic3d_Camera > | myPosedXRCameraCopy |
| neutral camera orientation copy at the beginning of processing input | |
| double | myUnitFactor |
| unit scale factor defined as scale factor for m (meters) | |
| bool | IsSubview () const |
| list of child views | |
| Graphic3d_CView * | ParentView () |
| Return parent View or NULL if this is not a subview. | |
| bool | IsSubviewComposer () const |
| Return TRUE if this is view performs rendering of subviews and nothing else; FALSE by default. By default, view with subviews will render main scene and blit subviews on top of it. Rendering of main scene might become redundant in case if subviews cover entire window of parent view. This flag allows to disable rendering of the main scene in such scenarios without creation of a dedicated V3d_Viewer instance just for composing subviews. | |
| void | SetSubviewComposer (bool theIsComposer) |
| Set if this view should perform composing of subviews and nothing else. | |
| const NCollection_Sequence< occ::handle< Graphic3d_CView > > & | Subviews () const |
| Return subview list. | |
| void | AddSubview (const occ::handle< Graphic3d_CView > &theView) |
| Add subview to the list. | |
| bool | RemoveSubview (const Graphic3d_CView *theView) |
| Remove subview from the list. | |
| Aspect_TypeOfTriedronPosition | SubviewCorner () const |
| Return subview position within parent view; Aspect_TOTP_LEFT_UPPER by default. | |
| void | SetSubviewCorner (Aspect_TypeOfTriedronPosition thePos) |
| Set subview position within parent view. | |
| const NCollection_Vec2< int > & | SubviewTopLeft () const |
| Return subview top-left position relative to parent view in pixels. | |
| bool | IsSubViewRelativeSize () const |
| Return TRUE if subview size is set as proportions relative to parent view. | |
| const NCollection_Vec2< double > & | SubviewSize () const |
| Return subview dimensions; (1.0, 1.0) by default. Values >= 2 define size in pixels; Values <= 1.0 define size as fraction of parent view. | |
| void | SetSubviewSize (const NCollection_Vec2< double > &theSize) |
| Set subview size relative to parent view. | |
| const NCollection_Vec2< double > & | SubviewOffset () const |
| Return corner offset within parent view; (0.0,0.0) by default. Values >= 2 define offset in pixels; Values <= 1.0 define offset as fraction of parent view dimensions. | |
| void | SetSubviewOffset (const NCollection_Vec2< double > &theOffset) |
| Set corner offset within parent view. | |
| const NCollection_Vec2< int > & | SubviewMargins () const |
| Return subview margins in pixels; (0,0) by default. | |
| void | SetSubviewMargins (const NCollection_Vec2< int > &theMargins) |
| Set subview margins in pixels. | |
| void | SubviewResized (const occ::handle< Aspect_NeutralWindow > &theWindow) |
| Update subview position and dimensions. | |
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. | |
Protected Member Functions inherited from Graphic3d_DataStructureManager | |
| Graphic3d_DataStructureManager () | |
| Initializes the manager <me>. | |
Base class of a graphical view that carries out rendering process for a concrete implementation of graphical driver. Provides virtual interfaces for redrawing its contents, management of displayed structures and render settings. The source code of the class itself implements functionality related to management of computed (HLR or "view-dependent") structures.
| Graphic3d_CView::Graphic3d_CView | ( | const occ::handle< Graphic3d_StructureManager > & | theMgr | ) |
Constructor.
|
override |
Destructor.
Activates the view. Maps presentations defined within structure manager onto this view.
| void Graphic3d_CView::AddSubview | ( | const occ::handle< Graphic3d_CView > & | theView | ) |
Add subview to the list.
|
inline |
Return backfacing model used for the view; Graphic3d_TypeOfBackfacingModel_Auto by default, which means that backface culling is defined by each presentation.
|
inlinevirtual |
Returns background fill color.
|
inline |
Returns cubemap being set last time on background.
|
inline |
Returns background image texture map.
|
pure virtual |
Returns background image fill style.
Implemented in OpenGl_View.
|
inline |
Returns skydome aspect;.
|
inline |
Returns background type.
|
inline |
Returns anchor camera definition (without tracked head orientation).
|
pure virtual |
Dump active rendering buffer into specified memory buffer.
Implemented in OpenGl_View.
|
inlineoverridevirtual |
Returns camera object of the view.
Implements Graphic3d_DataStructureManager.
|
inline |
Returns reference to current rendering parameters and effect settings.
|
pure virtual |
Returns list of clip planes set for the view.
Implemented in OpenGl_View.
| void Graphic3d_CView::Compute | ( | ) |
Computes the new presentation of the structures displayed in this view with the type Graphic3d_TOS_COMPUTED.
|
inline |
Returns the computed HLR mode state.
| void Graphic3d_CView::ComputeXRBaseCameraFromPosed | ( | const Graphic3d_Camera & | theCamPosed, |
| const gp_Trsf & | thePoseTrsf ) |
Update based camera from posed camera by applying reversed transformation.
| void Graphic3d_CView::ComputeXRPosedCameraFromBase | ( | Graphic3d_Camera & | theCam, |
| const gp_Trsf & | theXRTrsf ) const |
Compute camera position based on XR pose.
| double Graphic3d_CView::ConsiderZoomPersistenceObjects | ( | ) |
Returns zoom-scale factor.
|
virtual |
Copy visualization settings from another view. Method is used for cloning views in viewer when its required to create view with same view properties.
Deactivates the view. Unmaps presentations defined within structure manager. The view in deactivated state will ignore actions on structures such as Display().
|
pure virtual |
Fill in the dictionary with diagnostic info. Should be called within rendering thread.
This API should be used only for user output or for creating automated reports. The format of returned information (e.g. key-value layout) is NOT part of this API and can be changed at any time. Thus application should not parse returned information to weed out specific parameters.
Implemented in D3DHost_View, and OpenGl_View.
| void Graphic3d_CView::DisplayedStructures | ( | NCollection_Map< occ::handle< Graphic3d_Structure > > & | theStructures | ) | const |
Returns the set of structures displayed in this view.
|
overridevirtual |
Dumps the content of me into the stream.
Reimplemented from Graphic3d_DataStructureManager.
|
pure virtual |
Returns pointer to an assigned framebuffer object.
Implemented in OpenGl_View.
|
pure virtual |
Change offscreen FBO viewport.
Implemented in OpenGl_View.
|
pure virtual |
Generate offscreen FBO in the graphic library. If not supported on hardware returns NULL.
Implemented in OpenGl_View.
|
pure virtual |
Read offscreen FBO configuration.
Implemented in OpenGl_View.
|
pure virtual |
Remove offscreen FBO from the graphic library.
Implemented in OpenGl_View.
|
inlinevirtual |
Displays Graduated Trihedron.
|
pure virtual |
Returns gradient background fill colors.
Implemented in OpenGl_View.
|
inlinevirtual |
Displays Graduated Trihedron.
Reimplemented in OpenGl_View.
Erases Graduated Trihedron.
Reimplemented in OpenGl_View.
|
inlinevirtual |
Sets minimum and maximum points of scene bounding box for Graduated Trihedron stored in graphic view object.
| [in] | theMin | the minimum point of scene. |
| [in] | theMax | the maximum point of scene. |
Reimplemented in OpenGl_View.
|
inlinevirtual |
Display a shader-rendered grid on the given plane. The default implementation is a no-op; drivers with shader support override it.
| [in] | theParams | appearance parameters |
| [in] | thePlane | grid plane in world coordinates (origin + X/Y directions) |
Reimplemented in OpenGl_View.
Erase the shader-rendered grid. The default implementation is a no-op; drivers with shader support override it.
Reimplemented in OpenGl_View.
|
inline |
Returns cubemap being set last time on background.
|
inline |
Returns the identification number of the view.
|
pure virtual |
Add a layer to the view.
| [in] | theNewLayerId | id of new layer, should be > 0 (negative values are reserved for default layers). |
| [in] | theSettings | new layer settings |
| [in] | theLayerBefore | id of layer to append new layer after |
Implemented in OpenGl_View.
|
pure virtual |
Add a layer to the view.
| [in] | theNewLayerId | id of new layer, should be > 0 (negative values are reserved for default layers). |
| [in] | theSettings | new layer settings |
| [in] | theLayerAfter | id of layer to append new layer before |
Implemented in OpenGl_View.
Invalidates content of the view but does not redraw it.
Implemented in OpenGl_View.
|
pure virtual |
Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated.
Implemented in OpenGl_View.
|
virtual |
Returns the bounding box of all structures displayed in the Z layer.
|
inline |
Returns the activity flag of the view.
| bool Graphic3d_CView::IsActiveXR | ( | ) | const |
Return TRUE if there is active XR session.
| bool Graphic3d_CView::IsComputed | ( | const int | theStructId, |
| occ::handle< Graphic3d_Structure > & | theComputedStruct ) const |
Returns true in case if the structure with the given <theStructId> is in list of structures to be computed and stores computed struct to <theComputedStruct>.
Returns True if the window associated to the view is defined.
Implemented in OpenGl_View.
Return true if view content cache has been invalidated.
Implemented in OpenGl_View.
|
inline |
Returns true if the view was removed.
|
inline |
list of child views
|
inline |
Return TRUE if this is view performs rendering of subviews and nothing else; FALSE by default. By default, view with subviews will render main scene and blit subviews on top of it. Rendering of main scene might become redundant in case if subviews cover entire window of parent view. This flag allows to disable rendering of the main scene in such scenarios without creation of a dedicated V3d_Viewer instance just for composing subviews.
|
inline |
Return TRUE if subview size is set as proportions relative to parent view.
|
pure virtual |
Returns layer with given ID or NULL if undefined.
Implemented in OpenGl_View.
|
pure virtual |
Returns the list of layers.
Implemented in OpenGl_View.
|
pure virtual |
Returns list of lights of the view.
Implemented in OpenGl_View.
|
virtual |
Returns the bounding box of all structures displayed in the view. If theToIncludeAuxiliary is TRUE, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite and other auxiliary structures.
| theToIncludeAuxiliary | consider also auxiliary presentations (with infinite flag or with trihedron transformation persistence) |
Reimplemented in OpenGl_View.
| Bnd_Box Graphic3d_CView::MinMaxValues | ( | const NCollection_Map< occ::handle< Graphic3d_Structure > > & | theSet, |
| const bool | theToIncludeAuxiliary = false ) const |
Returns the coordinates of the boundary box of all structures in the set <theSet>. If <theToIgnoreInfiniteFlag> is TRUE, then the boundary box also includes minimum and maximum limits of graphical elements forming parts of infinite structures.
Returns number of displayed structures in the view.
|
inline |
Return parent View or NULL if this is not a subview.
|
inline |
Returns transient XR camera position with tracked head orientation applied.
Convert XR pose to world space.
| [in] | thePoseXR | transformation defined in VR local coordinate system, oriented as Y-up, X-right and -Z-forward |
| void Graphic3d_CView::ReCompute | ( | const occ::handle< Graphic3d_Structure > & | theStructure | ) |
Computes the new presentation of the structure displayed in this view with the type Graphic3d_TOS_COMPUTED.
Redraw content of the view.
Implemented in D3DHost_View, and OpenGl_View.
Redraw immediate content of the view.
Implemented in D3DHost_View, and OpenGl_View.
Erases the view and removes from graphic driver. No more graphic operations are allowed in this view after the call.
Reimplemented in OpenGl_View.
| bool Graphic3d_CView::RemoveSubview | ( | const Graphic3d_CView * | theView | ) |
Remove subview from the list.
|
pure virtual |
Remove Z layer from the specified view. All structures displayed at the moment in layer will be displayed in default layer ( the bottom-level z layer ). To unset layer ID from associated structures use method UnsetZLayer (...).
Implemented in OpenGl_View.
|
inline |
Returns current rendering parameters and effect settings.
Handle changing size of the rendering window.
Implemented in D3DHost_View, and OpenGl_View.
|
inline |
Sets backfacing model for the view.
|
inlinevirtual |
Sets background fill color.
|
pure virtual |
Sets image texture or environment cubemap as background.
| [in] | theTextureMap | source to set a background; should be either Graphic3d_Texture2D or Graphic3d_CubeMap |
| [in] | theToUpdatePBREnv | defines whether IBL maps will be generated or not (see GeneratePBREnvironment()) |
Implemented in OpenGl_View.
|
pure virtual |
Sets background image fill style.
Implemented in OpenGl_View.
| void Graphic3d_CView::SetBackgroundSkydome | ( | const Aspect_SkydomeBackground & | theAspect, |
| bool | theToUpdatePBREnv = true ) |
Sets skydome aspect.
|
inline |
Sets background type.
|
inline |
Sets anchor camera definition.
|
inlinevirtual |
Sets camera used by the view.
|
pure virtual |
Sets list of clip planes for the view.
Implemented in OpenGl_View.
|
pure virtual |
Sets framebuffer object for offscreen rendering.
Implemented in OpenGl_View.
|
pure virtual |
Sets gradient background fill colors.
Implemented in OpenGl_View.
Enables or disables IBL (Image Based Lighting) from background cubemap. Has no effect if PBR is not used.
| [in] | theToEnableIBL | enable or disable IBL from background cubemap |
Implemented in OpenGl_View.
|
pure virtual |
| theDrawToFrontBuffer | Advanced option to modify rendering mode:
|
Implemented in OpenGl_View.
|
pure virtual |
Sets list of lights for the view.
Implemented in OpenGl_View.
|
inline |
Sets transient XR camera position with tracked head orientation applied.
| void Graphic3d_CView::SetShadingModel | ( | Graphic3d_TypeOfShadingModel | theModel | ) |
Sets default Shading Model of the view. Will throw an exception on attempt to set Graphic3d_TypeOfShadingModel_DEFAULT.
Set if this view should perform composing of subviews and nothing else.
|
inline |
Set subview position within parent view.
|
inline |
Set subview margins in pixels.
|
inline |
Set corner offset within parent view.
|
inline |
Set subview size relative to parent view.
|
pure virtual |
Sets environment texture for the view.
Implemented in OpenGl_View.
Sets state of flip OY necessity in projection matrix.
Reimplemented in OpenGl_View.
| void Graphic3d_CView::SetupXRPosedCamera | ( | ) |
Compute PosedXRCamera() based on current XR head pose and make it active.
|
inline |
Sets visualization type of the view.
|
pure virtual |
Creates and maps rendering window to the view.
| [in] | theParentVIew | parent view or NULL |
| [in] | theWindow | the window |
| [in] | theContext | the rendering context; if NULL the context will be created internally |
Implemented in D3DHost_View, and OpenGl_View.
|
inline |
Set XR session.
|
pure virtual |
Sets the settings for a single Z layer of specified view.
Implemented in OpenGl_View.
|
inline |
Sets ZLayerId target.
|
inline |
Returns default Shading Model of the view; Graphic3d_TypeOfShadingModel_Phong by default.
|
pure virtual |
Dumps the graphical contents of a shadowmap framebuffer into an image.
| theImage | the image to store the shadow map. | |
| [in] | theLightName | name of the light used to generate the shadow map. |
Implemented in OpenGl_View.
|
pure virtual |
Returns string with statistic performance info.
Implemented in OpenGl_View.
|
pure virtual |
Fills in the dictionary with statistic performance info.
Implemented in OpenGl_View.
|
inline |
Returns the structure manager handle which manage structures associated with this view.
|
inline |
Return subview position within parent view; Aspect_TOTP_LEFT_UPPER by default.
|
inline |
Return subview margins in pixels; (0,0) by default.
|
inline |
| void Graphic3d_CView::SubviewResized | ( | const occ::handle< Aspect_NeutralWindow > & | theWindow | ) |
Update subview position and dimensions.
|
inline |
Return subview list.
|
inline |
|
inline |
Return subview top-left position relative to parent view in pixels.
| void Graphic3d_CView::SynchronizeXRBaseToPosedCamera | ( | ) |
Recomputes PosedXRCamera() based on BaseXRCamera() and head orientation.
| void Graphic3d_CView::SynchronizeXRPosedToBaseCamera | ( | ) |
Checks if PosedXRCamera() has been modified since SetupXRPosedCamera() and copies these modifications to BaseXRCamera().
|
inline |
Returns environment texture set for the view.
Returns necessity to flip OY in projection matrix.
Reimplemented in OpenGl_View.
Turn XR camera direction using current (head) eye position as anchor.
|
inline |
Return unit scale factor defined as scale factor for m (meters); 1.0 by default. Normally, view definition is unitless, however some operations like VR input requires proper units mapping.
| void Graphic3d_CView::UnsetXRPosedCamera | ( | ) |
Set current camera back to BaseXRCamera() and copy temporary modifications of PosedXRCamera(). Calls SynchronizeXRPosedToBaseCamera() beforehand.
| void Graphic3d_CView::Update | ( | const Graphic3d_ZLayerId | theLayerId = Graphic3d_ZLayerId_UNKNOWN | ) |
Invalidates bounding box of specified ZLayerId.
Returns view direction in the world space based on XR pose.
| [in] | thePoseXR | transformation defined in VR local coordinate system, oriented as Y-up, X-right and -Z-forward |
|
inline |
Returns visualization type of the view.
|
pure virtual |
Returns the window associated to the view.
Implemented in OpenGl_View.
|
inline |
Return XR session.
Returns the maximum Z layer ID. First layer ID is Graphic3d_ZLayerId_Default, last ID is ZLayerMax().
Implemented in OpenGl_View.
|
inline |
Returns ZLayerId redraw mode.
|
inline |
Returns ZLayerId target.
|
protected |
list of child views
|
protected |
list of child views
|
protected |
Current type of background.
|
protected |
camera projection parameters to restore after closing XR session (FOV, aspect and similar)
|
protected |
neutral camera orientation defining coordinate system in which head tracking is defined
|
protected |
list of child views
|
protected |
list of child views
|
protected |
Cubemap displayed at background.
|
protected |
Cubemap used for environment lighting.
|
protected |
list of child views
|
protected |
list of child views
|
protected |
list of child views
|
protected |
list of child views
|
protected |
list of child views
|
protected |
flag to skip rendering of viewer contents
|
protected |
back-pointer to the parent view
|
protected |
transient XR camera orientation with tracked head orientation applied (based on myBaseXRCamera)
|
protected |
neutral camera orientation copy at the beginning of processing input
|
protected |
list of child views
|
protected |
list of child views
|
protected |
list of child views
|
protected |
list of child views
|
protected |
list of child views
|
protected |
list of child views
|
protected |
position within parent view
|
protected |
subview margins in pixels
|
protected |
subview corner offset within parent view
|
protected |
list of child views
|
protected |
subview size
|
protected |
subview top-left position relative to parent view
|
protected |
list of child views
|
protected |
list of child views
|
protected |
unit scale factor defined as scale factor for m (meters)
|
protected |
list of child views
|
protected |
list of child views
|
protected |
If true redraws single layer, otherwise redraws group of layers.
|
protected |
ZLayerId for redrawing the content of specific zlayers.