Open CASCADE Technology 7.8.2.dev
|
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>
Public Member Functions | |
V3d_View (const Handle< V3d_Viewer > &theViewer, const V3d_TypeOfView theType=V3d_ORTHOGRAPHIC) | |
Initializes the view. | |
V3d_View (const Handle< V3d_Viewer > &theViewer, const Handle< V3d_View > &theView) | |
Initializes the view by copying. | |
virtual | ~V3d_View () |
Default destructor. | |
void | SetWindow (const Handle< Aspect_Window > &theWindow, const Aspect_RenderingContext theContext=NULL) |
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 Handle< V3d_View > &theParentView, const Graphic3d_Vec2d &theSize, Aspect_TypeOfTriedronPosition theCorner=Aspect_TOTP_LEFT_UPPER, const Graphic3d_Vec2d &theOffset=Graphic3d_Vec2d(), const Graphic3d_Vec2i &theMargins=Graphic3d_Vec2i()) |
Activates the view as subview of another view. | |
void | SetMagnify (const Handle< Aspect_Window > &theWindow, const Handle< V3d_View > &thePreviousView, const Standard_Integer theX1, const Standard_Integer theY1, const Standard_Integer theX2, const Standard_Integer 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. | |
Standard_Boolean | IsInvalidated () const |
Returns true if cached view content has been invalidated. | |
Standard_Boolean | 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. | |
Standard_Boolean | 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 Standard_Boolean theIsOn, const Standard_Real 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. | |
Standard_Boolean | AutoZFitMode () const |
returns TRUE if automatic z-fit mode is turned on. | |
Standard_Real | 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 Standard_Real 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 Standard_Real theV1, const Standard_Real theV2, const Standard_Real 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 Standard_Boolean theToUpdate=Standard_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 Standard_Boolean theToUpdate=Standard_False) |
Defines the gradient background fill method of the view. | |
void | SetBackgroundImage (const Standard_CString theFileName, const Aspect_FillMethod theFillStyle=Aspect_FM_CENTERED, const Standard_Boolean theToUpdate=Standard_False) |
Defines the background texture of the view by supplying the texture image file name and fill method (centered by default). | |
void | SetBackgroundImage (const Handle< Graphic3d_Texture2D > &theTexture, const Aspect_FillMethod theFillStyle=Aspect_FM_CENTERED, const Standard_Boolean theToUpdate=Standard_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 Standard_Boolean theToUpdate=Standard_False) |
Defines the textured background fill method of the view. | |
void | SetBackgroundCubeMap (const Handle< Graphic3d_CubeMap > &theCubeMap, Standard_Boolean theToUpdatePBREnv=Standard_True, Standard_Boolean theToUpdate=Standard_False) |
Sets environment cubemap as background. | |
const Aspect_SkydomeBackground & | BackgroundSkydome () const |
Returns skydome aspect;. | |
void | SetBackgroundSkydome (const Aspect_SkydomeBackground &theAspect, Standard_Boolean theToUpdatePBREnv=Standard_True) |
Sets skydome aspect. | |
Standard_Boolean | IsImageBasedLighting () const |
Returns TRUE if IBL (Image Based Lighting) from background cubemap is enabled. | |
void | SetImageBasedLighting (Standard_Boolean theToEnableIBL, Standard_Boolean theToUpdate=Standard_False) |
Enables or disables IBL (Image Based Lighting) from background cubemap. Has no effect if PBR is not used. | |
void | GeneratePBREnvironment (Standard_Boolean theToUpdate=Standard_False) |
Activates IBL from background cubemap. | |
void | ClearPBREnvironment (Standard_Boolean theToUpdate=Standard_False) |
Disables IBL from background cubemap; fills PBR specular probe and irradiance map with white color. | |
void | SetTextureEnv (const Handle< Graphic3d_TextureEnv > &theTexture) |
Sets the environment texture to use. No environment texture by default. | |
void | SetAxis (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real Vx, const Standard_Real Vy, const Standard_Real 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 Handle< V3d_Light > &theLight) |
Activates theLight in the view. | |
void | SetLightOn () |
Activates all the lights defined in this view. | |
void | SetLightOff (const Handle< V3d_Light > &theLight) |
Deactivate theLight in this view. | |
void | SetLightOff () |
Deactivate all the Lights defined in this view. | |
Standard_Boolean | IsActiveLight (const Handle< V3d_Light > &theLight) const |
Returns TRUE when the light is active in this view. | |
Standard_Boolean | SetImmediateUpdate (const Standard_Boolean theImmediateUpdate) |
sets the immediate update mode and returns the previous one. | |
const 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 Standard_Real theSizeRatio=0.8, const Standard_Real theAxisDiametr=0.05, const Standard_Integer 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 Standard_Real 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_GraduatedTrihedron & | GetGraduatedTrihedron () 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 Standard_Real Ax, const Standard_Real Ay, const Standard_Real Az, const Standard_Boolean Start=Standard_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 = Standard_True Warning! raises BadValue from V3d If the eye, the view point, or the high point are aligned or confused. | |
void | Rotate (const Standard_Real Ax, const Standard_Real Ay, const Standard_Real Az, const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Boolean Start=Standard_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 = Standard_True If the eye, the view point, or the high point are aligned or confused. | |
void | Rotate (const V3d_TypeOfAxe Axe, const Standard_Real Angle, const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Boolean Start=Standard_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 = Standard_True. | |
void | Rotate (const V3d_TypeOfAxe Axe, const Standard_Real Angle, const Standard_Boolean Start=Standard_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 = Standard_True. | |
void | Rotate (const Standard_Real Angle, const Standard_Boolean Start=Standard_True) |
Rotates the eye around the current axis a relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True. | |
void | Move (const Standard_Real Dx, const Standard_Real Dy, const Standard_Real Dz, const Standard_Boolean Start=Standard_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 = Standard_True. | |
void | Move (const V3d_TypeOfAxe Axe, const Standard_Real Length, const Standard_Boolean Start=Standard_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 = Standard_True. | |
void | Move (const Standard_Real Length, const Standard_Boolean Start=Standard_True) |
Movement of the eye parllel to the current axis a distance relative to the initial position expressed by Start = Standard_True. | |
void | Translate (const Standard_Real Dx, const Standard_Real Dy, const Standard_Real Dz, const Standard_Boolean Start=Standard_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 = Standard_True. | |
void | Translate (const V3d_TypeOfAxe Axe, const Standard_Real Length, const Standard_Boolean Start=Standard_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 = Standard_True. | |
void | Translate (const Standard_Real Length, const Standard_Boolean Start=Standard_True) |
Movement of the eye and view point parallel to the current axis a distance relative to the initial position expressed by Start = Standard_True. | |
void | Place (const Standard_Integer theXp, const Standard_Integer theYp, const Standard_Real 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 Standard_Real Ax, const Standard_Real Ay, const Standard_Real Az, const Standard_Boolean Start=Standard_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 = Standard_True. | |
void | Turn (const V3d_TypeOfAxe Axe, const Standard_Real Angle, const Standard_Boolean Start=Standard_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 = Standard_True. | |
void | Turn (const Standard_Real Angle, const Standard_Boolean Start=Standard_True) |
Rotation of the view point around the current axis an angular value in RADIANS relative to the initial position expressed by Start = Standard_True. | |
void | SetTwist (const Standard_Real 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 Standard_Real X, const Standard_Real Y, const Standard_Real Z) |
Defines the position of the eye.. | |
void | SetDepth (const Standard_Real Depth) |
Defines the Depth of the eye from the view point without update the projection . | |
void | SetProj (const Standard_Real Vx, const Standard_Real Vy, const Standard_Real Vz) |
Defines the orientation of the projection. | |
void | SetProj (const V3d_TypeOfOrientation theOrientation, const Standard_Boolean theIsYup=Standard_False) |
Defines the orientation of the projection . | |
void | SetAt (const Standard_Real X, const Standard_Real Y, const Standard_Real Z) |
Defines the position of the view point. | |
void | SetUp (const Standard_Real Vx, const Standard_Real Vy, const Standard_Real 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 Standard_Real theDXv, const Standard_Real theDYv, const Standard_Real theZoomFactor=1, const Standard_Boolean theToStart=Standard_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 Standard_Integer theXp, const Standard_Integer 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 Standard_Real theSize) |
Defines the view projection size in its maximum dimension, keeping the initial height/width ratio unchanged. | |
void | SetZSize (const Standard_Real 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 Standard_Real Coef, const Standard_Boolean Start=Standard_True) |
Zooms the view by a factor relative to the initial value expressed by Start = Standard_True Updates the view. | |
void | SetScale (const Standard_Real Coef) |
Zooms the view by a factor relative to the value initialised by SetViewMappingDefault(). Updates the view. | |
void | SetAxialScale (const Standard_Real Sx, const Standard_Real Sy, const Standard_Real 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 Standard_Real theMargin=0.01, const Standard_Boolean theToUpdate=Standard_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 Standard_Real theMargin=0.01, const Standard_Boolean theToUpdate=Standard_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 Standard_Real Aspect=0.01, const Standard_Real 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 Standard_Real theMinXv, const Standard_Real theMinYv, const Standard_Real theMaxXv, const Standard_Real 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 Standard_Integer theMinXp, const Standard_Integer theMinYp, const Standard_Integer theMaxXp, const Standard_Integer 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 Standard_Boolean theToUpdate=Standard_True) |
Resets the centering and the orientation of the view. | |
Standard_Real | Convert (const Standard_Integer Vp) const |
Converts the PIXEL value to a value in the projection plane. | |
void | Convert (const Standard_Integer Xp, const Standard_Integer Yp, Standard_Real &Xv, Standard_Real &Yv) const |
Converts the point PIXEL into a point projected in the reference frame of the projection plane. | |
Standard_Integer | Convert (const Standard_Real Vv) const |
Converts tha value of the projection plane into a PIXEL value. | |
void | Convert (const Standard_Real Xv, const Standard_Real Yv, Standard_Integer &Xp, Standard_Integer &Yp) const |
Converts the point defined in the reference frame of the projection plane into a point PIXEL. | |
void | Convert (const Standard_Integer Xp, const Standard_Integer Yp, Standard_Real &X, Standard_Real &Y, Standard_Real &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 Standard_Integer Xp, const Standard_Integer Yp, Standard_Real &X, Standard_Real &Y, Standard_Real &Z, Standard_Real &Vx, Standard_Real &Vy, Standard_Real &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 Standard_Integer Xp, const Standard_Integer Yp, Standard_Real &Xg, Standard_Real &Yg, Standard_Real &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(Standard_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 Standard_Real X, const Standard_Real Y, const Standard_Real Z, Standard_Real &Xg, Standard_Real &Yg, Standard_Real &Zg) const |
Converts the point into the nearest grid point and display the grid marker. | |
void | Convert (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, Standard_Integer &Xp, Standard_Integer &Yp) const |
Projects the point defined in the reference frame of the view into the projected point in the associated window. | |
void | Project (const Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, Standard_Real &theXp, Standard_Real &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 Standard_Real theX, const Standard_Real theY, const Standard_Real theZ, Standard_Real &theXp, Standard_Real &theYp, Standard_Real &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, Standard_Real &V1, Standard_Real &V2, Standard_Real &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. | |
Standard_Real | Scale () const |
Returns the current value of the zoom expressed with respect to SetViewMappingDefault(). | |
void | AxialScale (Standard_Real &Sx, Standard_Real &Sy, Standard_Real &Sz) const |
Returns the current values of the anisotropic (axial) scale factors. | |
void | Size (Standard_Real &Width, Standard_Real &Height) const |
Returns the height and width of the view. | |
Standard_Real | ZSize () const |
Returns the Depth of the view . | |
void | Eye (Standard_Real &X, Standard_Real &Y, Standard_Real &Z) const |
Returns the position of the eye. | |
void | FocalReferencePoint (Standard_Real &X, Standard_Real &Y, Standard_Real &Z) const |
Returns the position of point which emanating the projections. | |
void | ProjReferenceAxe (const Standard_Integer Xpix, const Standard_Integer Ypix, Standard_Real &XP, Standard_Real &YP, Standard_Real &ZP, Standard_Real &VX, Standard_Real &VY, Standard_Real &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). | |
Standard_Real | Depth () const |
Returns the Distance between the Eye and View Point. | |
void | Proj (Standard_Real &Vx, Standard_Real &Vy, Standard_Real &Vz) const |
Returns the projection vector. | |
void | At (Standard_Real &X, Standard_Real &Y, Standard_Real &Z) const |
Returns the position of the view point. | |
void | Up (Standard_Real &Vx, Standard_Real &Vy, Standard_Real &Vz) const |
Returns the vector giving the position of the high point. | |
Standard_Real | 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. | |
Handle< Graphic3d_TextureEnv > | TextureEnv () const |
V3d_TypeOfVisualization | Visualization () const |
Returns the current visualisation mode. | |
const V3d_ListOfLight & | ActiveLights () const |
Returns a list of active lights. | |
V3d_ListOfLightIterator | ActiveLightIterator () const |
Return iterator for defined lights. | |
Standard_Integer | LightLimit () const |
Returns the MAX number of light associated to the view. | |
Handle< V3d_Viewer > | Viewer () const |
Returns the viewer in which the view has been created. | |
Standard_Boolean | IfWindow () const |
Returns True if MyView is associated with a window . | |
const 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 Standard_Integer theDXp, const Standard_Integer theDYp, const Standard_Real theZoomFactor=1, const Standard_Boolean theToStart=Standard_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 Standard_Integer theXp1, const Standard_Integer theYp1, const Standard_Integer theXp2, const Standard_Integer theYp2) |
Zoom the view according to a zoom factor computed from the distance between the 2 mouse position. | |
void | StartZoomAtPoint (const Standard_Integer theXp, const Standard_Integer theYp) |
Defines starting point for ZoomAtPoint view operation. | |
void | ZoomAtPoint (const Standard_Integer theMouseStartX, const Standard_Integer theMouseStartY, const Standard_Integer theMouseEndX, const Standard_Integer theMouseEndY) |
Zooms the model at a pixel defined by the method StartZoomAtPoint(). | |
void | AxialScale (const Standard_Integer Dx, const Standard_Integer 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 Standard_Integer X, const Standard_Integer Y, const Standard_Real 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 Standard_Integer X, const Standard_Integer Y) |
Continues the rotation of the view with an angle computed from the last and new mouse position <X,Y>. | |
void | SetFocale (const Standard_Real Focale) |
Change View Plane Distance for Perspective Views Warning! raises TypeMismatch from Standard if the view is not a perspective view. | |
Standard_Real | Focale () const |
Returns the View Plane Distance for Perspective Views. | |
const Handle< Graphic3d_CView > & | View () const |
Returns the associated Graphic3d view. | |
void | SetComputedMode (const Standard_Boolean theMode) |
Switches computed HLR mode in the view. | |
Standard_Boolean | ComputedMode () const |
Returns the computed HLR mode state. | |
void | WindowFitAll (const Standard_Integer Xmin, const Standard_Integer Ymin, const Standard_Integer Xmax, const Standard_Integer Ymax) |
idem than WindowFit | |
Standard_Boolean | FitMinMax (const Handle< Graphic3d_Camera > &theCamera, const Bnd_Box &theBox, const Standard_Real theMargin, const Standard_Real theResolution=0.0, const Standard_Boolean theToEnlargeIfLine=Standard_True) const |
Transform camera eye, center and scale to fit in the passed bounding box specified in WCS. | |
void | SetGrid (const gp_Ax3 &aPlane, const Handle< Aspect_Grid > &aGrid) |
Defines or Updates the definition of the grid in <me> | |
void | SetGridActivity (const Standard_Boolean aFlag) |
Defines or Updates the activity of the grid in <me> | |
Standard_Boolean | Dump (const Standard_CString 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. | |
Standard_Boolean | 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. | |
Standard_Boolean | ToPixMap (Image_PixMap &theImage, const Standard_Integer theWidth, const Standard_Integer theHeight, const Graphic3d_BufferType &theBufferType=Graphic3d_BT_RGB, const Standard_Boolean theToAdjustAspect=Standard_True, const Graphic3d_ZLayerId theTargetZLayerId=Graphic3d_ZLayerId_BotOSD, const Standard_Integer theIsSingleLayer=Standard_False, const V3d_StereoDumpOptions theStereoOptions=V3d_SDO_MONO, const Standard_CString 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 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 Handle< Graphic3d_ClipPlane > &thePlane) |
Removes clip plane from the view. | |
const Handle< Graphic3d_SequenceOfHClipPlane > & | ClipPlanes () const |
Get clip planes. | |
void | SetClipPlanes (const 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. | |
Standard_Integer | PlaneLimit () const |
Returns the MAX number of clipping planes associated to the view. | |
void | SetCamera (const Handle< Graphic3d_Camera > &theCamera) |
Change camera used by view. | |
const Handle< Graphic3d_Camera > & | Camera () const |
Returns camera object of the view. | |
const Handle< Graphic3d_Camera > & | DefaultCamera () const |
Return default camera. | |
const Graphic3d_RenderingParams & | 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(). | |
Graphic3d_RenderingParams & | ChangeRenderingParams () |
Returns reference to current rendering parameters and effect settings. | |
Standard_Boolean | IsCullingEnabled () const |
void | SetFrustumCulling (Standard_Boolean theMode) |
Turn on/off automatic culling of objects outside frustum (ON by default) | |
void | DiagnosticInformation (TColStd_IndexedDataMapOfStringString &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 (TColStd_IndexedDataMapOfStringString &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, Standard_Integer theDepth=-1) const |
Dumps the content of me into the stream. | |
subvew management | |
bool | IsSubview () const |
Return TRUE if this is a subview of another view. | |
V3d_View * | ParentView () |
Return parent View or NULL if this is not a subview. | |
const NCollection_Sequence< Handle< V3d_View > > & | Subviews () const |
Return subview list. | |
Handle< V3d_View > | PickSubview (const Graphic3d_Vec2i &thePnt) const |
Pick subview from the given 2D point. | |
void | AddSubview (const 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_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. | |
virtual | ~Standard_Transient () |
Destructor must be virtual. | |
virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
Returns a type descriptor about this object. | |
Standard_Boolean | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
Returns a true value if this is an instance of Type. | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. | |
Standard_Boolean | IsKind (const opencascade::handle< Standard_Type > &theType) const |
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
Standard_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. | |
Standard_Integer | GetRefCount () const noexcept |
Get the reference counter of this object. | |
void | IncrementRefCounter () noexcept |
Increments the reference counter of this object. | |
Standard_Integer | DecrementRefCounter () noexcept |
Decrements the reference counter of this object; returns the decremented value. | |
virtual void | Delete () const |
Memory deallocator for transient classes. | |
deprecated methods | |
Standard_Real | myOldMouseX |
Returns True if One light more can be activated in this View. | |
Standard_Real | myOldMouseY |
Returns True if One light more can be activated in this View. | |
gp_Dir | myCamStartOpUp |
Returns True if One light more can be activated in this View. | |
gp_Dir | myCamStartOpDir |
Returns True if One light more can be activated in this View. | |
gp_Pnt | myCamStartOpEye |
Returns True if One light more can be activated in this View. | |
gp_Pnt | myCamStartOpCenter |
Returns True if One light more can be activated in this View. | |
Handle< Graphic3d_Camera > | myDefaultCamera |
Returns True if One light more can be activated in this View. | |
Handle< Graphic3d_CView > | myView |
Returns True if One light more can be activated in this View. | |
Standard_Boolean | myImmediateUpdate |
Returns True if One light more can be activated in this View. | |
Standard_Boolean | myIsInvalidatedImmediate |
Returns True if One light more can be activated in this View. | |
Standard_Boolean | IfMoreLights () const |
Returns True if One light more can be activated in this View. | |
void | InitActiveLights () |
initializes an iteration on the active Lights. | |
Standard_Boolean | MoreActiveLights () const |
returns true if there are more active Light(s) to return. | |
void | NextActiveLights () |
Go to the next active Light (if there is not, ActiveLight will raise an exception) | |
const Handle< V3d_Light > & | ActiveLight () const |
void | ImmediateUpdate () const |
Returns True if One light more can be activated in this View. | |
void | Scale (const Handle< Graphic3d_Camera > &theCamera, const Standard_Real theSizeXv, const Standard_Real 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 Handle< Graphic3d_Camera > &theCamera, const Standard_Real theDXv, const Standard_Real theDYv) const |
Returns True if One light more can be activated in this View. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
typedef void | base_type |
Returns a type descriptor about this object. | |
Static Public Member Functions inherited from Standard_Transient | |
static constexpr const char * | get_type_name () |
Returns a type descriptor about this object. | |
static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
Returns type descriptor of Standard_Transient class. | |
Defines 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)
V3d_View::V3d_View | ( | const Handle< V3d_Viewer > & | theViewer, |
const V3d_TypeOfView | theType = V3d_ORTHOGRAPHIC ) |
Initializes the view.
V3d_View::V3d_View | ( | const Handle< V3d_Viewer > & | theViewer, |
const Handle< V3d_View > & | theView ) |
Initializes the view by copying.
|
virtual |
Default destructor.
|
inline |
Return iterator for defined lights.
|
inline |
Returns a list of active lights.
|
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.
thePlane | [in] the clip plane to be added to view. |
void V3d_View::At | ( | Standard_Real & | X, |
Standard_Real & | Y, | ||
Standard_Real & | Z ) const |
Returns the position of the view point.
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.
|
inline |
returns TRUE if automatic z-fit mode is turned on.
|
inline |
returns scale factor parameter of automatic z-fit mode.
void V3d_View::AxialScale | ( | const Standard_Integer | Dx, |
const Standard_Integer | 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 V3d_View::AxialScale | ( | Standard_Real & | Sx, |
Standard_Real & | Sy, | ||
Standard_Real & | Sz ) const |
Returns the current values of the anisotropic (axial) scale factors.
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.
Quantity_Color V3d_View::BackgroundColor | ( | ) | const |
Returns the Background color object of the view.
void V3d_View::BackgroundColor | ( | const Quantity_TypeOfColor | Type, |
Standard_Real & | V1, | ||
Standard_Real & | V2, | ||
Standard_Real & | V3 ) const |
Returns the Background color values of the view depending of the color Type.
|
inline |
Returns skydome aspect;.
const Handle< Graphic3d_Camera > & V3d_View::Camera | ( | ) | const |
Returns camera object of the view.
Graphic3d_RenderingParams & V3d_View::ChangeRenderingParams | ( | ) |
Returns reference to current rendering parameters and effect settings.
|
inline |
Disables IBL from background cubemap; fills PBR specular probe and irradiance map with white color.
const Handle< Graphic3d_SequenceOfHClipPlane > & V3d_View::ClipPlanes | ( | ) | const |
Get clip planes.
Standard_Boolean V3d_View::ComputedMode | ( | ) | const |
Returns the computed HLR mode state.
Standard_Real V3d_View::Convert | ( | const Standard_Integer | Vp | ) | const |
Converts the PIXEL value to a value in the projection plane.
void V3d_View::Convert | ( | const Standard_Integer | Xp, |
const Standard_Integer | Yp, | ||
Standard_Real & | X, | ||
Standard_Real & | Y, | ||
Standard_Real & | 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 V3d_View::Convert | ( | const Standard_Integer | Xp, |
const Standard_Integer | Yp, | ||
Standard_Real & | Xv, | ||
Standard_Real & | Yv ) const |
Converts the point PIXEL into a point projected in the reference frame of the projection plane.
Standard_Integer V3d_View::Convert | ( | const Standard_Real | Vv | ) | const |
Converts tha value of the projection plane into a PIXEL value.
void V3d_View::Convert | ( | const Standard_Real | X, |
const Standard_Real | Y, | ||
const Standard_Real | Z, | ||
Standard_Integer & | Xp, | ||
Standard_Integer & | Yp ) const |
Projects the point defined in the reference frame of the view into the projected point in the associated window.
void V3d_View::Convert | ( | const Standard_Real | Xv, |
const Standard_Real | Yv, | ||
Standard_Integer & | Xp, | ||
Standard_Integer & | Yp ) const |
Converts the point defined in the reference frame of the projection plane into a point PIXEL.
void V3d_View::ConvertToGrid | ( | const Standard_Integer | Xp, |
const Standard_Integer | Yp, | ||
Standard_Real & | Xg, | ||
Standard_Real & | Yg, | ||
Standard_Real & | 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(Standard_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 V3d_View::ConvertToGrid | ( | const Standard_Real | X, |
const Standard_Real | Y, | ||
const Standard_Real | Z, | ||
Standard_Real & | Xg, | ||
Standard_Real & | Yg, | ||
Standard_Real & | Zg ) const |
Converts the point into the nearest grid point and display the grid marker.
void V3d_View::ConvertWithProj | ( | const Standard_Integer | Xp, |
const Standard_Integer | Yp, | ||
Standard_Real & | X, | ||
Standard_Real & | Y, | ||
Standard_Real & | Z, | ||
Standard_Real & | Vx, | ||
Standard_Real & | Vy, | ||
Standard_Real & | 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.
|
inline |
Return default camera.
Standard_Real V3d_View::Depth | ( | ) | const |
Returns the Distance between the Eye and View Point.
void V3d_View::DepthFitAll | ( | const Standard_Real | Aspect = 0.01, |
const Standard_Real | 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 V3d_View::DiagnosticInformation | ( | TColStd_IndexedDataMapOfStringString & | 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.
theDict | destination map for information |
theFlags | defines the information to be retrieved |
void V3d_View::DoMapping | ( | ) |
Must be called when the window supporting the view is mapped or unmapped.
Standard_Boolean V3d_View::Dump | ( | const Standard_CString | 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.
theFile | destination image file (image format is determined by file extension like .png, .bmp, .jpg) |
theBufferType | buffer to dump |
void V3d_View::DumpJson | ( | Standard_OStream & | theOStream, |
Standard_Integer | theDepth = -1 ) const |
Dumps the content of me into the stream.
void V3d_View::Eye | ( | Standard_Real & | X, |
Standard_Real & | Y, | ||
Standard_Real & | Z ) const |
Returns the position of the eye.
void V3d_View::FitAll | ( | const Bnd_Box & | theBox, |
const Standard_Real | theMargin = 0.01, | ||
const Standard_Boolean | theToUpdate = Standard_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.
theBox | [in] the custom bounding box to fit. |
theMargin | [in] the margin coefficient for view borders. |
theToUpdate | [in] flag to perform view update. |
void V3d_View::FitAll | ( | const Standard_Real | theMargin = 0.01, |
const Standard_Boolean | theToUpdate = Standard_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.
theMargin | [in] the margin coefficient for view borders. |
theToUpdate | [in] flag to perform view update. |
void V3d_View::FitAll | ( | const Standard_Real | theMinXv, |
const Standard_Real | theMinYv, | ||
const Standard_Real | theMaxXv, | ||
const Standard_Real | 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 .
Standard_Boolean V3d_View::FitMinMax | ( | const Handle< Graphic3d_Camera > & | theCamera, |
const Bnd_Box & | theBox, | ||
const Standard_Real | theMargin, | ||
const Standard_Real | theResolution = 0.0, | ||
const Standard_Boolean | theToEnlargeIfLine = Standard_True ) const |
Transform camera eye, center and scale to fit in the passed bounding box specified in WCS.
theCamera | [in] the camera |
theBox | [in] the bounding box |
theMargin | [in] the margin coefficient for view borders |
theResolution | [in] the 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 |
theToEnlargeIfLine | [in] when 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. |
Standard_Real V3d_View::Focale | ( | ) | const |
Returns the View Plane Distance for Perspective Views.
|
inline |
Returns the position of point which emanating the projections.
|
inline |
Activates IBL from background cubemap.
const Graphic3d_GraduatedTrihedron & V3d_View::GetGraduatedTrihedron | ( | ) | const |
Returns data of a graduated trihedron.
Aspect_GradientBackground V3d_View::GradientBackground | ( | ) | const |
Returns the gradient background of the view.
void V3d_View::GradientBackgroundColors | ( | Quantity_Color & | theColor1, |
Quantity_Color & | theColor2 ) const |
Returns the gradient background colors of the view.
void V3d_View::GraduatedTrihedronDisplay | ( | const Graphic3d_GraduatedTrihedron & | theTrihedronData | ) |
Displays a graduated trihedron.
void V3d_View::GraduatedTrihedronErase | ( | ) |
Erases a graduated trihedron from the view.
gp_Pnt V3d_View::GravityPoint | ( | ) | const |
Returns the Objects number and the gravity center of ALL viewable points in the view.
Standard_Boolean V3d_View::IfMoreLights | ( | ) | const |
Returns True if One light more can be activated in this View.
Standard_Boolean V3d_View::IfWindow | ( | ) | const |
Returns True if MyView is associated with a window .
|
protected |
Returns True if One light more can be activated in this View.
|
inline |
initializes an iteration on the active Lights.
void V3d_View::Invalidate | ( | ) | const |
Invalidates view content but does not redraw it.
|
inline |
Invalidates view content within immediate layer but does not redraw it.
Standard_Boolean V3d_View::IsActiveLight | ( | const Handle< V3d_Light > & | theLight | ) | const |
Returns TRUE when the light is active in this view.
|
inline |
Standard_Boolean V3d_View::IsEmpty | ( | ) | const |
Returns the status of the view regarding the displayed structures inside Returns True is The View is empty.
Standard_Boolean V3d_View::IsImageBasedLighting | ( | ) | const |
Returns TRUE if IBL (Image Based Lighting) from background cubemap is enabled.
Standard_Boolean V3d_View::IsInvalidated | ( | ) | const |
Returns true if cached view content has been invalidated.
|
inline |
Returns true if immediate layer content has been invalidated.
|
inline |
Return TRUE if this is a subview of another view.
Standard_Integer V3d_View::LightLimit | ( | ) | const |
Returns the MAX number of light associated to the view.
|
inline |
returns true if there are more active Light(s) to return.
void V3d_View::Move | ( | const Standard_Real | Dx, |
const Standard_Real | Dy, | ||
const Standard_Real | Dz, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True.
void V3d_View::Move | ( | const Standard_Real | Length, |
const Standard_Boolean | Start = Standard_True ) |
Movement of the eye parllel to the current axis a distance relative to the initial position expressed by Start = Standard_True.
void V3d_View::Move | ( | const V3d_TypeOfAxe | Axe, |
const Standard_Real | Length, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True.
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.
|
inline |
Go to the next active Light (if there is not, ActiveLight will raise an exception)
void V3d_View::Pan | ( | const Standard_Integer | theDXp, |
const Standard_Integer | theDYp, | ||
const Standard_Real | theZoomFactor = 1, | ||
const Standard_Boolean | theToStart = Standard_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.
theDXp | [in] the relative panning on "x" axis of view projection, in pixels. |
theDYp | [in] the relative panning on "y" axis of view projection, in pixels. |
theZoomFactor | [in] the zooming factor. |
theToStart | [in] pass 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. |
void V3d_View::Panning | ( | const Standard_Real | theDXv, |
const Standard_Real | theDYv, | ||
const Standard_Real | theZoomFactor = 1, | ||
const Standard_Boolean | theToStart = Standard_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.
theDXv | [in] the relative panning on "x" axis of view projection, in view space coordinates. |
theDYv | [in] the relative panning on "y" axis of view projection, in view space coordinates. |
theZoomFactor | [in] the zooming factor. |
theToStart | [in] pass 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. |
|
inline |
Return parent View or NULL if this is not a subview.
Handle< V3d_View > V3d_View::PickSubview | ( | const Graphic3d_Vec2i & | thePnt | ) | const |
Pick subview from the given 2D point.
void V3d_View::Place | ( | const Standard_Integer | theXp, |
const Standard_Integer | theYp, | ||
const Standard_Real | 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.
Standard_Integer V3d_View::PlaneLimit | ( | ) | const |
Returns the MAX number of clipping planes associated to the view.
void V3d_View::Proj | ( | Standard_Real & | Vx, |
Standard_Real & | Vy, | ||
Standard_Real & | Vz ) const |
Returns the projection vector.
void V3d_View::Project | ( | const Standard_Real | theX, |
const Standard_Real | theY, | ||
const Standard_Real | theZ, | ||
Standard_Real & | theXp, | ||
Standard_Real & | theYp ) const |
Converts the point defined in the user space of the view to the projection plane at the depth relative to theZ.
void V3d_View::Project | ( | const Standard_Real | theX, |
const Standard_Real | theY, | ||
const Standard_Real | theZ, | ||
Standard_Real & | theXp, | ||
Standard_Real & | theYp, | ||
Standard_Real & | theZp ) const |
Converts the point defined in the user space of the view to the projection plane at the depth relative to theZ.
void V3d_View::ProjReferenceAxe | ( | const Standard_Integer | Xpix, |
const Standard_Integer | Ypix, | ||
Standard_Real & | XP, | ||
Standard_Real & | YP, | ||
Standard_Real & | ZP, | ||
Standard_Real & | VX, | ||
Standard_Real & | VY, | ||
Standard_Real & | 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).
|
virtual |
Redisplays the view even if there has not been any modification. Must be called if the view is shown. (Ex: DeIconification ) .
|
virtual |
Updates layer of immediate presentations.
void V3d_View::Remove | ( | ) |
Destroys the view.
|
virtual |
Removes clip plane from the view.
thePlane | [in] the clip plane to be removed from view. |
bool V3d_View::RemoveSubview | ( | const V3d_View * | theView | ) |
Remove subview from the list.
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().
void V3d_View::Reset | ( | const Standard_Boolean | theToUpdate = Standard_True | ) |
Resets the centering and the orientation of the view.
void V3d_View::ResetViewMapping | ( | ) |
Resets the centering of the view. Updates the view.
void V3d_View::ResetViewOrientation | ( | ) |
Resets the orientation of the view. Updates the view.
void V3d_View::Rotate | ( | const Standard_Real | Angle, |
const Standard_Boolean | Start = Standard_True ) |
Rotates the eye around the current axis a relative angular value in RADIANS with respect to the initial position expressed by Start = Standard_True.
void V3d_View::Rotate | ( | const Standard_Real | Ax, |
const Standard_Real | Ay, | ||
const Standard_Real | Az, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True Warning! raises BadValue from V3d If the eye, the view point, or the high point are aligned or confused.
void V3d_View::Rotate | ( | const Standard_Real | Ax, |
const Standard_Real | Ay, | ||
const Standard_Real | Az, | ||
const Standard_Real | X, | ||
const Standard_Real | Y, | ||
const Standard_Real | Z, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True If the eye, the view point, or the high point are aligned or confused.
void V3d_View::Rotate | ( | const V3d_TypeOfAxe | Axe, |
const Standard_Real | Angle, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True.
void V3d_View::Rotate | ( | const V3d_TypeOfAxe | Axe, |
const Standard_Real | Angle, | ||
const Standard_Real | X, | ||
const Standard_Real | Y, | ||
const Standard_Real | Z, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True.
void V3d_View::Rotation | ( | const Standard_Integer | X, |
const Standard_Integer | Y ) |
Continues the rotation of the view with an angle computed from the last and new mouse position <X,Y>.
Standard_Real V3d_View::Scale | ( | ) | const |
Returns the current value of the zoom expressed with respect to SetViewMappingDefault().
|
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.
theSizeXv | [in] size of viewport frame on "x" axis. |
theSizeYv | [in] size of viewport frame on "y" axis. |
void V3d_View::SetAt | ( | const Standard_Real | X, |
const Standard_Real | Y, | ||
const Standard_Real | Z ) |
Defines the position of the view point.
void V3d_View::SetAutoZFitMode | ( | const Standard_Boolean | theIsOn, |
const Standard_Real | 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.
theScaleFactor | [in] the 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. |
void V3d_View::SetAxialScale | ( | const Standard_Real | Sx, |
const Standard_Real | Sy, | ||
const Standard_Real | 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 V3d_View::SetAxis | ( | const Standard_Real | X, |
const Standard_Real | Y, | ||
const Standard_Real | Z, | ||
const Standard_Real | Vx, | ||
const Standard_Real | Vy, | ||
const Standard_Real | 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 V3d_View::SetBackFacingModel | ( | const Graphic3d_TypeOfBackfacingModel | theModel = Graphic3d_TypeOfBackfacingModel_Auto | ) |
Manages display of the back faces.
void V3d_View::SetBackgroundColor | ( | const Quantity_Color & | theColor | ) |
Defines the background color of the view.
void V3d_View::SetBackgroundColor | ( | const Quantity_TypeOfColor | theType, |
const Standard_Real | theV1, | ||
const Standard_Real | theV2, | ||
const Standard_Real | theV3 ) |
Defines the background color of the view by the color definition type and the three corresponding values.
void V3d_View::SetBackgroundCubeMap | ( | const Handle< Graphic3d_CubeMap > & | theCubeMap, |
Standard_Boolean | theToUpdatePBREnv = Standard_True, | ||
Standard_Boolean | theToUpdate = Standard_False ) |
Sets environment cubemap as background.
theCubeMap | cubemap source to be set as background |
theToUpdatePBREnv | defines whether IBL maps will be generated or not (see 'GeneratePBREnvironment') |
void V3d_View::SetBackgroundImage | ( | const Handle< Graphic3d_Texture2D > & | theTexture, |
const Aspect_FillMethod | theFillStyle = Aspect_FM_CENTERED, | ||
const Standard_Boolean | theToUpdate = Standard_False ) |
Defines the background texture of the view by supplying the texture and fill method (centered by default)
void V3d_View::SetBackgroundImage | ( | const Standard_CString | theFileName, |
const Aspect_FillMethod | theFillStyle = Aspect_FM_CENTERED, | ||
const Standard_Boolean | theToUpdate = Standard_False ) |
Defines the background texture of the view by supplying the texture image file name and fill method (centered by default).
void V3d_View::SetBackgroundSkydome | ( | const Aspect_SkydomeBackground & | theAspect, |
Standard_Boolean | theToUpdatePBREnv = Standard_True ) |
Sets skydome aspect.
theAspect | cubemap generation parameters |
theToUpdatePBREnv | defines whether IBL maps will be generated or not |
void V3d_View::SetBgGradientColors | ( | const Quantity_Color & | theColor1, |
const Quantity_Color & | theColor2, | ||
const Aspect_GradientFillMethod | theFillStyle = Aspect_GradientFillMethod_Horizontal, | ||
const Standard_Boolean | theToUpdate = Standard_False ) |
Defines the gradient background colors of the view by supplying the colors and the fill method (horizontal by default).
void V3d_View::SetBgGradientStyle | ( | const Aspect_GradientFillMethod | theMethod = Aspect_GradientFillMethod_Horizontal, |
const Standard_Boolean | theToUpdate = Standard_False ) |
Defines the gradient background fill method of the view.
void V3d_View::SetBgImageStyle | ( | const Aspect_FillMethod | theFillStyle, |
const Standard_Boolean | theToUpdate = Standard_False ) |
Defines the textured background fill method of the view.
void V3d_View::SetCamera | ( | const Handle< Graphic3d_Camera > & | theCamera | ) |
Change camera used by view.
void V3d_View::SetCenter | ( | const Standard_Integer | theXp, |
const Standard_Integer | 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".
theXp | [in] the x coordinate. |
theYp | [in] the y coordinate. |
void V3d_View::SetClipPlanes | ( | const 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.
thePlanes | [in] the clip planes to set. |
void V3d_View::SetComputedMode | ( | const Standard_Boolean | theMode | ) |
Switches computed HLR mode in the view.
void V3d_View::SetDepth | ( | const Standard_Real | Depth | ) |
Defines the Depth of the eye from the view point without update the projection .
void V3d_View::SetEye | ( | const Standard_Real | X, |
const Standard_Real | Y, | ||
const Standard_Real | Z ) |
Defines the position of the eye..
void V3d_View::SetFocale | ( | const Standard_Real | Focale | ) |
Change View Plane Distance for Perspective Views Warning! raises TypeMismatch from Standard if the view is not a perspective view.
void V3d_View::SetFront | ( | ) |
modify the Projection of the view perpendicularly to the privileged plane of the viewer.
|
inline |
Turn on/off automatic culling of objects outside frustum (ON by default)
void V3d_View::SetGrid | ( | const gp_Ax3 & | aPlane, |
const Handle< Aspect_Grid > & | aGrid ) |
Defines or Updates the definition of the grid in <me>
void V3d_View::SetGridActivity | ( | const Standard_Boolean | aFlag | ) |
Defines or Updates the activity of the grid in <me>
void V3d_View::SetImageBasedLighting | ( | Standard_Boolean | theToEnableIBL, |
Standard_Boolean | theToUpdate = Standard_False ) |
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 |
[in] | theToUpdate | redraw the view |
Standard_Boolean V3d_View::SetImmediateUpdate | ( | const Standard_Boolean | theImmediateUpdate | ) |
sets the immediate update mode and returns the previous one.
void V3d_View::SetLightOff | ( | ) |
Deactivate all the Lights defined in this view.
Deactivate theLight in this view.
void V3d_View::SetLightOn | ( | ) |
Activates all the lights defined in this view.
void V3d_View::SetMagnify | ( | const Handle< Aspect_Window > & | theWindow, |
const Handle< V3d_View > & | thePreviousView, | ||
const Standard_Integer | theX1, | ||
const Standard_Integer | theY1, | ||
const Standard_Integer | theX2, | ||
const Standard_Integer | theY2 ) |
void V3d_View::SetProj | ( | const Standard_Real | Vx, |
const Standard_Real | Vy, | ||
const Standard_Real | Vz ) |
Defines the orientation of the projection.
void V3d_View::SetProj | ( | const V3d_TypeOfOrientation | theOrientation, |
const Standard_Boolean | theIsYup = Standard_False ) |
Defines the orientation of the projection .
theOrientation | camera direction |
theIsYup | flag indicating Y-up (TRUE) or Z-up (FALSE) convention |
void V3d_View::SetScale | ( | const Standard_Real | Coef | ) |
Zooms the view by a factor relative to the value initialised by SetViewMappingDefault(). Updates the view.
void V3d_View::SetShadingModel | ( | const Graphic3d_TypeOfShadingModel | theShadingModel | ) |
Defines the shading model for the visualization.
void V3d_View::SetSize | ( | const Standard_Real | theSize | ) |
Defines the view projection size in its maximum dimension, keeping the initial height/width ratio unchanged.
void V3d_View::SetTextureEnv | ( | const Handle< Graphic3d_TextureEnv > & | theTexture | ) |
Sets the environment texture to use. No environment texture by default.
void V3d_View::SetTwist | ( | const Standard_Real | 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 V3d_View::SetUp | ( | const Standard_Real | Vx, |
const Standard_Real | Vy, | ||
const Standard_Real | Vz ) |
Defines the orientation of the high point.
void V3d_View::SetUp | ( | const V3d_TypeOfOrientation | Orientation | ) |
Defines the orientation(SO) of the high point.
void V3d_View::SetViewMappingDefault | ( | ) |
Saves the current view mapping. This will be the state returned from ResetViewmapping.
void V3d_View::SetViewOrientationDefault | ( | ) |
Saves the current state of the orientation of the view which will be the return state at ResetViewOrientation.
void V3d_View::SetVisualization | ( | const V3d_TypeOfVisualization | theType | ) |
Defines the visualization type in the view.
void V3d_View::SetWindow | ( | const Handle< Aspect_Window > & | theWindow, |
const Aspect_RenderingContext | theContext = NULL ) |
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 V3d_View::SetWindow | ( | const Handle< V3d_View > & | theParentView, |
const Graphic3d_Vec2d & | theSize, | ||
Aspect_TypeOfTriedronPosition | theCorner = Aspect_TOTP_LEFT_UPPER, | ||
const Graphic3d_Vec2d & | theOffset = Graphic3d_Vec2d(), | ||
const Graphic3d_Vec2i & | theMargins = Graphic3d_Vec2i() ) |
Activates the view as subview of another view.
[in] | theParentView | parent view to put subview into |
[in] | theSize | subview dimensions; values >= 2 define size in pixels, values <= 1.0 define size as a fraction of parent view |
[in] | theCorner | corner within parent view |
[in] | theOffset | offset from the corner; values >= 1 define offset in pixels, values < 1.0 define offset as a fraction of parent view |
[in] | theMargins | subview 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);
void V3d_View::SetZoom | ( | const Standard_Real | Coef, |
const Standard_Boolean | Start = Standard_True ) |
Zooms the view by a factor relative to the initial value expressed by Start = Standard_True Updates the view.
void V3d_View::SetZSize | ( | const Standard_Real | 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 .
Graphic3d_TypeOfShadingModel V3d_View::ShadingModel | ( | ) | const |
Returns the current shading model; Graphic3d_TypeOfShadingModel_Phong by default.
void V3d_View::Size | ( | Standard_Real & | Width, |
Standard_Real & | Height ) const |
Returns the height and width of the view.
void V3d_View::StartRotation | ( | const Standard_Integer | X, |
const Standard_Integer | Y, | ||
const Standard_Real | 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 V3d_View::StartZoomAtPoint | ( | const Standard_Integer | theXp, |
const Standard_Integer | theYp ) |
Defines starting point for ZoomAtPoint view operation.
theXp | [in] the x mouse coordinate, in pixels. |
theYp | [in] the y mouse coordinate, in pixels. |
TCollection_AsciiString V3d_View::StatisticInformation | ( | ) | const |
Returns string with statistic performance info.
void V3d_View::StatisticInformation | ( | TColStd_IndexedDataMapOfStringString & | theDict | ) | const |
Fills in the dictionary with statistic performance info.
|
inline |
Return subview list.
Handle< Graphic3d_TextureEnv > V3d_View::TextureEnv | ( | ) | const |
|
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.
theImage | target image, will be re-allocated to match theWidth x theHeight |
theWidth | target image width |
theHeight | target image height |
theBufferType | type of the view buffer to dump (color / depth) |
theToAdjustAspect | when true, active view aspect ratio will be overridden by (theWidth / theHeight) |
theStereoOptions | how to dump stereographic camera |
Standard_Boolean 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.
|
protected |
Returns True if One light more can be activated in this View.
void V3d_View::Translate | ( | const Standard_Real | Dx, |
const Standard_Real | Dy, | ||
const Standard_Real | Dz, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True.
void V3d_View::Translate | ( | const Standard_Real | Length, |
const Standard_Boolean | Start = Standard_True ) |
Movement of the eye and view point parallel to the current axis a distance relative to the initial position expressed by Start = Standard_True.
void V3d_View::Translate | ( | const V3d_TypeOfAxe | Axe, |
const Standard_Real | Length, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True.
void V3d_View::TriedronDisplay | ( | const Aspect_TypeOfTriedronPosition | thePosition = Aspect_TOTP_CENTER, |
const Quantity_Color & | theColor = Quantity_NOC_WHITE, | ||
const Standard_Real | 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 V3d_View::TriedronErase | ( | ) |
Erases the Triedron.
|
inline |
Returns trihedron object.
void V3d_View::Turn | ( | const Standard_Real | Angle, |
const Standard_Boolean | Start = Standard_True ) |
Rotation of the view point around the current axis an angular value in RADIANS relative to the initial position expressed by Start = Standard_True.
void V3d_View::Turn | ( | const Standard_Real | Ax, |
const Standard_Real | Ay, | ||
const Standard_Real | Az, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True.
void V3d_View::Turn | ( | const V3d_TypeOfAxe | Axe, |
const Standard_Real | Angle, | ||
const Standard_Boolean | Start = Standard_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 = Standard_True.
Standard_Real V3d_View::Twist | ( | ) | const |
Returns in RADIANS the orientation of the view around the visual axis measured from the Y axis of the screen.
V3d_TypeOfView V3d_View::Type | ( | ) | const |
Returns the Type of the View.
void V3d_View::Up | ( | Standard_Real & | Vx, |
Standard_Real & | Vy, | ||
Standard_Real & | Vz ) const |
Returns the vector giving the position of the high point.
void V3d_View::Update | ( | ) | const |
Deprecated, Redraw() should be used instead.
void V3d_View::UpdateLights | ( | ) | const |
Updates the lights of the view.
|
inline |
Returns the associated Graphic3d view.
|
inline |
Returns the viewer in which the view has been created.
V3d_TypeOfVisualization V3d_View::Visualization | ( | ) | const |
Returns the current visualisation mode.
|
inline |
Returns the Aspect Window associated with the view.
void V3d_View::WindowFit | ( | const Standard_Integer | theMinXp, |
const Standard_Integer | theMinYp, | ||
const Standard_Integer | theMaxXp, | ||
const Standard_Integer | 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.
theMinXp | [in] pixel coordinates of minimal corner on x screen axis. |
theMinYp | [in] pixel coordinates of minimal corner on y screen axis. |
theMaxXp | [in] pixel coordinates of maximal corner on x screen axis. |
theMaxYp | [in] pixel coordinates of maximal corner on y screen axis. |
|
inline |
idem than WindowFit
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 Standard_Real | theSizeRatio = 0.8, | ||
const Standard_Real | theAxisDiametr = 0.05, | ||
const Standard_Integer | 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 V3d_View::ZFitAll | ( | const Standard_Real | theScaleFactor = 1.0 | ) | const |
Change Z-min and Z-max planes of projection volume to match the displayed objects.
void V3d_View::Zoom | ( | const Standard_Integer | theXp1, |
const Standard_Integer | theYp1, | ||
const Standard_Integer | theXp2, | ||
const Standard_Integer | theYp2 ) |
Zoom the view according to a zoom factor computed from the distance between the 2 mouse position.
theXp1 | [in] the x coordinate of first mouse position, in pixels. |
theYp1 | [in] the y coordinate of first mouse position, in pixels. |
theXp2 | [in] the x coordinate of second mouse position, in pixels. |
theYp2 | [in] the y coordinate of second mouse position, in pixels. |
void V3d_View::ZoomAtPoint | ( | const Standard_Integer | theMouseStartX, |
const Standard_Integer | theMouseStartY, | ||
const Standard_Integer | theMouseEndX, | ||
const Standard_Integer | theMouseEndY ) |
Zooms the model at a pixel defined by the method StartZoomAtPoint().
Standard_Real V3d_View::ZSize | ( | ) | const |
Returns the Depth of the view .
|
protected |
Returns True if One light more can be activated in this View.
|
protected |
Returns True if One light more can be activated in this View.
|
protected |
Returns True if One light more can be activated in this View.
|
protected |
Returns True if One light more can be activated in this View.
|
protected |
Returns True if One light more can be activated in this View.
|
protected |
Returns True if One light more can be activated in this View.
|
mutableprotected |
Returns True if One light more can be activated in this View.
|
protected |
Returns True if One light more can be activated in this View.
|
protected |
Returns True if One light more can be activated in this View.
|
protected |
Returns True if One light more can be activated in this View.