Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
V3d_View Class Reference

Defines the application object VIEW for the VIEWER application. The methods of this class allow the editing and inquiring the parameters linked to the view. Provides a set of services common to all types of view. Warning: The default parameters are defined by the class Viewer (Example : SetDefaultViewSize()). Certain methods are mouse oriented, and it is necessary to know the difference between the start and the continuation of this gesture in putting the method into operation. Example : Shifting the eye-view along the screen axes. More...

#include <V3d_View.hxx>

Inheritance diagram for V3d_View:
Inheritance graph
[legend]

Public Member Functions

 V3d_View (const occ::handle< V3d_Viewer > &theViewer, const V3d_TypeOfView theType=V3d_ORTHOGRAPHIC)
 Initializes the view.
 
 V3d_View (const occ::handle< V3d_Viewer > &theViewer, const occ::handle< V3d_View > &theView)
 Initializes the view by copying.
 
 ~V3d_View () override
 Default destructor.
 
void SetWindow (const occ::handle< Aspect_Window > &theWindow, const Aspect_RenderingContext theContext=nullptr)
 Activates the view in the specified Window If <aContext> is not NULL the graphic context is used to draw something in this view. Otherwise an internal graphic context is created. Warning: The view is centered and resized to preserve the height/width ratio of the window.
 
void SetWindow (const occ::handle< V3d_View > &theParentView, const NCollection_Vec2< double > &theSize, Aspect_TypeOfTriedronPosition theCorner=Aspect_TOTP_LEFT_UPPER, const NCollection_Vec2< double > &theOffset=NCollection_Vec2< double >(), const NCollection_Vec2< int > &theMargins=NCollection_Vec2< int >())
 Activates the view as subview of another view.
 
void SetMagnify (const occ::handle< Aspect_Window > &theWindow, const occ::handle< V3d_View > &thePreviousView, const int theX1, const int theY1, const int theX2, const int theY2)
 
void Remove ()
 Destroys the view.
 
void Update () const
 Deprecated, Redraw() should be used instead.
 
virtual void Redraw () const
 Redisplays the view even if there has not been any modification. Must be called if the view is shown. (Ex: DeIconification ) .
 
virtual void RedrawImmediate () const
 Updates layer of immediate presentations.
 
void Invalidate () const
 Invalidates view content but does not redraw it.
 
bool IsInvalidated () const
 Returns true if cached view content has been invalidated.
 
bool IsInvalidatedImmediate () const
 Returns true if immediate layer content has been invalidated.
 
void InvalidateImmediate ()
 Invalidates view content within immediate layer but does not redraw it.
 
void MustBeResized ()
 Must be called when the window supporting the view changes size. if the view is not mapped on a window. Warning: The view is centered and resized to preserve the height/width ratio of the window.
 
void DoMapping ()
 Must be called when the window supporting the view is mapped or unmapped.
 
bool IsEmpty () const
 Returns the status of the view regarding the displayed structures inside Returns True is The View is empty.
 
void UpdateLights () const
 Updates the lights of the view.
 
void SetAutoZFitMode (const bool theIsOn, const double theScaleFactor=1.0)
 Sets the automatic z-fit mode and its parameters. The auto z-fit has extra parameters which can controlled from application level to ensure that the size of viewing volume will be sufficiently large to cover the depth of unmanaged objects, for example, transformation persistent ones.
 
bool AutoZFitMode () const
 returns TRUE if automatic z-fit mode is turned on.
 
double AutoZFitScaleFactor () const
 returns scale factor parameter of automatic z-fit mode.
 
void AutoZFit () const
 If automatic z-range fitting is turned on, adjusts Z-min and Z-max projection volume planes with call to ZFitAll.
 
void ZFitAll (const double theScaleFactor=1.0) const
 Change Z-min and Z-max planes of projection volume to match the displayed objects.
 
void SetBackgroundColor (const Quantity_TypeOfColor theType, const double theV1, const double theV2, const double theV3)
 Defines the background color of the view by the color definition type and the three corresponding values.
 
void SetBackgroundColor (const Quantity_Color &theColor)
 Defines the background color of the view.
 
void SetBgGradientColors (const Quantity_Color &theColor1, const Quantity_Color &theColor2, const Aspect_GradientFillMethod theFillStyle=Aspect_GradientFillMethod_Horizontal, const bool theToUpdate=false)
 Defines the gradient background colors of the view by supplying the colors and the fill method (horizontal by default).
 
void SetBgGradientStyle (const Aspect_GradientFillMethod theMethod=Aspect_GradientFillMethod_Horizontal, const bool theToUpdate=false)
 Defines the gradient background fill method of the view.
 
void SetBackgroundImage (const char *const theFileName, const Aspect_FillMethod theFillStyle=Aspect_FM_CENTERED, const bool theToUpdate=false)
 Defines the background texture of the view by supplying the texture image file name and fill method (centered by default).
 
void SetBackgroundImage (const occ::handle< Graphic3d_Texture2D > &theTexture, const Aspect_FillMethod theFillStyle=Aspect_FM_CENTERED, const bool theToUpdate=false)
 Defines the background texture of the view by supplying the texture and fill method (centered by default)
 
void SetBgImageStyle (const Aspect_FillMethod theFillStyle, const bool theToUpdate=false)
 Defines the textured background fill method of the view.
 
void SetBackgroundCubeMap (const occ::handle< Graphic3d_CubeMap > &theCubeMap, bool theToUpdatePBREnv=true, bool theToUpdate=false)
 Sets environment cubemap as background.
 
const Aspect_SkydomeBackgroundBackgroundSkydome () const
 Returns skydome aspect;.
 
void SetBackgroundSkydome (const Aspect_SkydomeBackground &theAspect, bool theToUpdatePBREnv=true)
 Sets skydome aspect.
 
bool IsImageBasedLighting () const
 Returns TRUE if IBL (Image Based Lighting) from background cubemap is enabled.
 
void SetImageBasedLighting (bool theToEnableIBL, bool theToUpdate=false)
 Enables or disables IBL (Image Based Lighting) from background cubemap. Has no effect if PBR is not used.
 
void GeneratePBREnvironment (bool theToUpdate=false)
 Activates IBL from background cubemap.
 
void ClearPBREnvironment (bool theToUpdate=false)
 Disables IBL from background cubemap; fills PBR specular probe and irradiance map with white color.
 
void SetTextureEnv (const occ::handle< Graphic3d_TextureEnv > &theTexture)
 Sets the environment texture to use. No environment texture by default.
 
void SetAxis (const double X, const double Y, const double Z, const double Vx, const double Vy, const double Vz)
 Definition of an axis from its origin and its orientation . This will be the current axis for rotations and movements. Warning! raises BadValue from V3d if the vector normal is NULL. .
 
void SetVisualization (const V3d_TypeOfVisualization theType)
 Defines the visualization type in the view.
 
void SetLightOn (const occ::handle< V3d_Light > &theLight)
 Activates theLight in the view.
 
void SetLightOn ()
 Activates all the lights defined in this view.
 
void SetLightOff (const occ::handle< V3d_Light > &theLight)
 Deactivate theLight in this view.
 
void SetLightOff ()
 Deactivate all the Lights defined in this view.
 
bool IsActiveLight (const occ::handle< V3d_Light > &theLight) const
 Returns TRUE when the light is active in this view.
 
bool SetImmediateUpdate (const bool theImmediateUpdate)
 sets the immediate update mode and returns the previous one.
 
const occ::handle< V3d_Trihedron > & Trihedron (bool theToCreate=true)
 Returns trihedron object.
 
void ZBufferTriedronSetup (const Quantity_Color &theXColor=Quantity_NOC_RED, const Quantity_Color &theYColor=Quantity_NOC_GREEN, const Quantity_Color &theZColor=Quantity_NOC_BLUE1, const double theSizeRatio=0.8, const double theAxisDiametr=0.05, const int theNbFacettes=12)
 Customization of the ZBUFFER Triedron. XColor,YColor,ZColor - colors of axis SizeRatio - ratio of decreasing of the trihedron size when its physical position comes out of the view AxisDiametr - diameter relatively to axis length NbFacettes - number of facets of cylinders and cones.
 
void TriedronDisplay (const Aspect_TypeOfTriedronPosition thePosition=Aspect_TOTP_CENTER, const Quantity_Color &theColor=Quantity_NOC_WHITE, const double theScale=0.02, const V3d_TypeOfVisualization theMode=V3d_WIREFRAME)
 Display of the Triedron. Initialize position, color and length of Triedron axes. The scale is a percent of the window width.
 
void TriedronErase ()
 Erases the Triedron.
 
const Graphic3d_GraduatedTrihedronGetGraduatedTrihedron () const
 Returns data of a graduated trihedron.
 
void GraduatedTrihedronDisplay (const Graphic3d_GraduatedTrihedron &theTrihedronData)
 Displays a graduated trihedron.
 
void GraduatedTrihedronErase ()
 Erases a graduated trihedron from the view.
 
void SetFront ()
 modify the Projection of the view perpendicularly to the privileged plane of the viewer.
 
void Rotate (const double Ax, const double Ay, const double Az, const bool Start=true)
 Rotates the eye about the coordinate system of reference of the screen for which the origin is the view point of the projection, with a relative angular value in RADIANS with respect to the initial position expressed by Start = true Warning! raises BadValue from V3d If the eye, the view point, or the high point are aligned or confused.
 
void Rotate (const double Ax, const double Ay, const double Az, const double X, const double Y, const double Z, const bool Start=true)
 Rotates the eye about the coordinate system of reference of the screen for which the origin is Gravity point {X,Y,Z}, with a relative angular value in RADIANS with respect to the initial position expressed by Start = true If the eye, the view point, or the high point are aligned or confused.
 
void Rotate (const V3d_TypeOfAxe Axe, const double Angle, const double X, const double Y, const double Z, const bool Start=true)
 Rotates the eye about one of the coordinate axes of of the view for which the origin is the Gravity point{X,Y,Z} with an relative angular value in RADIANS with respect to the initial position expressed by Start = true.
 
void Rotate (const V3d_TypeOfAxe Axe, const double Angle, const bool Start=true)
 Rotates the eye about one of the coordinate axes of of the view for which the origin is the view point of the projection with an relative angular value in RADIANS with respect to the initial position expressed by Start = true.
 
void Rotate (const double Angle, const bool Start=true)
 Rotates the eye around the current axis a relative angular value in RADIANS with respect to the initial position expressed by Start = true.
 
void Move (const double Dx, const double Dy, const double Dz, const bool Start=true)
 Movement of the eye parallel to the coordinate system of reference of the screen a distance relative to the initial position expressed by Start = true.
 
void Move (const V3d_TypeOfAxe Axe, const double Length, const bool Start=true)
 Movement of the eye parallel to one of the axes of the coordinate system of reference of the view a distance relative to the initial position expressed by Start = true.
 
void Move (const double Length, const bool Start=true)
 Movement of the eye parllel to the current axis a distance relative to the initial position expressed by Start = true.
 
void Translate (const double Dx, const double Dy, const double Dz, const bool Start=true)
 Movement of the ye and the view point parallel to the frame of reference of the screen a distance relative to the initial position expressed by Start = true.
 
void Translate (const V3d_TypeOfAxe Axe, const double Length, const bool Start=true)
 Movement of the eye and the view point parallel to one of the axes of the fame of reference of the view a distance relative to the initial position expressed by Start = true.
 
void Translate (const double Length, const bool Start=true)
 Movement of the eye and view point parallel to the current axis a distance relative to the initial position expressed by Start = true.
 
void Place (const int theXp, const int theYp, const double theZoomFactor=1)
 places the point of the view corresponding at the pixel position x,y at the center of the window and updates the view.
 
void Turn (const double Ax, const double Ay, const double Az, const bool Start=true)
 Rotation of the view point around the frame of reference of the screen for which the origin is the eye of the projection with a relative angular value in RADIANS with respect to the initial position expressed by Start = true.
 
void Turn (const V3d_TypeOfAxe Axe, const double Angle, const bool Start=true)
 Rotation of the view point around one of the axes of the frame of reference of the view for which the origin is the eye of the projection with an angular value in RADIANS relative to the initial position expressed by Start = true.
 
void Turn (const double Angle, const bool Start=true)
 Rotation of the view point around the current axis an angular value in RADIANS relative to the initial position expressed by Start = true.
 
void SetTwist (const double Angle)
 Defines the angular position of the high point of the reference frame of the view with respect to the Y screen axis with an absolute angular value in RADIANS.
 
void SetEye (const double X, const double Y, const double Z)
 Defines the position of the eye..
 
void SetDepth (const double Depth)
 Defines the Depth of the eye from the view point without update the projection .
 
void SetProj (const double Vx, const double Vy, const double Vz)
 Defines the orientation of the projection.
 
void SetProj (const V3d_TypeOfOrientation theOrientation, const bool theIsYup=false)
 Defines the orientation of the projection .
 
void SetAt (const double X, const double Y, const double Z)
 Defines the position of the view point.
 
void SetUp (const double Vx, const double Vy, const double Vz)
 Defines the orientation of the high point.
 
void SetUp (const V3d_TypeOfOrientation Orientation)
 Defines the orientation(SO) of the high point.
 
void SetViewOrientationDefault ()
 Saves the current state of the orientation of the view which will be the return state at ResetViewOrientation.
 
void ResetViewOrientation ()
 Resets the orientation of the view. Updates the view.
 
void Panning (const double theDXv, const double theDYv, const double theZoomFactor=1, const bool theToStart=true)
 Translates the center of the view along "x" and "y" axes of view projection. Can be used to perform interactive panning operation. In that case the DXv, DXy parameters specify panning relative to the point where the operation is started.
 
void SetCenter (const int theXp, const int theYp)
 Relocates center of screen to the point, determined by {Xp, Yp} pixel coordinates relative to the bottom-left corner of screen. To calculate pixel coordinates for any point from world coordinate space, it can be projected using "Project".
 
void SetSize (const double theSize)
 Defines the view projection size in its maximum dimension, keeping the initial height/width ratio unchanged.
 
void SetZSize (const double SetZSize)
 Defines the Depth size of the view Front Plane will be set to Size/2. Back Plane will be set to -Size/2. Any Object located Above the Front Plane or behind the Back Plane will be Clipped . NOTE than the XY Size of the View is NOT modified .
 
void SetZoom (const double Coef, const bool Start=true)
 Zooms the view by a factor relative to the initial value expressed by Start = true Updates the view.
 
void SetScale (const double Coef)
 Zooms the view by a factor relative to the value initialised by SetViewMappingDefault(). Updates the view.
 
void SetAxialScale (const double Sx, const double Sy, const double Sz)
 Sets anisotropic (axial) scale factors <Sx>, <Sy>, <Sz> for view <me>. Anisotropic scaling operation is performed through multiplying the current view orientation matrix by a scaling matrix: || Sx 0 0 0 || || 0 Sy 0 0 || || 0 0 Sz 0 || || 0 0 0 1 || Updates the view.
 
void FitAll (const double theMargin=0.01, const bool theToUpdate=true)
 Adjust view parameters to fit the displayed scene, respecting height / width ratio. The Z clipping range (depth range) is fitted if AutoZFit flag is TRUE. Throws program error exception if margin coefficient is < 0 or >= 1. Updates the view.
 
void FitAll (const Bnd_Box &theBox, const double theMargin=0.01, const bool theToUpdate=true)
 Adjust view parameters to fit the displayed scene, respecting height / width ratio according to the custom bounding box given. Throws program error exception if margin coefficient is < 0 or >= 1. Updates the view.
 
void DepthFitAll (const double Aspect=0.01, const double Margin=0.01)
 Adjusts the viewing volume so as not to clip the displayed objects by front and back and back clipping planes. Also sets depth value automatically depending on the calculated Z size and Aspect parameter. NOTE than the original XY size of the view is NOT modified .
 
void FitAll (const double theMinXv, const double theMinYv, const double theMaxXv, const double theMaxYv)
 Centers the defined projection window so that it occupies the maximum space while respecting the initial height/width ratio. NOTE than the original Z size of the view is NOT modified .
 
void WindowFit (const int theMinXp, const int theMinYp, const int theMaxXp, const int theMaxYp)
 Centers the defined PIXEL window so that it occupies the maximum space while respecting the initial height/width ratio. NOTE than the original Z size of the view is NOT modified.
 
void SetViewMappingDefault ()
 Saves the current view mapping. This will be the state returned from ResetViewmapping.
 
void ResetViewMapping ()
 Resets the centering of the view. Updates the view.
 
void Reset (const bool theToUpdate=true)
 Resets the centering and the orientation of the view.
 
double Convert (const int Vp) const
 Converts the PIXEL value to a value in the projection plane.
 
void Convert (const int Xp, const int Yp, double &Xv, double &Yv) const
 Converts the point PIXEL into a point projected in the reference frame of the projection plane.
 
int Convert (const double Vv) const
 Converts tha value of the projection plane into a PIXEL value.
 
void Convert (const double Xv, const double Yv, int &Xp, int &Yp) const
 Converts the point defined in the reference frame of the projection plane into a point PIXEL.
 
void Convert (const int Xp, const int Yp, double &X, double &Y, double &Z) const
 Converts the projected point into a point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector.
 
void ConvertWithProj (const int Xp, const int Yp, double &X, double &Y, double &Z, double &Vx, double &Vy, double &Vz) const
 Converts the projected point into a point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector and returns the projection ray for further computations.
 
void ConvertToGrid (const int Xp, const int Yp, double &Xg, double &Yg, double &Zg) const
 Converts the projected point into the nearest grid point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector and display the grid marker. Warning: When the grid is not active the result is identical to the above Convert() method. How to use: 1) Enable the grid echo display myViewer->SetGridEcho(true); 2) When application receive a move event: 2.1) Check if any object is detected if( myInteractiveContext->MoveTo(x,y) == AIS_SOD_Nothing ) { 2.2) Check if the grid is active if( myViewer->Grid()->IsActive() ) { 2.3) Display the grid echo and gets the grid point myView->ConvertToGrid(x,y,X,Y,Z); myView->Viewer()->ShowGridEcho (myView, Graphic3d_Vertex (X,Y,Z)); myView->RedrawImmediate(); 2.4) Else this is the standard case } else myView->Convert(x,y,X,Y,Z);.
 
void ConvertToGrid (const double X, const double Y, const double Z, double &Xg, double &Yg, double &Zg) const
 Converts the point into the nearest grid point and display the grid marker.
 
void Convert (const double X, const double Y, const double Z, int &Xp, int &Yp) const
 Projects the point defined in the reference frame of the view into the projected point in the associated window.
 
void Project (const double theX, const double theY, const double theZ, double &theXp, double &theYp) const
 Converts the point defined in the user space of the view to the projection plane at the depth relative to theZ.
 
void Project (const double theX, const double theY, const double theZ, double &theXp, double &theYp, double &theZp) const
 Converts the point defined in the user space of the view to the projection plane at the depth relative to theZ.
 
void BackgroundColor (const Quantity_TypeOfColor Type, double &V1, double &V2, double &V3) const
 Returns the Background color values of the view depending of the color Type.
 
Quantity_Color BackgroundColor () const
 Returns the Background color object of the view.
 
void GradientBackgroundColors (Quantity_Color &theColor1, Quantity_Color &theColor2) const
 Returns the gradient background colors of the view.
 
Aspect_GradientBackground GradientBackground () const
 Returns the gradient background of the view.
 
double Scale () const
 Returns the current value of the zoom expressed with respect to SetViewMappingDefault().
 
void AxialScale (double &Sx, double &Sy, double &Sz) const
 Returns the current values of the anisotropic (axial) scale factors.
 
void Size (double &Width, double &Height) const
 Returns the height and width of the view.
 
double ZSize () const
 Returns the Depth of the view .
 
void Eye (double &X, double &Y, double &Z) const
 Returns the position of the eye.
 
void FocalReferencePoint (double &X, double &Y, double &Z) const
 Returns the position of point which emanating the projections.
 
void ProjReferenceAxe (const int Xpix, const int Ypix, double &XP, double &YP, double &ZP, double &VX, double &VY, double &VZ) const
 Returns the coordinate of the point (Xpix,Ypix) in the view (XP,YP,ZP), and the projection vector of the view passing by the point (for PerspectiveView).
 
double Depth () const
 Returns the Distance between the Eye and View Point.
 
void Proj (double &Vx, double &Vy, double &Vz) const
 Returns the projection vector.
 
void At (double &X, double &Y, double &Z) const
 Returns the position of the view point.
 
void Up (double &Vx, double &Vy, double &Vz) const
 Returns the vector giving the position of the high point.
 
double Twist () const
 Returns in RADIANS the orientation of the view around the visual axis measured from the Y axis of the screen.
 
Graphic3d_TypeOfShadingModel ShadingModel () const
 Returns the current shading model; Graphic3d_TypeOfShadingModel_Phong by default.
 
void SetShadingModel (const Graphic3d_TypeOfShadingModel theShadingModel)
 Defines the shading model for the visualization.
 
occ::handle< Graphic3d_TextureEnvTextureEnv () const
 
V3d_TypeOfVisualization Visualization () const
 Returns the current visualisation mode.
 
const NCollection_List< occ::handle< Graphic3d_CLight > > & ActiveLights () const
 Returns a list of active lights.
 
NCollection_List< occ::handle< Graphic3d_CLight > >::Iterator ActiveLightIterator () const
 Return iterator for defined lights.
 
int LightLimit () const
 Returns the MAX number of light associated to the view.
 
occ::handle< V3d_ViewerViewer () const
 Returns the viewer in which the view has been created.
 
bool IfWindow () const
 Returns True if MyView is associated with a window .
 
const occ::handle< Aspect_Window > & Window () const
 Returns the Aspect Window associated with the view.
 
V3d_TypeOfView Type () const
 Returns the Type of the View.
 
void Pan (const int theDXp, const int theDYp, const double theZoomFactor=1, const bool theToStart=true)
 Translates the center of the view along "x" and "y" axes of view projection. Can be used to perform interactive panning operation. In that case the DXp, DXp parameters specify panning relative to the point where the operation is started.
 
void Zoom (const int theXp1, const int theYp1, const int theXp2, const int theYp2)
 Zoom the view according to a zoom factor computed from the distance between the 2 mouse position.
 
void StartZoomAtPoint (const int theXp, const int theYp)
 Defines starting point for ZoomAtPoint view operation.
 
void ZoomAtPoint (const int theMouseStartX, const int theMouseStartY, const int theMouseEndX, const int theMouseEndY)
 Zooms the model at a pixel defined by the method StartZoomAtPoint().
 
void AxialScale (const int Dx, const int Dy, const V3d_TypeOfAxe Axis)
 Performs anisotropic scaling of <me> view along the given <Axis>. The scale factor is calculated on a basis of the mouse pointer displacement <Dx,Dy>. The calculated scale factor is then passed to SetAxialScale(Sx, Sy, Sz) method.
 
void StartRotation (const int X, const int Y, const double zRotationThreshold=0.0)
 Begin the rotation of the view around the screen axis according to the mouse position <X,Y>. Warning: Enable rotation around the Z screen axis when <zRotationThreshold> factor is > 0 soon the distance from the start point and the center of the view is > (medium viewSize * <zRotationThreshold> ). Generally a value of 0.4 is usable to rotate around XY screen axis inside the circular threshold area and to rotate around Z screen axis outside this area.
 
void Rotation (const int X, const int Y)
 Continues the rotation of the view with an angle computed from the last and new mouse position <X,Y>.
 
void SetFocale (const double Focale)
 Change View Plane Distance for Perspective Views Warning! raises TypeMismatch from Standard if the view is not a perspective view.
 
double Focale () const
 Returns the View Plane Distance for Perspective Views.
 
const occ::handle< Graphic3d_CView > & View () const
 Returns the associated Graphic3d view.
 
void SetComputedMode (const bool theMode)
 Switches computed HLR mode in the view.
 
bool ComputedMode () const
 Returns the computed HLR mode state.
 
void WindowFitAll (const int Xmin, const int Ymin, const int Xmax, const int Ymax)
 idem than WindowFit
 
bool FitMinMax (const occ::handle< Graphic3d_Camera > &theCamera, const Bnd_Box &theBox, const double theMargin, const double theResolution=0.0, const bool theToEnlargeIfLine=true) const
 Transform camera eye, center and scale to fit in the passed bounding box specified in WCS.
 
CPU grid plumbing (deprecated, fed by V3d_Viewer::ActivateGrid)

Snap + CPU rendering. The CPU grid lives on the viewer's structure manager and is visible in every active view; SetGrid on a view that has the shader grid enabled erases the shader grid on this view, the CPU grid is left intact (or re-displayed by V3d_Viewer::ActivateGrid).

void SetGrid (const gp_Ax3 &aPlane, const occ::handle< Aspect_Grid > &aGrid)
 Defines or updates the grid plane and snap object on this view.
 
void SetGridActivity (const bool aFlag)
 Activates / deactivates snap on this view.
 
GPU shader grid (recommended)

Per-view immediate-mode shader; supports unbounded extents, AA, background, arc range. GridDisplay erases the viewer-wide CPU grid rendering on entry (snap geometry on Aspect_*Grid is preserved). GridErase only tears down the shader grid on this view; restoring the CPU rendering needs V3d_Viewer::ActivateGrid.

void GridDisplay (const Aspect_GridParams &theParams)
 Display a shader-rendered grid on the viewer's privileged plane.
 
void GridDisplay (const Aspect_GridParams &theParams, const gp_Ax3 &thePlane)
 Display a shader-rendered grid on an explicit plane (overrides the viewer's privileged plane for this view only).
 
void GridErase ()
 Erase the shader-rendered grid from this view.
 
bool Dump (const char *const theFile, const Graphic3d_BufferType &theBufferType=Graphic3d_BT_RGB)
 Dumps the full contents of the View into the image file. This is an alias for ToPixMap() with Image_AlienPixMap.
 
bool ToPixMap (Image_PixMap &theImage, const V3d_ImageDumpOptions &theParams)
 Dumps the full contents of the view to a pixmap with specified parameters. Internally this method calls Redraw() with an offscreen render buffer of requested target size (theWidth x theHeight), so that there is no need resizing a window control for making a dump of different size.
 
bool ToPixMap (Image_PixMap &theImage, const int theWidth, const int theHeight, const Graphic3d_BufferType &theBufferType=Graphic3d_BT_RGB, const bool theToAdjustAspect=true, const Graphic3d_ZLayerId theTargetZLayerId=Graphic3d_ZLayerId_BotOSD, const int theIsSingleLayer=false, const V3d_StereoDumpOptions theStereoOptions=V3d_SDO_MONO, const char *const theLightName="")
 Dumps the full contents of the view to a pixmap. Internally this method calls Redraw() with an offscreen render buffer of requested target size (theWidth x theHeight), so that there is no need resizing a window control for making a dump of different size.
 
void SetBackFacingModel (const Graphic3d_TypeOfBackfacingModel theModel=Graphic3d_TypeOfBackfacingModel_Auto)
 Manages display of the back faces.
 
Graphic3d_TypeOfBackfacingModel BackFacingModel () const
 Returns current state of the back faces display; Graphic3d_TypeOfBackfacingModel_Auto by default, which means that backface culling is defined by each presentation.
 
virtual void AddClipPlane (const occ::handle< Graphic3d_ClipPlane > &thePlane)
 Adds clip plane to the view. The composition of clip planes truncates the rendering space to convex volume. Number of supported clip planes can be consulted by PlaneLimit method of associated Graphic3d_GraphicDriver. Please be aware that the planes which exceed the limit are ignored during rendering.
 
virtual void RemoveClipPlane (const occ::handle< Graphic3d_ClipPlane > &thePlane)
 Removes clip plane from the view.
 
const occ::handle< Graphic3d_SequenceOfHClipPlane > & ClipPlanes () const
 Get clip planes.
 
void SetClipPlanes (const occ::handle< Graphic3d_SequenceOfHClipPlane > &thePlanes)
 Sets sequence of clip planes to the view. The planes that have been set before are removed from the view. The composition of clip planes truncates the rendering space to convex volume. Number of supported clip planes can be consulted by InquirePlaneLimit method of Graphic3d_GraphicDriver. Please be aware that the planes that exceed the limit are ignored during rendering.
 
int PlaneLimit () const
 Returns the MAX number of clipping planes associated to the view.
 
void SetCamera (const occ::handle< Graphic3d_Camera > &theCamera)
 Change camera used by view.
 
const occ::handle< Graphic3d_Camera > & Camera () const
 Returns camera object of the view.
 
const occ::handle< Graphic3d_Camera > & DefaultCamera () const
 Return default camera.
 
const Graphic3d_RenderingParamsRenderingParams () const
 Returns current rendering parameters and effect settings. By default it returns default parameters of current viewer. To define view-specific settings use method V3d_View::ChangeRenderingParams().
 
Graphic3d_RenderingParamsChangeRenderingParams ()
 Returns reference to current rendering parameters and effect settings.
 
bool IsCullingEnabled () const
 
void SetFrustumCulling (bool theMode)
 Turn on/off automatic culling of objects outside frustum (ON by default)
 
void DiagnosticInformation (NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > &theDict, Graphic3d_DiagnosticInfo theFlags) const
 Fill in the dictionary with diagnostic info. Should be called within rendering thread.
 
TCollection_AsciiString StatisticInformation () const
 Returns string with statistic performance info.
 
void StatisticInformation (NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > &theDict) const
 Fills in the dictionary with statistic performance info.
 
gp_Pnt GravityPoint () const
 Returns the Objects number and the gravity center of ALL viewable points in the view.
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const
 Dumps the content of me into the stream.
 
subvew management

Return TRUE if this is a subview of another view.

bool IsSubview () const
 Return parent View or NULL if this is not a subview.
 
V3d_ViewParentView ()
 Return parent View or NULL if this is not a subview.
 
const NCollection_Sequence< occ::handle< V3d_View > > & Subviews () const
 Return subview list.
 
occ::handle< V3d_ViewPickSubview (const NCollection_Vec2< int > &thePnt) const
 Pick subview from the given 2D point.
 
void AddSubview (const occ::handle< V3d_View > &theView)
 Add subview to the list.
 
bool RemoveSubview (const V3d_View *theView)
 Remove subview from the list.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=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_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
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 One light more can be activated in this View.

Deprecated
("Deprecated method - ActiveLights() should be used instead")
double myOldMouseX
 initializes an iteration on the active Lights.
 
double myOldMouseY
 initializes an iteration on the active Lights.
 
gp_Dir myCamStartOpUp
 initializes an iteration on the active Lights.
 
gp_Dir myCamStartOpDir
 initializes an iteration on the active Lights.
 
gp_Pnt myCamStartOpEye
 initializes an iteration on the active Lights.
 
gp_Pnt myCamStartOpCenter
 initializes an iteration on the active Lights.
 
occ::handle< Graphic3d_CameramyDefaultCamera
 initializes an iteration on the active Lights.
 
occ::handle< Graphic3d_CViewmyView
 initializes an iteration on the active Lights.
 
bool myImmediateUpdate
 initializes an iteration on the active Lights.
 
bool myIsInvalidatedImmediate
 initializes an iteration on the active Lights.
 
bool IfMoreLights () const
 initializes an iteration on the active Lights.
 
void InitActiveLights ()
 initializes an iteration 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 ImmediateUpdate () const
 initializes an iteration on the active Lights.
 
void Scale (const occ::handle< Graphic3d_Camera > &theCamera, const double theSizeXv, const double theSizeYv) const
 Scales camera to fit the view frame of defined width and height keeping the aspect. For orthogonal camera the method changes scale, for perspective adjusts Eye location about the Center point.
 
void Translate (const occ::handle< Graphic3d_Camera > &theCamera, const double theDXv, const double theDYv) const
 initializes an iteration on the active Lights.
 

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 charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

Defines the application object VIEW for the VIEWER application. The methods of this class allow the editing and inquiring the parameters linked to the view. Provides a set of services common to all types of view. Warning: The default parameters are defined by the class Viewer (Example : SetDefaultViewSize()). Certain methods are mouse oriented, and it is necessary to know the difference between the start and the continuation of this gesture in putting the method into operation. Example : Shifting the eye-view along the screen axes.

View->Move(10.,20.,0.,True) (Starting motion) View->Move(15.,-5.,0.,False) (Next motion)

Constructor & Destructor Documentation

◆ V3d_View() [1/2]

V3d_View::V3d_View ( const occ::handle< V3d_Viewer > & theViewer,
const V3d_TypeOfView theType = V3d_ORTHOGRAPHIC )

Initializes the view.

◆ V3d_View() [2/2]

V3d_View::V3d_View ( const occ::handle< V3d_Viewer > & theViewer,
const occ::handle< V3d_View > & theView )

Initializes the view by copying.

◆ ~V3d_View()

V3d_View::~V3d_View ( )
override

Default destructor.

Member Function Documentation

◆ ActiveLight()

const occ::handle< V3d_Light > & V3d_View::ActiveLight ( ) const
inline
Deprecated
("Deprecated method - ActiveLights() should be used instead")

◆ ActiveLightIterator()

NCollection_List< occ::handle< Graphic3d_CLight > >::Iterator V3d_View::ActiveLightIterator ( ) const
inline

Return iterator for defined lights.

◆ ActiveLights()

const NCollection_List< occ::handle< Graphic3d_CLight > > & V3d_View::ActiveLights ( ) const
inline

Returns a list of active lights.

◆ AddClipPlane()

virtual void V3d_View::AddClipPlane ( const occ::handle< Graphic3d_ClipPlane > & thePlane)
virtual

Adds clip plane to the view. The composition of clip planes truncates the rendering space to convex volume. Number of supported clip planes can be consulted by PlaneLimit method of associated Graphic3d_GraphicDriver. Please be aware that the planes which exceed the limit are ignored during rendering.

Parameters
[in]thePlanethe clip plane to be added to view.

◆ AddSubview()

void V3d_View::AddSubview ( const occ::handle< V3d_View > & theView)

Add subview to the list.

◆ At()

void V3d_View::At ( double & X,
double & Y,
double & Z ) const

Returns the position of the view point.

◆ AutoZFit()

void V3d_View::AutoZFit ( ) const

If automatic z-range fitting is turned on, adjusts Z-min and Z-max projection volume planes with call to ZFitAll.

◆ AutoZFitMode()

bool V3d_View::AutoZFitMode ( ) const
inline

returns TRUE if automatic z-fit mode is turned on.

◆ AutoZFitScaleFactor()

double V3d_View::AutoZFitScaleFactor ( ) const
inline

returns scale factor parameter of automatic z-fit mode.

◆ AxialScale() [1/2]

void V3d_View::AxialScale ( const int Dx,
const int Dy,
const V3d_TypeOfAxe Axis )

Performs anisotropic scaling of <me> view along the given <Axis>. The scale factor is calculated on a basis of the mouse pointer displacement <Dx,Dy>. The calculated scale factor is then passed to SetAxialScale(Sx, Sy, Sz) method.

◆ AxialScale() [2/2]

void V3d_View::AxialScale ( double & Sx,
double & Sy,
double & Sz ) const

Returns the current values of the anisotropic (axial) scale factors.

◆ BackFacingModel()

Graphic3d_TypeOfBackfacingModel V3d_View::BackFacingModel ( ) const

Returns current state of the back faces display; Graphic3d_TypeOfBackfacingModel_Auto by default, which means that backface culling is defined by each presentation.

◆ BackgroundColor() [1/2]

Quantity_Color V3d_View::BackgroundColor ( ) const

Returns the Background color object of the view.

◆ BackgroundColor() [2/2]

void V3d_View::BackgroundColor ( const Quantity_TypeOfColor Type,
double & V1,
double & V2,
double & V3 ) const

Returns the Background color values of the view depending of the color Type.

◆ BackgroundSkydome()

const Aspect_SkydomeBackground & V3d_View::BackgroundSkydome ( ) const
inline

Returns skydome aspect;.

◆ Camera()

const occ::handle< Graphic3d_Camera > & V3d_View::Camera ( ) const

Returns camera object of the view.

Returns
: handle to camera object, or NULL if 3D view does not use the camera approach.

◆ ChangeRenderingParams()

Graphic3d_RenderingParams & V3d_View::ChangeRenderingParams ( )

Returns reference to current rendering parameters and effect settings.

◆ ClearPBREnvironment()

void V3d_View::ClearPBREnvironment ( bool theToUpdate = false)
inline

Disables IBL from background cubemap; fills PBR specular probe and irradiance map with white color.

◆ ClipPlanes()

const occ::handle< Graphic3d_SequenceOfHClipPlane > & V3d_View::ClipPlanes ( ) const

Get clip planes.

Returns
sequence clip planes that have been set for the view

◆ ComputedMode()

bool V3d_View::ComputedMode ( ) const

Returns the computed HLR mode state.

◆ Convert() [1/6]

int V3d_View::Convert ( const double Vv) const

Converts tha value of the projection plane into a PIXEL value.

◆ Convert() [2/6]

void V3d_View::Convert ( const double X,
const double Y,
const double Z,
int & Xp,
int & Yp ) const

Projects the point defined in the reference frame of the view into the projected point in the associated window.

◆ Convert() [3/6]

void V3d_View::Convert ( const double Xv,
const double Yv,
int & Xp,
int & Yp ) const

Converts the point defined in the reference frame of the projection plane into a point PIXEL.

◆ Convert() [4/6]

double V3d_View::Convert ( const int Vp) const

Converts the PIXEL value to a value in the projection plane.

◆ Convert() [5/6]

void V3d_View::Convert ( const int Xp,
const int Yp,
double & X,
double & Y,
double & Z ) const

Converts the projected point into a point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector.

◆ Convert() [6/6]

void V3d_View::Convert ( const int Xp,
const int Yp,
double & Xv,
double & Yv ) const

Converts the point PIXEL into a point projected in the reference frame of the projection plane.

◆ ConvertToGrid() [1/2]

void V3d_View::ConvertToGrid ( const double X,
const double Y,
const double Z,
double & Xg,
double & Yg,
double & Zg ) const

Converts the point into the nearest grid point and display the grid marker.

◆ ConvertToGrid() [2/2]

void V3d_View::ConvertToGrid ( const int Xp,
const int Yp,
double & Xg,
double & Yg,
double & Zg ) const

Converts the projected point into the nearest grid point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector and display the grid marker. Warning: When the grid is not active the result is identical to the above Convert() method. How to use: 1) Enable the grid echo display myViewer->SetGridEcho(true); 2) When application receive a move event: 2.1) Check if any object is detected if( myInteractiveContext->MoveTo(x,y) == AIS_SOD_Nothing ) { 2.2) Check if the grid is active if( myViewer->Grid()->IsActive() ) { 2.3) Display the grid echo and gets the grid point myView->ConvertToGrid(x,y,X,Y,Z); myView->Viewer()->ShowGridEcho (myView, Graphic3d_Vertex (X,Y,Z)); myView->RedrawImmediate(); 2.4) Else this is the standard case } else myView->Convert(x,y,X,Y,Z);.

◆ ConvertWithProj()

void V3d_View::ConvertWithProj ( const int Xp,
const int Yp,
double & X,
double & Y,
double & Z,
double & Vx,
double & Vy,
double & Vz ) const

Converts the projected point into a point in the reference frame of the view corresponding to the intersection with the projection plane of the eye/view point vector and returns the projection ray for further computations.

◆ DefaultCamera()

const occ::handle< Graphic3d_Camera > & V3d_View::DefaultCamera ( ) const
inline

Return default camera.

◆ Depth()

double V3d_View::Depth ( ) const

Returns the Distance between the Eye and View Point.

◆ DepthFitAll()

void V3d_View::DepthFitAll ( const double Aspect = 0.01,
const double Margin = 0.01 )

Adjusts the viewing volume so as not to clip the displayed objects by front and back and back clipping planes. Also sets depth value automatically depending on the calculated Z size and Aspect parameter. NOTE than the original XY size of the view is NOT modified .

◆ DiagnosticInformation()

void V3d_View::DiagnosticInformation ( NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > & theDict,
Graphic3d_DiagnosticInfo theFlags ) const

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.

Parameters
theDictdestination map for information
theFlagsdefines the information to be retrieved

◆ DoMapping()

void V3d_View::DoMapping ( )

Must be called when the window supporting the view is mapped or unmapped.

◆ Dump()

bool V3d_View::Dump ( const char *const theFile,
const Graphic3d_BufferType & theBufferType = Graphic3d_BT_RGB )

Dumps the full contents of the View into the image file. This is an alias for ToPixMap() with Image_AlienPixMap.

Parameters
theFiledestination image file (image format is determined by file extension like .png, .bmp, .jpg)
theBufferTypebuffer to dump
Returns
FALSE when the dump has failed

◆ DumpJson()

void V3d_View::DumpJson ( Standard_OStream & theOStream,
int theDepth = -1 ) const

Dumps the content of me into the stream.

◆ Eye()

void V3d_View::Eye ( double & X,
double & Y,
double & Z ) const

Returns the position of the eye.

◆ FitAll() [1/3]

void V3d_View::FitAll ( const Bnd_Box & theBox,
const double theMargin = 0.01,
const bool theToUpdate = true )

Adjust view parameters to fit the displayed scene, respecting height / width ratio according to the custom bounding box given. Throws program error exception if margin coefficient is < 0 or >= 1. Updates the view.

Parameters
[in]theBoxthe custom bounding box to fit.
[in]theMarginthe margin coefficient for view borders.
[in]theToUpdateflag to perform view update.

◆ FitAll() [2/3]

void V3d_View::FitAll ( const double theMargin = 0.01,
const bool theToUpdate = true )

Adjust view parameters to fit the displayed scene, respecting height / width ratio. The Z clipping range (depth range) is fitted if AutoZFit flag is TRUE. Throws program error exception if margin coefficient is < 0 or >= 1. Updates the view.

Parameters
[in]theMarginthe margin coefficient for view borders.
[in]theToUpdateflag to perform view update.

◆ FitAll() [3/3]

void V3d_View::FitAll ( const double theMinXv,
const double theMinYv,
const double theMaxXv,
const double theMaxYv )

Centers the defined projection window so that it occupies the maximum space while respecting the initial height/width ratio. NOTE than the original Z size of the view is NOT modified .

◆ FitMinMax()

bool V3d_View::FitMinMax ( const occ::handle< Graphic3d_Camera > & theCamera,
const Bnd_Box & theBox,
const double theMargin,
const double theResolution = 0.0,
const bool theToEnlargeIfLine = true ) const

Transform camera eye, center and scale to fit in the passed bounding box specified in WCS.

Parameters
[in]theCamerathe camera
[in]theBoxthe bounding box
[in]theMarginthe margin coefficient for view borders
[in]theResolutionthe minimum size of projection of bounding box in Xv or Yv direction when it considered to be a thin plane or point (without a volume); in this case only the center of camera is adjusted
[in]theToEnlargeIfLinewhen TRUE - in cases when the whole bounding box projected into thin line going along Z-axis of screen, the view plane is enlarged such thatwe see the whole line on rotation, otherwise only the center of camera is adjusted.
Returns
TRUE if the fit all operation can be done

◆ Focale()

double V3d_View::Focale ( ) const

Returns the View Plane Distance for Perspective Views.

◆ FocalReferencePoint()

void V3d_View::FocalReferencePoint ( double & X,
double & Y,
double & Z ) const
inline

Returns the position of point which emanating the projections.

◆ GeneratePBREnvironment()

void V3d_View::GeneratePBREnvironment ( bool theToUpdate = false)
inline

Activates IBL from background cubemap.

◆ GetGraduatedTrihedron()

const Graphic3d_GraduatedTrihedron & V3d_View::GetGraduatedTrihedron ( ) const

Returns data of a graduated trihedron.

◆ GradientBackground()

Aspect_GradientBackground V3d_View::GradientBackground ( ) const

Returns the gradient background of the view.

◆ GradientBackgroundColors()

void V3d_View::GradientBackgroundColors ( Quantity_Color & theColor1,
Quantity_Color & theColor2 ) const

Returns the gradient background colors of the view.

◆ GraduatedTrihedronDisplay()

void V3d_View::GraduatedTrihedronDisplay ( const Graphic3d_GraduatedTrihedron & theTrihedronData)

Displays a graduated trihedron.

◆ GraduatedTrihedronErase()

void V3d_View::GraduatedTrihedronErase ( )

Erases a graduated trihedron from the view.

◆ GravityPoint()

gp_Pnt V3d_View::GravityPoint ( ) const

Returns the Objects number and the gravity center of ALL viewable points in the view.

◆ GridDisplay() [1/2]

void V3d_View::GridDisplay ( const Aspect_GridParams & theParams)

Display a shader-rendered grid on the viewer's privileged plane.

Parameters
[in]theParamsappearance: color, scale, bounds, arc, draw-mode, background / view-adaptive flags

◆ GridDisplay() [2/2]

void V3d_View::GridDisplay ( const Aspect_GridParams & theParams,
const gp_Ax3 & thePlane )

Display a shader-rendered grid on an explicit plane (overrides the viewer's privileged plane for this view only).

Parameters
[in]theParamsappearance parameters; see the single-argument overload
[in]thePlaneworld-space grid plane (origin + axes)

◆ GridErase()

void V3d_View::GridErase ( )

Erase the shader-rendered grid from this view.

◆ IfMoreLights()

bool V3d_View::IfMoreLights ( ) const

initializes an iteration on the active Lights.

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

◆ IfWindow()

bool V3d_View::IfWindow ( ) const

Returns True if MyView is associated with a window .

◆ ImmediateUpdate()

void V3d_View::ImmediateUpdate ( ) const
protected

initializes an iteration on the active Lights.

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

◆ InitActiveLights()

void V3d_View::InitActiveLights ( )
inline

initializes an iteration on the active Lights.

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

◆ Invalidate()

void V3d_View::Invalidate ( ) const

Invalidates view content but does not redraw it.

◆ InvalidateImmediate()

void V3d_View::InvalidateImmediate ( )
inline

Invalidates view content within immediate layer but does not redraw it.

◆ IsActiveLight()

bool V3d_View::IsActiveLight ( const occ::handle< V3d_Light > & theLight) const

Returns TRUE when the light is active in this view.

◆ IsCullingEnabled()

bool V3d_View::IsCullingEnabled ( ) const
inline
Returns
flag value of objects culling mechanism

◆ IsEmpty()

bool V3d_View::IsEmpty ( ) const

Returns the status of the view regarding the displayed structures inside Returns True is The View is empty.

◆ IsImageBasedLighting()

bool V3d_View::IsImageBasedLighting ( ) const

Returns TRUE if IBL (Image Based Lighting) from background cubemap is enabled.

◆ IsInvalidated()

bool V3d_View::IsInvalidated ( ) const

Returns true if cached view content has been invalidated.

◆ IsInvalidatedImmediate()

bool V3d_View::IsInvalidatedImmediate ( ) const
inline

Returns true if immediate layer content has been invalidated.

◆ IsSubview()

bool V3d_View::IsSubview ( ) const
inline

Return parent View or NULL if this is not a subview.

◆ LightLimit()

int V3d_View::LightLimit ( ) const

Returns the MAX number of light associated to the view.

◆ MoreActiveLights()

bool V3d_View::MoreActiveLights ( ) const
inline

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

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

◆ Move() [1/3]

void V3d_View::Move ( const double Dx,
const double Dy,
const double Dz,
const bool Start = true )

Movement of the eye parallel to the coordinate system of reference of the screen a distance relative to the initial position expressed by Start = true.

◆ Move() [2/3]

void V3d_View::Move ( const double Length,
const bool Start = true )

Movement of the eye parllel to the current axis a distance relative to the initial position expressed by Start = true.

◆ Move() [3/3]

void V3d_View::Move ( const V3d_TypeOfAxe Axe,
const double Length,
const bool Start = true )

Movement of the eye parallel to one of the axes of the coordinate system of reference of the view a distance relative to the initial position expressed by Start = true.

◆ MustBeResized()

void V3d_View::MustBeResized ( )

Must be called when the window supporting the view changes size. if the view is not mapped on a window. Warning: The view is centered and resized to preserve the height/width ratio of the window.

◆ NextActiveLights()

void V3d_View::NextActiveLights ( )
inline

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

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

◆ Pan()

void V3d_View::Pan ( const int theDXp,
const int theDYp,
const double theZoomFactor = 1,
const bool theToStart = true )

Translates the center of the view along "x" and "y" axes of view projection. Can be used to perform interactive panning operation. In that case the DXp, DXp parameters specify panning relative to the point where the operation is started.

Parameters
[in]theDXpthe relative panning on "x" axis of view projection, in pixels.
[in]theDYpthe relative panning on "y" axis of view projection, in pixels.
[in]theZoomFactorthe zooming factor.
[in]theToStartpass TRUE when starting panning to remember view state prior to panning for relative arguments. Passing 0 for relative panning parameter should return view panning to initial state. Performs update of view.

◆ Panning()

void V3d_View::Panning ( const double theDXv,
const double theDYv,
const double theZoomFactor = 1,
const bool theToStart = true )

Translates the center of the view along "x" and "y" axes of view projection. Can be used to perform interactive panning operation. In that case the DXv, DXy parameters specify panning relative to the point where the operation is started.

Parameters
[in]theDXvthe relative panning on "x" axis of view projection, in view space coordinates.
[in]theDYvthe relative panning on "y" axis of view projection, in view space coordinates.
[in]theZoomFactorthe zooming factor.
[in]theToStartpass TRUE when starting panning to remember view state prior to panning for relative arguments. If panning is started, passing {0, 0} for {theDXv, theDYv} will return view to initial state. Performs update of view.

◆ ParentView()

V3d_View * V3d_View::ParentView ( )
inline

Return parent View or NULL if this is not a subview.

◆ PickSubview()

occ::handle< V3d_View > V3d_View::PickSubview ( const NCollection_Vec2< int > & thePnt) const

Pick subview from the given 2D point.

◆ Place()

void V3d_View::Place ( const int theXp,
const int theYp,
const double theZoomFactor = 1 )

places the point of the view corresponding at the pixel position x,y at the center of the window and updates the view.

◆ PlaneLimit()

int V3d_View::PlaneLimit ( ) const

Returns the MAX number of clipping planes associated to the view.

◆ Proj()

void V3d_View::Proj ( double & Vx,
double & Vy,
double & Vz ) const

Returns the projection vector.

◆ Project() [1/2]

void V3d_View::Project ( const double theX,
const double theY,
const double theZ,
double & theXp,
double & theYp ) const

Converts the point defined in the user space of the view to the projection plane at the depth relative to theZ.

◆ Project() [2/2]

void V3d_View::Project ( const double theX,
const double theY,
const double theZ,
double & theXp,
double & theYp,
double & theZp ) const

Converts the point defined in the user space of the view to the projection plane at the depth relative to theZ.

◆ ProjReferenceAxe()

void V3d_View::ProjReferenceAxe ( const int Xpix,
const int Ypix,
double & XP,
double & YP,
double & ZP,
double & VX,
double & VY,
double & VZ ) const

Returns the coordinate of the point (Xpix,Ypix) in the view (XP,YP,ZP), and the projection vector of the view passing by the point (for PerspectiveView).

◆ Redraw()

virtual void V3d_View::Redraw ( ) const
virtual

Redisplays the view even if there has not been any modification. Must be called if the view is shown. (Ex: DeIconification ) .

◆ RedrawImmediate()

virtual void V3d_View::RedrawImmediate ( ) const
virtual

Updates layer of immediate presentations.

◆ Remove()

void V3d_View::Remove ( )

Destroys the view.

◆ RemoveClipPlane()

virtual void V3d_View::RemoveClipPlane ( const occ::handle< Graphic3d_ClipPlane > & thePlane)
virtual

Removes clip plane from the view.

Parameters
[in]thePlanethe clip plane to be removed from view.

◆ RemoveSubview()

bool V3d_View::RemoveSubview ( const V3d_View * theView)

Remove subview from the list.

◆ RenderingParams()

const Graphic3d_RenderingParams & V3d_View::RenderingParams ( ) const

Returns current rendering parameters and effect settings. By default it returns default parameters of current viewer. To define view-specific settings use method V3d_View::ChangeRenderingParams().

See also
V3d_Viewer::DefaultRenderingParams()

◆ Reset()

void V3d_View::Reset ( const bool theToUpdate = true)

Resets the centering and the orientation of the view.

◆ ResetViewMapping()

void V3d_View::ResetViewMapping ( )

Resets the centering of the view. Updates the view.

◆ ResetViewOrientation()

void V3d_View::ResetViewOrientation ( )

Resets the orientation of the view. Updates the view.

◆ Rotate() [1/5]

void V3d_View::Rotate ( const double Angle,
const bool Start = true )

Rotates the eye around the current axis a relative angular value in RADIANS with respect to the initial position expressed by Start = true.

◆ Rotate() [2/5]

void V3d_View::Rotate ( const double Ax,
const double Ay,
const double Az,
const bool Start = true )

Rotates the eye about the coordinate system of reference of the screen for which the origin is the view point of the projection, with a relative angular value in RADIANS with respect to the initial position expressed by Start = true Warning! raises BadValue from V3d If the eye, the view point, or the high point are aligned or confused.

◆ Rotate() [3/5]

void V3d_View::Rotate ( const double Ax,
const double Ay,
const double Az,
const double X,
const double Y,
const double Z,
const bool Start = true )

Rotates the eye about the coordinate system of reference of the screen for which the origin is Gravity point {X,Y,Z}, with a relative angular value in RADIANS with respect to the initial position expressed by Start = true If the eye, the view point, or the high point are aligned or confused.

◆ Rotate() [4/5]

void V3d_View::Rotate ( const V3d_TypeOfAxe Axe,
const double Angle,
const bool Start = true )

Rotates the eye about one of the coordinate axes of of the view for which the origin is the view point of the projection with an relative angular value in RADIANS with respect to the initial position expressed by Start = true.

◆ Rotate() [5/5]

void V3d_View::Rotate ( const V3d_TypeOfAxe Axe,
const double Angle,
const double X,
const double Y,
const double Z,
const bool Start = true )

Rotates the eye about one of the coordinate axes of of the view for which the origin is the Gravity point{X,Y,Z} with an relative angular value in RADIANS with respect to the initial position expressed by Start = true.

◆ Rotation()

void V3d_View::Rotation ( const int X,
const int Y )

Continues the rotation of the view with an angle computed from the last and new mouse position <X,Y>.

◆ Scale() [1/2]

double V3d_View::Scale ( ) const

Returns the current value of the zoom expressed with respect to SetViewMappingDefault().

◆ Scale() [2/2]

void V3d_View::Scale ( const occ::handle< Graphic3d_Camera > & theCamera,
const double theSizeXv,
const double theSizeYv ) const
protected

Scales camera to fit the view frame of defined width and height keeping the aspect. For orthogonal camera the method changes scale, for perspective adjusts Eye location about the Center point.

Parameters
[in]theSizeXvsize of viewport frame on "x" axis.
[in]theSizeYvsize of viewport frame on "y" axis.

◆ SetAt()

void V3d_View::SetAt ( const double X,
const double Y,
const double Z )

Defines the position of the view point.

◆ SetAutoZFitMode()

void V3d_View::SetAutoZFitMode ( const bool theIsOn,
const double theScaleFactor = 1.0 )

Sets the automatic z-fit mode and its parameters. The auto z-fit has extra parameters which can controlled from application level to ensure that the size of viewing volume will be sufficiently large to cover the depth of unmanaged objects, for example, transformation persistent ones.

Parameters
[in]theScaleFactorthe scale factor for Z-range. The range between Z-min, Z-max projection volume planes evaluated by z fitting method will be scaled using this coefficient. Program error exception is thrown if negative or zero value is passed.

◆ SetAxialScale()

void V3d_View::SetAxialScale ( const double Sx,
const double Sy,
const double Sz )

Sets anisotropic (axial) scale factors <Sx>, <Sy>, <Sz> for view <me>. Anisotropic scaling operation is performed through multiplying the current view orientation matrix by a scaling matrix: || Sx 0 0 0 || || 0 Sy 0 0 || || 0 0 Sz 0 || || 0 0 0 1 || Updates the view.

◆ SetAxis()

void V3d_View::SetAxis ( const double X,
const double Y,
const double Z,
const double Vx,
const double Vy,
const double Vz )

Definition of an axis from its origin and its orientation . This will be the current axis for rotations and movements. Warning! raises BadValue from V3d if the vector normal is NULL. .

◆ SetBackFacingModel()

void V3d_View::SetBackFacingModel ( const Graphic3d_TypeOfBackfacingModel theModel = Graphic3d_TypeOfBackfacingModel_Auto)

Manages display of the back faces.

◆ SetBackgroundColor() [1/2]

void V3d_View::SetBackgroundColor ( const Quantity_Color & theColor)

Defines the background color of the view.

◆ SetBackgroundColor() [2/2]

void V3d_View::SetBackgroundColor ( const Quantity_TypeOfColor theType,
const double theV1,
const double theV2,
const double theV3 )

Defines the background color of the view by the color definition type and the three corresponding values.

◆ SetBackgroundCubeMap()

void V3d_View::SetBackgroundCubeMap ( const occ::handle< Graphic3d_CubeMap > & theCubeMap,
bool theToUpdatePBREnv = true,
bool theToUpdate = false )

Sets environment cubemap as background.

Parameters
theCubeMapcubemap source to be set as background
theToUpdatePBREnvdefines whether IBL maps will be generated or not (see 'GeneratePBREnvironment')

◆ SetBackgroundImage() [1/2]

void V3d_View::SetBackgroundImage ( const char *const theFileName,
const Aspect_FillMethod theFillStyle = Aspect_FM_CENTERED,
const bool theToUpdate = false )

Defines the background texture of the view by supplying the texture image file name and fill method (centered by default).

◆ SetBackgroundImage() [2/2]

void V3d_View::SetBackgroundImage ( const occ::handle< Graphic3d_Texture2D > & theTexture,
const Aspect_FillMethod theFillStyle = Aspect_FM_CENTERED,
const bool theToUpdate = false )

Defines the background texture of the view by supplying the texture and fill method (centered by default)

◆ SetBackgroundSkydome()

void V3d_View::SetBackgroundSkydome ( const Aspect_SkydomeBackground & theAspect,
bool theToUpdatePBREnv = true )

Sets skydome aspect.

Parameters
theAspectcubemap generation parameters
theToUpdatePBREnvdefines whether IBL maps will be generated or not

◆ SetBgGradientColors()

void V3d_View::SetBgGradientColors ( const Quantity_Color & theColor1,
const Quantity_Color & theColor2,
const Aspect_GradientFillMethod theFillStyle = Aspect_GradientFillMethod_Horizontal,
const bool theToUpdate = false )

Defines the gradient background colors of the view by supplying the colors and the fill method (horizontal by default).

◆ SetBgGradientStyle()

void V3d_View::SetBgGradientStyle ( const Aspect_GradientFillMethod theMethod = Aspect_GradientFillMethod_Horizontal,
const bool theToUpdate = false )

Defines the gradient background fill method of the view.

◆ SetBgImageStyle()

void V3d_View::SetBgImageStyle ( const Aspect_FillMethod theFillStyle,
const bool theToUpdate = false )

Defines the textured background fill method of the view.

◆ SetCamera()

void V3d_View::SetCamera ( const occ::handle< Graphic3d_Camera > & theCamera)

Change camera used by view.

◆ SetCenter()

void V3d_View::SetCenter ( const int theXp,
const int theYp )

Relocates center of screen to the point, determined by {Xp, Yp} pixel coordinates relative to the bottom-left corner of screen. To calculate pixel coordinates for any point from world coordinate space, it can be projected using "Project".

Parameters
[in]theXpthe x coordinate.
[in]theYpthe y coordinate.

◆ SetClipPlanes()

void V3d_View::SetClipPlanes ( const occ::handle< Graphic3d_SequenceOfHClipPlane > & thePlanes)

Sets sequence of clip planes to the view. The planes that have been set before are removed from the view. The composition of clip planes truncates the rendering space to convex volume. Number of supported clip planes can be consulted by InquirePlaneLimit method of Graphic3d_GraphicDriver. Please be aware that the planes that exceed the limit are ignored during rendering.

Parameters
[in]thePlanesthe clip planes to set.

◆ SetComputedMode()

void V3d_View::SetComputedMode ( const bool theMode)

Switches computed HLR mode in the view.

◆ SetDepth()

void V3d_View::SetDepth ( const double Depth)

Defines the Depth of the eye from the view point without update the projection .

◆ SetEye()

void V3d_View::SetEye ( const double X,
const double Y,
const double Z )

Defines the position of the eye..

◆ SetFocale()

void V3d_View::SetFocale ( const double Focale)

Change View Plane Distance for Perspective Views Warning! raises TypeMismatch from Standard if the view is not a perspective view.

◆ SetFront()

void V3d_View::SetFront ( )

modify the Projection of the view perpendicularly to the privileged plane of the viewer.

◆ SetFrustumCulling()

void V3d_View::SetFrustumCulling ( bool theMode)
inline

Turn on/off automatic culling of objects outside frustum (ON by default)

◆ SetGrid()

void V3d_View::SetGrid ( const gp_Ax3 & aPlane,
const occ::handle< Aspect_Grid > & aGrid )

Defines or updates the grid plane and snap object on this view.

Parameters
[in]aPlanegrid plane (origin + axes)
[in]aGridsnap object (Aspect_RectangularGrid or Aspect_CircularGrid)

◆ SetGridActivity()

void V3d_View::SetGridActivity ( const bool aFlag)

Activates / deactivates snap on this view.

Parameters
[in]aFlagtrue to enable snap, false to disable

◆ SetImageBasedLighting()

void V3d_View::SetImageBasedLighting ( bool theToEnableIBL,
bool theToUpdate = false )

Enables or disables IBL (Image Based Lighting) from background cubemap. Has no effect if PBR is not used.

Parameters
[in]theToEnableIBLenable or disable IBL from background cubemap
[in]theToUpdateredraw the view

◆ SetImmediateUpdate()

bool V3d_View::SetImmediateUpdate ( const bool theImmediateUpdate)

sets the immediate update mode and returns the previous one.

◆ SetLightOff() [1/2]

void V3d_View::SetLightOff ( )

Deactivate all the Lights defined in this view.

◆ SetLightOff() [2/2]

void V3d_View::SetLightOff ( const occ::handle< V3d_Light > & theLight)

Deactivate theLight in this view.

◆ SetLightOn() [1/2]

void V3d_View::SetLightOn ( )

Activates all the lights defined in this view.

◆ SetLightOn() [2/2]

void V3d_View::SetLightOn ( const occ::handle< V3d_Light > & theLight)

Activates theLight in the view.

◆ SetMagnify()

void V3d_View::SetMagnify ( const occ::handle< Aspect_Window > & theWindow,
const occ::handle< V3d_View > & thePreviousView,
const int theX1,
const int theY1,
const int theX2,
const int theY2 )

◆ SetProj() [1/2]

void V3d_View::SetProj ( const double Vx,
const double Vy,
const double Vz )

Defines the orientation of the projection.

◆ SetProj() [2/2]

void V3d_View::SetProj ( const V3d_TypeOfOrientation theOrientation,
const bool theIsYup = false )

Defines the orientation of the projection .

Parameters
theOrientationcamera direction
theIsYupflag indicating Y-up (TRUE) or Z-up (FALSE) convention

◆ SetScale()

void V3d_View::SetScale ( const double Coef)

Zooms the view by a factor relative to the value initialised by SetViewMappingDefault(). Updates the view.

◆ SetShadingModel()

void V3d_View::SetShadingModel ( const Graphic3d_TypeOfShadingModel theShadingModel)

Defines the shading model for the visualization.

◆ SetSize()

void V3d_View::SetSize ( const double theSize)

Defines the view projection size in its maximum dimension, keeping the initial height/width ratio unchanged.

◆ SetTextureEnv()

void V3d_View::SetTextureEnv ( const occ::handle< Graphic3d_TextureEnv > & theTexture)

Sets the environment texture to use. No environment texture by default.

◆ SetTwist()

void V3d_View::SetTwist ( const double Angle)

Defines the angular position of the high point of the reference frame of the view with respect to the Y screen axis with an absolute angular value in RADIANS.

◆ SetUp() [1/2]

void V3d_View::SetUp ( const double Vx,
const double Vy,
const double Vz )

Defines the orientation of the high point.

◆ SetUp() [2/2]

void V3d_View::SetUp ( const V3d_TypeOfOrientation Orientation)

Defines the orientation(SO) of the high point.

◆ SetViewMappingDefault()

void V3d_View::SetViewMappingDefault ( )

Saves the current view mapping. This will be the state returned from ResetViewmapping.

◆ SetViewOrientationDefault()

void V3d_View::SetViewOrientationDefault ( )

Saves the current state of the orientation of the view which will be the return state at ResetViewOrientation.

◆ SetVisualization()

void V3d_View::SetVisualization ( const V3d_TypeOfVisualization theType)

Defines the visualization type in the view.

◆ SetWindow() [1/2]

void V3d_View::SetWindow ( const occ::handle< Aspect_Window > & theWindow,
const Aspect_RenderingContext theContext = nullptr )

Activates the view in the specified Window If <aContext> is not NULL the graphic context is used to draw something in this view. Otherwise an internal graphic context is created. Warning: The view is centered and resized to preserve the height/width ratio of the window.

◆ SetWindow() [2/2]

void V3d_View::SetWindow ( const occ::handle< V3d_View > & theParentView,
const NCollection_Vec2< double > & theSize,
Aspect_TypeOfTriedronPosition theCorner = Aspect_TOTP_LEFT_UPPER,
const NCollection_Vec2< double > & theOffset = NCollection_Vec2double >(),
const NCollection_Vec2< int > & theMargins = NCollection_Vec2int >() )

Activates the view as subview of another view.

Parameters
[in]theParentViewparent view to put subview into
[in]theSizesubview dimensions; values >= 2 define size in pixels, values <= 1.0 define size as a fraction of parent view
[in]theCornercorner within parent view
[in]theOffsetoffset from the corner; values >= 1 define offset in pixels, values < 1.0 define offset as a fraction of parent view
[in]theMarginssubview margins in pixels

Example: to split parent view horizontally into 2 subview, define one subview with Size=(0.5,1.0),Offset=(0.0,0.0), and 2nd with Size=(0.5,1.0),Offset=(5.0,0.0);

◆ SetZoom()

void V3d_View::SetZoom ( const double Coef,
const bool Start = true )

Zooms the view by a factor relative to the initial value expressed by Start = true Updates the view.

◆ SetZSize()

void V3d_View::SetZSize ( const double SetZSize)

Defines the Depth size of the view Front Plane will be set to Size/2. Back Plane will be set to -Size/2. Any Object located Above the Front Plane or behind the Back Plane will be Clipped . NOTE than the XY Size of the View is NOT modified .

◆ ShadingModel()

Graphic3d_TypeOfShadingModel V3d_View::ShadingModel ( ) const

Returns the current shading model; Graphic3d_TypeOfShadingModel_Phong by default.

◆ Size()

void V3d_View::Size ( double & Width,
double & Height ) const

Returns the height and width of the view.

◆ StartRotation()

void V3d_View::StartRotation ( const int X,
const int Y,
const double zRotationThreshold = 0.0 )

Begin the rotation of the view around the screen axis according to the mouse position <X,Y>. Warning: Enable rotation around the Z screen axis when <zRotationThreshold> factor is > 0 soon the distance from the start point and the center of the view is > (medium viewSize * <zRotationThreshold> ). Generally a value of 0.4 is usable to rotate around XY screen axis inside the circular threshold area and to rotate around Z screen axis outside this area.

◆ StartZoomAtPoint()

void V3d_View::StartZoomAtPoint ( const int theXp,
const int theYp )

Defines starting point for ZoomAtPoint view operation.

Parameters
[in]theXpthe x mouse coordinate, in pixels.
[in]theYpthe y mouse coordinate, in pixels.

◆ StatisticInformation() [1/2]

TCollection_AsciiString V3d_View::StatisticInformation ( ) const

Returns string with statistic performance info.

◆ StatisticInformation() [2/2]

void V3d_View::StatisticInformation ( NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > & theDict) const

Fills in the dictionary with statistic performance info.

◆ Subviews()

const NCollection_Sequence< occ::handle< V3d_View > > & V3d_View::Subviews ( ) const
inline

Return subview list.

◆ TextureEnv()

occ::handle< Graphic3d_TextureEnv > V3d_View::TextureEnv ( ) const

◆ ToPixMap() [1/2]

bool V3d_View::ToPixMap ( Image_PixMap & theImage,
const int theWidth,
const int theHeight,
const Graphic3d_BufferType & theBufferType = Graphic3d_BT_RGB,
const bool theToAdjustAspect = true,
const Graphic3d_ZLayerId theTargetZLayerId = Graphic3d_ZLayerId_BotOSD,
const int theIsSingleLayer = false,
const V3d_StereoDumpOptions theStereoOptions = V3d_SDO_MONO,
const char *const theLightName = "" )
inline

Dumps the full contents of the view to a pixmap. Internally this method calls Redraw() with an offscreen render buffer of requested target size (theWidth x theHeight), so that there is no need resizing a window control for making a dump of different size.

Parameters
theImagetarget image, will be re-allocated to match theWidth x theHeight
theWidthtarget image width
theHeighttarget image height
theBufferTypetype of the view buffer to dump (color / depth)
theToAdjustAspectwhen true, active view aspect ratio will be overridden by (theWidth / theHeight)
theStereoOptionshow to dump stereographic camera

◆ ToPixMap() [2/2]

bool V3d_View::ToPixMap ( Image_PixMap & theImage,
const V3d_ImageDumpOptions & theParams )

Dumps the full contents of the view to a pixmap with specified parameters. Internally this method calls Redraw() with an offscreen render buffer of requested target size (theWidth x theHeight), so that there is no need resizing a window control for making a dump of different size.

◆ Translate() [1/4]

void V3d_View::Translate ( const double Dx,
const double Dy,
const double Dz,
const bool Start = true )

Movement of the ye and the view point parallel to the frame of reference of the screen a distance relative to the initial position expressed by Start = true.

◆ Translate() [2/4]

void V3d_View::Translate ( const double Length,
const bool Start = true )

Movement of the eye and view point parallel to the current axis a distance relative to the initial position expressed by Start = true.

◆ Translate() [3/4]

void V3d_View::Translate ( const occ::handle< Graphic3d_Camera > & theCamera,
const double theDXv,
const double theDYv ) const
protected

initializes an iteration on the active Lights.

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

◆ Translate() [4/4]

void V3d_View::Translate ( const V3d_TypeOfAxe Axe,
const double Length,
const bool Start = true )

Movement of the eye and the view point parallel to one of the axes of the fame of reference of the view a distance relative to the initial position expressed by Start = true.

◆ TriedronDisplay()

void V3d_View::TriedronDisplay ( const Aspect_TypeOfTriedronPosition thePosition = Aspect_TOTP_CENTER,
const Quantity_Color & theColor = Quantity_NOC_WHITE,
const double theScale = 0.02,
const V3d_TypeOfVisualization theMode = V3d_WIREFRAME )

Display of the Triedron. Initialize position, color and length of Triedron axes. The scale is a percent of the window width.

◆ TriedronErase()

void V3d_View::TriedronErase ( )

Erases the Triedron.

◆ Trihedron()

const occ::handle< V3d_Trihedron > & V3d_View::Trihedron ( bool theToCreate = true)
inline

Returns trihedron object.

◆ Turn() [1/3]

void V3d_View::Turn ( const double Angle,
const bool Start = true )

Rotation of the view point around the current axis an angular value in RADIANS relative to the initial position expressed by Start = true.

◆ Turn() [2/3]

void V3d_View::Turn ( const double Ax,
const double Ay,
const double Az,
const bool Start = true )

Rotation of the view point around the frame of reference of the screen for which the origin is the eye of the projection with a relative angular value in RADIANS with respect to the initial position expressed by Start = true.

◆ Turn() [3/3]

void V3d_View::Turn ( const V3d_TypeOfAxe Axe,
const double Angle,
const bool Start = true )

Rotation of the view point around one of the axes of the frame of reference of the view for which the origin is the eye of the projection with an angular value in RADIANS relative to the initial position expressed by Start = true.

◆ Twist()

double V3d_View::Twist ( ) const

Returns in RADIANS the orientation of the view around the visual axis measured from the Y axis of the screen.

◆ Type()

V3d_TypeOfView V3d_View::Type ( ) const

Returns the Type of the View.

◆ Up()

void V3d_View::Up ( double & Vx,
double & Vy,
double & Vz ) const

Returns the vector giving the position of the high point.

◆ Update()

void V3d_View::Update ( ) const

Deprecated, Redraw() should be used instead.

◆ UpdateLights()

void V3d_View::UpdateLights ( ) const

Updates the lights of the view.

◆ View()

const occ::handle< Graphic3d_CView > & V3d_View::View ( ) const
inline

Returns the associated Graphic3d view.

◆ Viewer()

occ::handle< V3d_Viewer > V3d_View::Viewer ( ) const
inline

Returns the viewer in which the view has been created.

◆ Visualization()

V3d_TypeOfVisualization V3d_View::Visualization ( ) const

Returns the current visualisation mode.

◆ Window()

const occ::handle< Aspect_Window > & V3d_View::Window ( ) const
inline

Returns the Aspect Window associated with the view.

◆ WindowFit()

void V3d_View::WindowFit ( const int theMinXp,
const int theMinYp,
const int theMaxXp,
const int theMaxYp )

Centers the defined PIXEL window so that it occupies the maximum space while respecting the initial height/width ratio. NOTE than the original Z size of the view is NOT modified.

Parameters
[in]theMinXppixel coordinates of minimal corner on x screen axis.
[in]theMinYppixel coordinates of minimal corner on y screen axis.
[in]theMaxXppixel coordinates of maximal corner on x screen axis.
[in]theMaxYppixel coordinates of maximal corner on y screen axis.

◆ WindowFitAll()

void V3d_View::WindowFitAll ( const int Xmin,
const int Ymin,
const int Xmax,
const int Ymax )
inline

idem than WindowFit

◆ ZBufferTriedronSetup()

void V3d_View::ZBufferTriedronSetup ( const Quantity_Color & theXColor = Quantity_NOC_RED,
const Quantity_Color & theYColor = Quantity_NOC_GREEN,
const Quantity_Color & theZColor = Quantity_NOC_BLUE1,
const double theSizeRatio = 0.8,
const double theAxisDiametr = 0.05,
const int theNbFacettes = 12 )

Customization of the ZBUFFER Triedron. XColor,YColor,ZColor - colors of axis SizeRatio - ratio of decreasing of the trihedron size when its physical position comes out of the view AxisDiametr - diameter relatively to axis length NbFacettes - number of facets of cylinders and cones.

◆ ZFitAll()

void V3d_View::ZFitAll ( const double theScaleFactor = 1.0) const

Change Z-min and Z-max planes of projection volume to match the displayed objects.

◆ Zoom()

void V3d_View::Zoom ( const int theXp1,
const int theYp1,
const int theXp2,
const int theYp2 )

Zoom the view according to a zoom factor computed from the distance between the 2 mouse position.

Parameters
[in]theXp1the x coordinate of first mouse position, in pixels.
[in]theYp1the y coordinate of first mouse position, in pixels.
[in]theXp2the x coordinate of second mouse position, in pixels.
[in]theYp2the y coordinate of second mouse position, in pixels.

◆ ZoomAtPoint()

void V3d_View::ZoomAtPoint ( const int theMouseStartX,
const int theMouseStartY,
const int theMouseEndX,
const int theMouseEndY )

Zooms the model at a pixel defined by the method StartZoomAtPoint().

◆ ZSize()

double V3d_View::ZSize ( ) const

Returns the Depth of the view .

Field Documentation

◆ myCamStartOpCenter

gp_Pnt V3d_View::myCamStartOpCenter
protected

initializes an iteration on the active Lights.

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

◆ myCamStartOpDir

gp_Dir V3d_View::myCamStartOpDir
protected

initializes an iteration on the active Lights.

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

◆ myCamStartOpEye

gp_Pnt V3d_View::myCamStartOpEye
protected

initializes an iteration on the active Lights.

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

◆ myCamStartOpUp

gp_Dir V3d_View::myCamStartOpUp
protected

initializes an iteration on the active Lights.

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

◆ myDefaultCamera

occ::handle<Graphic3d_Camera> V3d_View::myDefaultCamera
protected

initializes an iteration on the active Lights.

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

◆ myImmediateUpdate

bool V3d_View::myImmediateUpdate
protected

initializes an iteration on the active Lights.

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

◆ myIsInvalidatedImmediate

bool V3d_View::myIsInvalidatedImmediate
mutableprotected

initializes an iteration on the active Lights.

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

◆ myOldMouseX

double V3d_View::myOldMouseX
protected

initializes an iteration on the active Lights.

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

◆ myOldMouseY

double V3d_View::myOldMouseY
protected

initializes an iteration on the active Lights.

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

◆ myView

occ::handle<Graphic3d_CView> V3d_View::myView
protected

initializes an iteration on the active Lights.

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

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