Open CASCADE Technology  6.9.1
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
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. (Projection,Mapping,Zclipping,DepthCueing,AntiAliasing et Conversions) . 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 Handle< V3d_Viewer > &VM, const V3d_TypeOfView Type=V3d_ORTHOGRAPHIC)
 Initializes the view. More...
 
 V3d_View (const Handle< V3d_Viewer > &theVM, const Handle< V3d_View > &theView)
 Initializes the view by copying. More...
 
void SetWindow (const Handle< Aspect_Window > &IdWin)
 Activates the view in the window specified and Map the Window to the screen. Warning! raises MultiplyDefined from Standard if the view is already activated in a window. Warning: The view is centered and resized to preserve the height/width ratio of the window. More...
 
void SetWindow (const Handle< Aspect_Window > &aWindow, const Aspect_RenderingContext aContext, const Aspect_GraphicCallbackProc &aDisplayCB, const Standard_Address aClientData)
 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. If <aDisplayCB> is not NULL then a user display CB is call at the end of the OCC graphic traversal and just before the swap of buffers. The <aClientData> is pass to this call back. Warning! raises MultiplyDefined from Standard if the view is already activated in a window. Warning: The view is centered and resized to preserve the height/width ratio of the window. More...
 
void SetMagnify (const Handle< Aspect_Window > &IdWin, const Handle< V3d_View > &aPreviousView, const Standard_Integer x1, const Standard_Integer y1, const Standard_Integer x2, const Standard_Integer y2)
 
void Remove () const
 Destroys the view. More...
 
void Update () const
 Deprecated, Redraw() should be used instead. More...
 
void Redraw () const
 Redisplays the view even if there has not been any modification. Must be called if the view is shown. (Ex: DeIconification ) . More...
 
void RedrawImmediate () const
 Updates layer of immediate presentations. More...
 
void Invalidate () const
 Invalidates view content but does not redraw it. More...
 
void Redraw (const Standard_Integer x, const Standard_Integer y, const Standard_Integer width, const Standard_Integer height) const
 Redisplays the view area after esxposure. [x,y] define the min xy area position [width,height] the size of the area in pixel unit. More...
 
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. More...
 
void DoMapping ()
 Must be called when the window supporting the view is mapped or unmapped. More...
 
Standard_Boolean IsEmpty () const
 Returns the status of the view regarding the displayed structures inside Returns True is The View is empty. More...
 
void UpdateLights () const
 Updates the lights of the view. The view is redrawn. More...
 
void AutoZFit ()
 If automatic z-range fitting is turned on, adjusts Z-min and Z-max projection volume planes with call to ZFitAll. More...
 
void ZFitAll (const Standard_Real theScaleFactor=1.0)
 Change Z-min and Z-max planes of projection volume to match the displayed objects. More...
 
void SetBackgroundColor (const Quantity_TypeOfColor Type, const Quantity_Parameter V1, const Quantity_Parameter V2, const Quantity_Parameter V3)
 Defines the background colour of the view by supplying : the colour definition type, and the three corresponding values. More...
 
void SetBackgroundColor (const Quantity_Color &Color)
 Defines the background colour of the view by supplying : the colour object. More...
 
void SetBackgroundColor (const Quantity_NameOfColor Name)
 Defines the background colour of the view by supplying : the colour name in the form Quantity_NOC_xxxx . More...
 
void SetBgGradientColors (const Quantity_Color &Color1, const Quantity_Color &Color2, const Aspect_GradientFillMethod FillStyle=Aspect_GFM_HOR, const Standard_Boolean update=Standard_False)
 Defines the gradient background colours of the view by supplying : two colour objects, and fill method (horizontal by default) More...
 
void SetBgGradientColors (const Quantity_NameOfColor Color1, const Quantity_NameOfColor Color2, const Aspect_GradientFillMethod FillStyle=Aspect_GFM_HOR, const Standard_Boolean update=Standard_False)
 Defines the gradient background colours of the view by supplying : two colour names in the form Quantity_NOC_xxxx, and fill method (horizontal by default) More...
 
void SetBgGradientStyle (const Aspect_GradientFillMethod AMethod=Aspect_GFM_HOR, const Standard_Boolean update=Standard_False)
 Defines the gradient background fill method of the view. More...
 
void SetBackgroundImage (const Standard_CString FileName, const Aspect_FillMethod FillStyle=Aspect_FM_CENTERED, const Standard_Boolean update=Standard_False)
 Defines the background texture of the view by supplying : texture image file name, and fill method (centered by default) More...
 
void SetBgImageStyle (const Aspect_FillMethod FillStyle, const Standard_Boolean update=Standard_False)
 Defines the textured background fill method of the view. More...
 
void SetAxis (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, const Quantity_Parameter Vx, const Quantity_Parameter Vy, const Quantity_Parameter 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. . More...
 
void SetShadingModel (const V3d_TypeOfShadingModel Model)
 Defines the shading model for the visualisation ZBUFFER mode. Various models are available. More...
 
void SetSurfaceDetail (const V3d_TypeOfSurfaceDetail SurfaceDetail)
 select the kind of rendering for texture mapping no texture mapping by default More...
 
void SetTextureEnv (const Handle< Graphic3d_TextureEnv > &ATexture)
 set the environment texture to use no environment texture by default More...
 
void SetVisualization (const V3d_TypeOfVisualization Mode)
 Defines the visualisation mode in the view. More...
 
void SetAntialiasingOn ()
 Activates antialiasing in the view. More...
 
void SetAntialiasingOff ()
 Desactivates antialiasing in the view. More...
 
void SetZClippingDepth (const Quantity_Length Depth)
 Defines the depth of the medium clipping plane. More...
 
void SetZClippingWidth (const Quantity_Length Width)
 Defines the thicknes around the medium clippling plane. . More...
 
void SetZClippingType (const V3d_TypeOfZclipping Type)
 Defines the type of ZClipping. More...
 
void SetZCueingDepth (const Quantity_Length Depth)
 Defines the depth of the medium plane. More...
 
void SetZCueingWidth (const Quantity_Length Width)
 Defines the thickness around the medium plane. More...
 
void SetZCueingOn ()
 Activates ZCueing in the view. More...
 
void SetZCueingOff ()
 Desactivates ZCueing in the view. More...
 
void SetLightOn (const Handle< V3d_Light > &MyLight)
 Activates MyLight in the view. More...
 
void SetLightOn ()
 Activates all the lights defined in this view. More...
 
void SetLightOff (const Handle< V3d_Light > &MyLight)
 Desactivate MyLight in this view. More...
 
void SetLightOff ()
 Deactivate all the Lights defined in this view. More...
 
Standard_Boolean IsActiveLight (const Handle< V3d_Light > &aLight) const
 Returns TRUE when the light is active in this view. More...
 
Standard_Boolean SetImmediateUpdate (const Standard_Boolean theImmediateUpdate)
 sets the immediate update mode and returns the previous one. More...
 
void ZBufferTriedronSetup (const Quantity_NameOfColor XColor=Quantity_NOC_RED, const Quantity_NameOfColor YColor=Quantity_NOC_GREEN, const Quantity_NameOfColor ZColor=Quantity_NOC_BLUE1, const Standard_Real SizeRatio=0.8, const Standard_Real AxisDiametr=0.05, const Standard_Integer NbFacettes=12)
 Customization of the ZBUFFER Triedron. XColor,YColor,ZColor - colors of axis SizeRatio - ratio of decreasing of the trihedron size when its phisical position comes out of the view AxisDiametr - diameter relatively to axis length NbFacettes - number of facettes of cylinders and cones. More...
 
void TriedronDisplay (const Aspect_TypeOfTriedronPosition APosition=Aspect_TOTP_CENTER, const Quantity_NameOfColor AColor=Quantity_NOC_WHITE, const Standard_Real AScale=0.02, const V3d_TypeOfVisualization AMode=V3d_WIREFRAME)
 Display of the Triedron. Initialize position, color and length of Triedron axes. The scale is a percent of the window width. More...
 
void TriedronErase ()
 Erases the Triedron. More...
 
void TriedronEcho (const Aspect_TypeOfTriedronEcho AType=Aspect_TOTE_NONE)
 Highlights the echo zone of the Triedron. More...
 
const Graphic3d_GraduatedTrihedronGetGraduatedTrihedron () const
 Returns data of a graduated trihedron. More...
 
void GraduatedTrihedronDisplay (const Graphic3d_GraduatedTrihedron &theTrigedronData)
 Displays a graduated trihedron. More...
 
void GraduatedTrihedronErase ()
 Erases a graduated trihedron from the view. More...
 
void SetLayerMgr (const Handle< V3d_LayerMgr > &aMgr)
 
void ColorScaleDisplay ()
 
void ColorScaleErase ()
 
Standard_Boolean ColorScaleIsDisplayed () const
 
Handle< Aspect_ColorScaleColorScale () const
 
void SetFront ()
 modify the Projection of the view perpendicularly to the privileged plane of the viewer. More...
 
void Rotate (const Quantity_PlaneAngle Ax, const Quantity_PlaneAngle Ay, const Quantity_PlaneAngle 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. More...
 
void Rotate (const Quantity_PlaneAngle Ax, const Quantity_PlaneAngle Ay, const Quantity_PlaneAngle Az, const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate 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. More...
 
void Rotate (const V3d_TypeOfAxe Axe, const Quantity_PlaneAngle Angle, const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate 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. More...
 
void Rotate (const V3d_TypeOfAxe Axe, const Quantity_PlaneAngle 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. More...
 
void Rotate (const Quantity_PlaneAngle 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. More...
 
void Move (const Quantity_Length Dx, const Quantity_Length Dy, const Quantity_Length 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. More...
 
void Move (const V3d_TypeOfAxe Axe, const Quantity_Length 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. More...
 
void Move (const Quantity_Length 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. More...
 
void Translate (const Quantity_Length Dx, const Quantity_Length Dy, const Quantity_Length 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. More...
 
void Translate (const V3d_TypeOfAxe Axe, const Quantity_Length 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. More...
 
void Translate (const Quantity_Length 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. More...
 
void Place (const Standard_Integer theXp, const Standard_Integer theYp, const Quantity_Factor 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. More...
 
void Turn (const Quantity_PlaneAngle Ax, const Quantity_PlaneAngle Ay, const Quantity_PlaneAngle 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. More...
 
void Turn (const V3d_TypeOfAxe Axe, const Quantity_PlaneAngle 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. More...
 
void Turn (const Quantity_PlaneAngle 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. More...
 
void SetTwist (const Quantity_PlaneAngle 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. More...
 
void SetEye (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z)
 Defines the position of the eye.. More...
 
void SetDepth (const Quantity_Length Depth)
 Defines the Depth of the eye from the view point without update the projection . More...
 
void SetProj (const Quantity_Parameter Vx, const Quantity_Parameter Vy, const Quantity_Parameter Vz)
 Defines the orientation of the projection. More...
 
void SetProj (const V3d_TypeOfOrientation Orientation)
 Defines the orientation of the projection . More...
 
void SetAt (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z)
 Defines the position of the view point. More...
 
void SetUp (const Quantity_Parameter Vx, const Quantity_Parameter Vy, const Quantity_Parameter Vz)
 Defines the orientation of the high point. More...
 
void SetUp (const V3d_TypeOfOrientation Orientation)
 Defines the orientation(SO) of the high point. More...
 
void SetViewOrientationDefault ()
 Saves the current state of the orientation of the view which will be the return state at ResetViewOrientation. More...
 
void ResetViewOrientation ()
 Resets the orientation of the view. Updates the view. More...
 
void Panning (const Standard_Real theDXv, const Standard_Real theDYv, const Quantity_Factor 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. More...
 
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". More...
 
void SetSize (const Quantity_Length theSize)
 Defines the view projection size in its maximum dimension, keeping the inital height/width ratio unchanged. More...
 
void SetZSize (const Quantity_Length Size)
 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 . More...
 
void SetZoom (const Quantity_Factor 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. More...
 
void SetScale (const Quantity_Factor Coef)
 Zooms the view by a factor relative to the value initialised by SetViewMappingDefault(). Updates the view. More...
 
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. More...
 
void FitAll (const Quantity_Coefficient 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. More...
 
void FitAll (const Bnd_Box &theBox, const Quantity_Coefficient 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. More...
 
void DepthFitAll (const Quantity_Coefficient Aspect=0.01, const Quantity_Coefficient 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 . More...
 
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 . More...
 
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. More...
 
void SetViewMappingDefault ()
 Saves the current view mapping. This will be the state returned from ResetViewmapping. More...
 
void ResetViewMapping ()
 Resets the centering of the view. Updates the view. More...
 
void Reset (const Standard_Boolean update=Standard_True)
 Resets the centering and the orientation of the view Updates the view. More...
 
Quantity_Length Convert (const Standard_Integer Vp) const
 Converts the PIXEL value to a value in the projection plane. More...
 
void Convert (const Standard_Integer Xp, const Standard_Integer Yp, V3d_Coordinate &Xv, V3d_Coordinate &Yv) const
 Converts the point PIXEL into a point projected in the reference frame of the projection plane. More...
 
Standard_Integer Convert (const Quantity_Length Vv) const
 Converts tha value of the projection plane into a PIXEL value. More...
 
void Convert (const V3d_Coordinate Xv, const V3d_Coordinate Yv, Standard_Integer &Xp, Standard_Integer &Yp) const
 Converts the point defined in the reference frame of the projection plane into a point PIXEL. More...
 
void Convert (const Standard_Integer Xp, const Standard_Integer Yp, V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &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. More...
 
void ConvertWithProj (const Standard_Integer Xp, const Standard_Integer Yp, V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z, Quantity_Parameter &Vx, Quantity_Parameter &Vy, Quantity_Parameter &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. More...
 
void ConvertToGrid (const Standard_Integer Xp, const Standard_Integer Yp, V3d_Coordinate &Xg, V3d_Coordinate &Yg, V3d_Coordinate &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);. More...
 
void ConvertToGrid (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, V3d_Coordinate &Xg, V3d_Coordinate &Yg, V3d_Coordinate &Zg) const
 Converts the point into the nearest grid point and display the grid marker. More...
 
void Convert (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate 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. More...
 
void Project (const V3d_Coordinate X, const V3d_Coordinate Y, const V3d_Coordinate Z, V3d_Coordinate &Xp, V3d_Coordinate &Yp) const
 Converts the point defined in the user space of the view to the projected view plane point at z 0. More...
 
void BackgroundColor (const Quantity_TypeOfColor Type, Quantity_Parameter &V1, Quantity_Parameter &V2, Quantity_Parameter &V3) const
 Returns the Background color values of the view depending of the color Type. More...
 
Quantity_Color BackgroundColor () const
 Returns the Background color object of the view. More...
 
void GradientBackgroundColors (Quantity_Color &Color1, Quantity_Color &Color2) const
 Returns the gradient background colour objects of the view. More...
 
Aspect_GradientBackground GradientBackground () const
 Returns the gradient background of the view. More...
 
Quantity_Factor Scale () const
 Returns the current value of the zoom expressed with respect to SetViewMappingDefault(). More...
 
void AxialScale (Standard_Real &Sx, Standard_Real &Sy, Standard_Real &Sz) const
 Returns the current values of the anisotropic (axial) scale factors. More...
 
void Size (Quantity_Length &Width, Quantity_Length &Height) const
 Returns the height and width of the view. More...
 
Standard_Real ZSize () const
 Returns the Depth of the view . More...
 
void Eye (V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z) const
 Returns the position of the eye. More...
 
void FocalReferencePoint (V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z) const
 Returns the position of point which emanating the projections. More...
 
void ProjReferenceAxe (const Standard_Integer Xpix, const Standard_Integer Ypix, V3d_Coordinate &XP, V3d_Coordinate &YP, V3d_Coordinate &ZP, V3d_Coordinate &VX, V3d_Coordinate &VY, V3d_Coordinate &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). More...
 
Quantity_Length Depth () const
 Returns the Distance between the Eye and View Point. More...
 
void Proj (Quantity_Parameter &Vx, Quantity_Parameter &Vy, Quantity_Parameter &Vz) const
 Returns the projection vector. More...
 
void At (V3d_Coordinate &X, V3d_Coordinate &Y, V3d_Coordinate &Z) const
 Returns the position of the view point. More...
 
void Up (Quantity_Parameter &Vx, Quantity_Parameter &Vy, Quantity_Parameter &Vz) const
 Returns the vector giving the position of the high point. More...
 
Quantity_PlaneAngle Twist () const
 Returns in RADIANS the orientation of the view around the visual axis measured from the Y axis of the screen. More...
 
V3d_TypeOfShadingModel ShadingModel () const
 Returns the current shading model. More...
 
V3d_TypeOfSurfaceDetail SurfaceDetail () const
 
Handle< Graphic3d_TextureEnvTextureEnv () const
 
V3d_TypeOfVisualization Visualization () const
 Returns the current visualisation mode. More...
 
Standard_Boolean Antialiasing () const
 Indicates if the antialiasing is active (True) or inactive (False). More...
 
Standard_Boolean ZCueing (Quantity_Length &Depth, Quantity_Length &Width) const
 Returns activity and information on the Zcueing. <Depth> : Depth of plane. <Width> : Thickness around the plane. More...
 
V3d_TypeOfZclipping ZClipping (Quantity_Length &Depth, Quantity_Length &Width) const
 Returns current information on the ZClipping. <Depth> : Depth of plane. <Width> : Thickness around the plane. <TypeOfZclipping> : "BACK" "FRONT" "SLICE" "OFF". More...
 
Standard_Boolean IfMoreLights () const
 Returns True if One light more can be activated in this View. More...
 
void InitActiveLights ()
 initializes an iteration on the active Lights. More...
 
Standard_Boolean MoreActiveLights () const
 returns true if there are more active Light(s) to return. More...
 
void NextActiveLights ()
 Go to the next active Light (if there is not, ActiveLight will raise an exception) More...
 
Handle< V3d_LightActiveLight () const
 
Handle< V3d_ViewerViewer () const
 Returns the viewer in which the view has been created. More...
 
Standard_Boolean IfWindow () const
 Returns True if MyView is associated with a window . More...
 
Handle< Aspect_WindowWindow () const
 Returns the Aspect Window associated with the view. More...
 
V3d_TypeOfView Type () const
 Returns the Type of the View. More...
 
void Pan (const Standard_Integer theDXp, const Standard_Integer theDYp, const Quantity_Factor 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. More...
 
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. More...
 
void StartZoomAtPoint (const Standard_Integer theXp, const Standard_Integer theYp)
 Defines starting point for ZoomAtPoint view operation. More...
 
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(). More...
 
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. More...
 
void StartRotation (const Standard_Integer X, const Standard_Integer Y, const Quantity_Ratio 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. More...
 
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>. More...
 
void SetFocale (const Quantity_Length Focale)
 Change View Plane Distance for Perspective Views Warning! raises TypeMismatch from Standard if the view is not a perspective view. More...
 
Quantity_Length Focale () const
 Returns the View Plane Distance for Perspective Views. More...
 
Handle< Visual3d_ViewView () const
 Returns the associated Visual3d view. More...
 
void SetComputedMode (const Standard_Boolean aMode)
 Switches computed HLR mode in the view. More...
 
Standard_Boolean ComputedMode () const
 Returns the computed HLR mode state. More...
 
void WindowFitAll (const Standard_Integer Xmin, const Standard_Integer Ymin, const Standard_Integer Xmax, const Standard_Integer Ymax)
 idem than WindowFit More...
 
void SetGrid (const gp_Ax3 &aPlane, const Handle< Aspect_Grid > &aGrid)
 Defines or Updates the definition of the grid in <me> More...
 
void SetGridGraphicValues (const Handle< Aspect_Grid > &aGrid)
 Defines or Updates the graphic definition of the grid in <me> More...
 
void SetGridActivity (const Standard_Boolean aFlag)
 Defines or Updates the activity of the grid in <me> More...
 
Standard_Boolean Dump (const Standard_CString theFile, const Graphic3d_BufferType &theBufferType=Graphic3d_BT_RGB)
 dump the full contents of the view at the same scale in the file <theFile>. The file name extension must be one of ".png",".bmp",".jpg",".gif". Returns FALSE when the dump has failed More...
 
Standard_Boolean Print (const Aspect_Handle hPrnDC=0, const Standard_Boolean showDialog=Standard_True, const Standard_Boolean showBackground=Standard_True, const Standard_CString filename=NULL, const Aspect_PrintAlgo printAlgorithm=Aspect_PA_STRETCH) const
 print the contents of the view to printer with preview. <hPrnDC> : If you have already an PrinterDeviceContext (HDC), then you can pass it to the print routines. If you don't have an PrinterDeviceContext, then this parameter should be NULL. <showDialog> : If hPrnDC == NULL, then you can force the print routines to open a Print Dialog box. If you want to do this, then set showDialog to TRUE If you don't want to see a dialog (only possible, if you have a hPrnDC or the dialog box was opened once before) then set <showDialog> to FALSE. <showBackground> : When set to FALSE then print the view without background color (background is white) else set to TRUE for printing with current background color. <filename>: If != NULL, then the view will be printed to a file. <printAlgorithm>: If you want to select the print algorithm, then you can specify one of existing algorithms: Aspect_PA_STRETCH, Aspect_PA_TILE. Returns Standard_True if the data is passed to the printer, otherwise Standard_False if the print operation failed. This might be related to insufficient memory or some internal errors. All this errors are indicated by the message boxes (on level of OpenGl_GraphicDriver). Warning: This function can reuse FBO assigned to the view on level of OpenGl_GraphicDriver; Please take it into account if you use it for your purposes; Warning: Works only under Windows. More...
 
Standard_Boolean ToPixMap (Image_PixMap &theImage, const Standard_Integer theWidth, const Standard_Integer theHeight, const Graphic3d_BufferType &theBufferType=Graphic3d_BT_RGB, const Standard_Boolean theToKeepAspect=Standard_True, const V3d_StereoDumpOptions theStereoOptions=V3d_SDO_MONO)
 Dumps the full contents of the view to a pixmap of pixel size <theWidth> * <theHeight> and buffer type <theBufferType>. If <theToKeepAspect> is true the aspect ratio of view will be kept if <theWidth> and <theHeight> define another ratio. Pixmap will be automatically (re)allocated when needed. When dumping stereographic camera - the corresponding middle-point monographic projection will be used for dumping by default. <theStereoOptions> flags are to be used for dumping then left or right eye projections. More...
 
void SetBackFacingModel (const V3d_TypeOfBackfacingModel aModel=V3d_TOBM_AUTOMATIC)
 Manages display of the back faces When <aModel> is TOBM_AUTOMATIC the object backfaces are displayed only for surface objects and never displayed for solid objects. this was the previous mode. <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces are always displayed both for surfaces or solids. <aModel> is TOBM_NEVER_DISPLAYED the object backfaces are never displayed. More...
 
V3d_TypeOfBackfacingModel BackFacingModel () const
 Returns current state of the back faces display. More...
 
void EnableDepthTest (const Standard_Boolean enable=Standard_True) const
 turns on/off opengl depth testing More...
 
Standard_Boolean IsDepthTestEnabled () const
 returns the current state of the depth testing More...
 
void EnableGLLight (const Standard_Boolean enable=Standard_True) const
 turns on/off opengl lighting, currently used in triedron displaying More...
 
Standard_Boolean IsGLLightEnabled () const
 returns the current state of the gl lighting currently used in triedron displaying More...
 
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 Visual3d_View. Please be aware that the planes which exceed the limit are ignored during rendering. More...
 
virtual void RemoveClipPlane (const Handle< Graphic3d_ClipPlane > &thePlane)
 Removes clip plane from the view. More...
 
void SetClipPlanes (const 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 PlaneLimit method of associated Visual3d_View. Please be aware that the planes which exceed the limit are ignored during rendering. More...
 
const Graphic3d_SequenceOfHClipPlaneGetClipPlanes () const
 Get clip planes. More...
 
void SetCamera (const Handle< Graphic3d_Camera > &theCamera)
 Change camera used by view. More...
 
const Handle< Graphic3d_Camera > & Camera () const
 Returns camera object of the view. More...
 
const Graphic3d_RenderingParamsRenderingParams () const
 Returns current rendering parameters and effect settings. More...
 
Graphic3d_RenderingParamsChangeRenderingParams ()
 Returns reference to current rendering parameters and effect settings. More...
 
Standard_Boolean IsCullingEnabled () const
 
void SetFrustumCulling (const Standard_Boolean theMode)
 Turn on/off automatic culling of objects outside frustrum (ON by default) More...
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const Handle_Standard_Type & DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Protected Member Functions

void ImmediateUpdate () const
 
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. More...
 
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. More...
 
void Translate (const Handle< Graphic3d_Camera > &theCamera, const Standard_Real theDXv, const Standard_Real theDYv) const
 

Protected Attributes

Standard_Real myOldMouseX
 
Standard_Real myOldMouseY
 
gp_Dir myCamStartOpUp
 
gp_Pnt myCamStartOpEye
 
Standard_Real myCamStartOpBnd [6]
 
gp_Pnt myCamStartOpCenter
 
Handle< Graphic3d_CameramyCamera
 
Handle< Visual3d_ViewMyView
 
Standard_Boolean myImmediateUpdate
 

Friends

void V3d_Viewer::SetViewOn ()
 Activates all of the views of a viewer attached to a window. More...
 
void V3d_Viewer::SetViewOn (const Handle< V3d_View > &View)
 Activates a particular view in the Viewer . Must be call if the Window attached to the view has been Deiconified . More...
 
void V3d_Viewer::SetViewOff ()
 Deactivates all the views of a Viewer attached to a window. More...
 
void V3d_Viewer::SetViewOff (const Handle< V3d_View > &View)
 Deactivates a particular view in the Viewer. Must be call if the Window attached to the view has been Iconified . More...
 

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. (Projection,Mapping,Zclipping,DepthCueing,AntiAliasing et Conversions) . 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::V3d_View ( const Handle< V3d_Viewer > &  VM,
const V3d_TypeOfView  Type = V3d_ORTHOGRAPHIC 
)

Initializes the view.

V3d_View::V3d_View ( const Handle< V3d_Viewer > &  theVM,
const Handle< V3d_View > &  theView 
)

Initializes the view by copying.

Member Function Documentation

Handle< V3d_Light > V3d_View::ActiveLight ( ) const
virtual void V3d_View::AddClipPlane ( const 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 Visual3d_View. Please be aware that the planes which exceed the limit are ignored during rendering.

Parameters
thePlane[in] the clip plane to be added to view.
Standard_Boolean V3d_View::Antialiasing ( ) const

Indicates if the antialiasing is active (True) or inactive (False).

void V3d_View::At ( V3d_Coordinate X,
V3d_Coordinate Y,
V3d_Coordinate Z 
) const

Returns the position of the view point.

void V3d_View::AutoZFit ( )

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

void V3d_View::AxialScale ( Standard_Real Sx,
Standard_Real Sy,
Standard_Real Sz 
) const

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

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.

V3d_TypeOfBackfacingModel V3d_View::BackFacingModel ( ) const

Returns current state of the back faces display.

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

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

Quantity_Color V3d_View::BackgroundColor ( ) const

Returns the Background color object of the view.

const 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.
Graphic3d_RenderingParams& V3d_View::ChangeRenderingParams ( )

Returns reference to current rendering parameters and effect settings.

Handle< Aspect_ColorScale > V3d_View::ColorScale ( ) const
void V3d_View::ColorScaleDisplay ( )
void V3d_View::ColorScaleErase ( )
Standard_Boolean V3d_View::ColorScaleIsDisplayed ( ) const
Standard_Boolean V3d_View::ComputedMode ( ) const

Returns the computed HLR mode state.

Quantity_Length 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,
V3d_Coordinate Xv,
V3d_Coordinate Yv 
) const

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

Standard_Integer V3d_View::Convert ( const Quantity_Length  Vv) const

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

void V3d_View::Convert ( const V3d_Coordinate  Xv,
const V3d_Coordinate  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::Convert ( const Standard_Integer  Xp,
const Standard_Integer  Yp,
V3d_Coordinate X,
V3d_Coordinate Y,
V3d_Coordinate 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 V3d_Coordinate  X,
const V3d_Coordinate  Y,
const V3d_Coordinate  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::ConvertToGrid ( const Standard_Integer  Xp,
const Standard_Integer  Yp,
V3d_Coordinate Xg,
V3d_Coordinate Yg,
V3d_Coordinate 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 V3d_Coordinate  X,
const V3d_Coordinate  Y,
const V3d_Coordinate  Z,
V3d_Coordinate Xg,
V3d_Coordinate Yg,
V3d_Coordinate 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,
V3d_Coordinate X,
V3d_Coordinate Y,
V3d_Coordinate Z,
Quantity_Parameter Vx,
Quantity_Parameter Vy,
Quantity_Parameter 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.

Quantity_Length V3d_View::Depth ( ) const

Returns the Distance between the Eye and View Point.

void V3d_View::DepthFitAll ( const Quantity_Coefficient  Aspect = 0.01,
const Quantity_Coefficient  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::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 
)

dump the full contents of the view at the same scale in the file <theFile>. The file name extension must be one of ".png",".bmp",".jpg",".gif". Returns FALSE when the dump has failed

void V3d_View::EnableDepthTest ( const Standard_Boolean  enable = Standard_True) const

turns on/off opengl depth testing

void V3d_View::EnableGLLight ( const Standard_Boolean  enable = Standard_True) const

turns on/off opengl lighting, currently used in triedron displaying

void V3d_View::Eye ( V3d_Coordinate X,
V3d_Coordinate Y,
V3d_Coordinate Z 
) const

Returns the position of the eye.

void V3d_View::FitAll ( const Quantity_Coefficient  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.

Parameters
theMargin[in] the margin coefficient for view borders.
theToUpdate[in] flag to perform view update.
void V3d_View::FitAll ( const Bnd_Box theBox,
const Quantity_Coefficient  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.

Parameters
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  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
protected

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

Parameters
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] if passed TRUE - in cases when the whole bounding box projected into thin line going along Z-axis of screen, the view plane is enlarged such that we see the whole line on rotation, otherwise only the center of camera is adjusted.
Returns
TRUE if the fit all operation can be done.
Quantity_Length V3d_View::Focale ( ) const

Returns the View Plane Distance for Perspective Views.

void V3d_View::FocalReferencePoint ( V3d_Coordinate X,
V3d_Coordinate Y,
V3d_Coordinate Z 
) const

Returns the position of point which emanating the projections.

const Graphic3d_SequenceOfHClipPlane& V3d_View::GetClipPlanes ( ) const

Get clip planes.

Returns
sequence clip planes that have been set for the view
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 Color1,
Quantity_Color Color2 
) const

Returns the gradient background colour objects of the view.

void V3d_View::GraduatedTrihedronDisplay ( const Graphic3d_GraduatedTrihedron theTrigedronData)

Displays a graduated trihedron.

void V3d_View::GraduatedTrihedronErase ( )

Erases a graduated trihedron from 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 .

void V3d_View::ImmediateUpdate ( ) const
protected
void V3d_View::InitActiveLights ( )

initializes an iteration on the active Lights.

void V3d_View::Invalidate ( ) const

Invalidates view content but does not redraw it.

Standard_Boolean V3d_View::IsActiveLight ( const Handle< V3d_Light > &  aLight) const

Returns TRUE when the light is active in this view.

Standard_Boolean V3d_View::IsCullingEnabled ( ) const
Returns
flag value of objects culling mechanism
Standard_Boolean V3d_View::IsDepthTestEnabled ( ) const

returns the current state of the depth testing

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::IsGLLightEnabled ( ) const

returns the current state of the gl lighting currently used in triedron displaying

Standard_Boolean V3d_View::MoreActiveLights ( ) const

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

void V3d_View::Move ( const Quantity_Length  Dx,
const Quantity_Length  Dy,
const Quantity_Length  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 V3d_TypeOfAxe  Axe,
const Quantity_Length  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::Move ( const Quantity_Length  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::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 V3d_View::NextActiveLights ( )

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 Quantity_Factor  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.

Parameters
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 Quantity_Factor  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.

Parameters
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.
void V3d_View::Place ( const Standard_Integer  theXp,
const Standard_Integer  theYp,
const Quantity_Factor  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_Boolean V3d_View::Print ( const Aspect_Handle  hPrnDC = 0,
const Standard_Boolean  showDialog = Standard_True,
const Standard_Boolean  showBackground = Standard_True,
const Standard_CString  filename = NULL,
const Aspect_PrintAlgo  printAlgorithm = Aspect_PA_STRETCH 
) const

print the contents of the view to printer with preview. <hPrnDC> : If you have already an PrinterDeviceContext (HDC), then you can pass it to the print routines. If you don't have an PrinterDeviceContext, then this parameter should be NULL. <showDialog> : If hPrnDC == NULL, then you can force the print routines to open a Print Dialog box. If you want to do this, then set showDialog to TRUE If you don't want to see a dialog (only possible, if you have a hPrnDC or the dialog box was opened once before) then set <showDialog> to FALSE. <showBackground> : When set to FALSE then print the view without background color (background is white) else set to TRUE for printing with current background color. <filename>: If != NULL, then the view will be printed to a file. <printAlgorithm>: If you want to select the print algorithm, then you can specify one of existing algorithms: Aspect_PA_STRETCH, Aspect_PA_TILE. Returns Standard_True if the data is passed to the printer, otherwise Standard_False if the print operation failed. This might be related to insufficient memory or some internal errors. All this errors are indicated by the message boxes (on level of OpenGl_GraphicDriver). Warning: This function can reuse FBO assigned to the view on level of OpenGl_GraphicDriver; Please take it into account if you use it for your purposes; Warning: Works only under Windows.

void V3d_View::Proj ( Quantity_Parameter Vx,
Quantity_Parameter Vy,
Quantity_Parameter Vz 
) const

Returns the projection vector.

void V3d_View::Project ( const V3d_Coordinate  X,
const V3d_Coordinate  Y,
const V3d_Coordinate  Z,
V3d_Coordinate Xp,
V3d_Coordinate Yp 
) const

Converts the point defined in the user space of the view to the projected view plane point at z 0.

void V3d_View::ProjReferenceAxe ( const Standard_Integer  Xpix,
const Standard_Integer  Ypix,
V3d_Coordinate XP,
V3d_Coordinate YP,
V3d_Coordinate ZP,
V3d_Coordinate VX,
V3d_Coordinate VY,
V3d_Coordinate 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).

void V3d_View::Redraw ( ) const

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

void V3d_View::Redraw ( const Standard_Integer  x,
const Standard_Integer  y,
const Standard_Integer  width,
const Standard_Integer  height 
) const

Redisplays the view area after esxposure. [x,y] define the min xy area position [width,height] the size of the area in pixel unit.

void V3d_View::RedrawImmediate ( ) const

Updates layer of immediate presentations.

void V3d_View::Remove ( ) const

Destroys the view.

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

Removes clip plane from the view.

Parameters
thePlane[in] the clip plane to be removed from view.
const Graphic3d_RenderingParams& V3d_View::RenderingParams ( ) const

Returns current rendering parameters and effect settings.

void V3d_View::Reset ( const Standard_Boolean  update = Standard_True)

Resets the centering and the orientation of the view Updates 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 Quantity_PlaneAngle  Ax,
const Quantity_PlaneAngle  Ay,
const Quantity_PlaneAngle  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 Quantity_PlaneAngle  Ax,
const Quantity_PlaneAngle  Ay,
const Quantity_PlaneAngle  Az,
const V3d_Coordinate  X,
const V3d_Coordinate  Y,
const V3d_Coordinate  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 Quantity_PlaneAngle  Angle,
const V3d_Coordinate  X,
const V3d_Coordinate  Y,
const V3d_Coordinate  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::Rotate ( const V3d_TypeOfAxe  Axe,
const Quantity_PlaneAngle  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 Quantity_PlaneAngle  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::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>.

Quantity_Factor V3d_View::Scale ( ) const

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

void V3d_View::Scale ( const Handle< Graphic3d_Camera > &  theCamera,
const Standard_Real  theSizeXv,
const Standard_Real  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
theSizeXv[in] size of viewport frame on "x" axis.
theSizeYv[in] size of viewport frame on "y" axis.
void V3d_View::SetAntialiasingOff ( )

Desactivates antialiasing in the view.

void V3d_View::SetAntialiasingOn ( )

Activates antialiasing in the view.

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

Defines the position of the view point.

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 V3d_Coordinate  X,
const V3d_Coordinate  Y,
const V3d_Coordinate  Z,
const Quantity_Parameter  Vx,
const Quantity_Parameter  Vy,
const Quantity_Parameter  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 V3d_TypeOfBackfacingModel  aModel = V3d_TOBM_AUTOMATIC)

Manages display of the back faces When <aModel> is TOBM_AUTOMATIC the object backfaces are displayed only for surface objects and never displayed for solid objects. this was the previous mode. <aModel> is TOBM_ALWAYS_DISPLAYED the object backfaces are always displayed both for surfaces or solids. <aModel> is TOBM_NEVER_DISPLAYED the object backfaces are never displayed.

void V3d_View::SetBackgroundColor ( const Quantity_TypeOfColor  Type,
const Quantity_Parameter  V1,
const Quantity_Parameter  V2,
const Quantity_Parameter  V3 
)

Defines the background colour of the view by supplying : the colour definition type, and the three corresponding values.

void V3d_View::SetBackgroundColor ( const Quantity_Color Color)

Defines the background colour of the view by supplying : the colour object.

void V3d_View::SetBackgroundColor ( const Quantity_NameOfColor  Name)

Defines the background colour of the view by supplying : the colour name in the form Quantity_NOC_xxxx .

void V3d_View::SetBackgroundImage ( const Standard_CString  FileName,
const Aspect_FillMethod  FillStyle = Aspect_FM_CENTERED,
const Standard_Boolean  update = Standard_False 
)

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

void V3d_View::SetBgGradientColors ( const Quantity_Color Color1,
const Quantity_Color Color2,
const Aspect_GradientFillMethod  FillStyle = Aspect_GFM_HOR,
const Standard_Boolean  update = Standard_False 
)

Defines the gradient background colours of the view by supplying : two colour objects, and fill method (horizontal by default)

void V3d_View::SetBgGradientColors ( const Quantity_NameOfColor  Color1,
const Quantity_NameOfColor  Color2,
const Aspect_GradientFillMethod  FillStyle = Aspect_GFM_HOR,
const Standard_Boolean  update = Standard_False 
)

Defines the gradient background colours of the view by supplying : two colour names in the form Quantity_NOC_xxxx, and fill method (horizontal by default)

void V3d_View::SetBgGradientStyle ( const Aspect_GradientFillMethod  AMethod = Aspect_GFM_HOR,
const Standard_Boolean  update = Standard_False 
)

Defines the gradient background fill method of the view.

void V3d_View::SetBgImageStyle ( const Aspect_FillMethod  FillStyle,
const Standard_Boolean  update = 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".

Parameters
theXp[in] the x coordinate.
theYp[in] the y coordinate.
void V3d_View::SetClipPlanes ( const 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 PlaneLimit method of associated Visual3d_View. Please be aware that the planes which exceed the limit are ignored during rendering.

Parameters
thePlanes[in] the clip planes to set.
void V3d_View::SetComputedMode ( const Standard_Boolean  aMode)

Switches computed HLR mode in the view.

void V3d_View::SetDepth ( const Quantity_Length  Depth)

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

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

Defines the position of the eye..

void V3d_View::SetFocale ( const Quantity_Length  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.

void V3d_View::SetFrustumCulling ( const Standard_Boolean  theMode)

Turn on/off automatic culling of objects outside frustrum (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::SetGridGraphicValues ( const Handle< Aspect_Grid > &  aGrid)

Defines or Updates the graphic definition of the grid in <me>

Standard_Boolean V3d_View::SetImmediateUpdate ( const Standard_Boolean  theImmediateUpdate)

sets the immediate update mode and returns the previous one.

void V3d_View::SetLayerMgr ( const Handle< V3d_LayerMgr > &  aMgr)
void V3d_View::SetLightOff ( const Handle< V3d_Light > &  MyLight)

Desactivate MyLight in this view.

void V3d_View::SetLightOff ( )

Deactivate all the Lights defined in this view.

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

Activates MyLight in the view.

void V3d_View::SetLightOn ( )

Activates all the lights defined in this view.

void V3d_View::SetMagnify ( const Handle< Aspect_Window > &  IdWin,
const Handle< V3d_View > &  aPreviousView,
const Standard_Integer  x1,
const Standard_Integer  y1,
const Standard_Integer  x2,
const Standard_Integer  y2 
)
void V3d_View::SetProj ( const Quantity_Parameter  Vx,
const Quantity_Parameter  Vy,
const Quantity_Parameter  Vz 
)

Defines the orientation of the projection.

void V3d_View::SetProj ( const V3d_TypeOfOrientation  Orientation)

Defines the orientation of the projection .

void V3d_View::SetScale ( const Quantity_Factor  Coef)

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

void V3d_View::SetShadingModel ( const V3d_TypeOfShadingModel  Model)

Defines the shading model for the visualisation ZBUFFER mode. Various models are available.

void V3d_View::SetSize ( const Quantity_Length  theSize)

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

void V3d_View::SetSurfaceDetail ( const V3d_TypeOfSurfaceDetail  SurfaceDetail)

select the kind of rendering for texture mapping no texture mapping by default

void V3d_View::SetTextureEnv ( const Handle< Graphic3d_TextureEnv > &  ATexture)

set the environment texture to use no environment texture by default

void V3d_View::SetTwist ( const Quantity_PlaneAngle  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 Quantity_Parameter  Vx,
const Quantity_Parameter  Vy,
const Quantity_Parameter  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  Mode)

Defines the visualisation mode in the view.

void V3d_View::SetWindow ( const Handle< Aspect_Window > &  IdWin)

Activates the view in the window specified and Map the Window to the screen. Warning! raises MultiplyDefined from Standard if the view is already activated in a window. Warning: The view is centered and resized to preserve the height/width ratio of the window.

void V3d_View::SetWindow ( const Handle< Aspect_Window > &  aWindow,
const Aspect_RenderingContext  aContext,
const Aspect_GraphicCallbackProc aDisplayCB,
const Standard_Address  aClientData 
)

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. If <aDisplayCB> is not NULL then a user display CB is call at the end of the OCC graphic traversal and just before the swap of buffers. The <aClientData> is pass to this call back. Warning! raises MultiplyDefined from Standard if the view is already activated in a window. Warning: The view is centered and resized to preserve the height/width ratio of the window.

void V3d_View::SetZClippingDepth ( const Quantity_Length  Depth)

Defines the depth of the medium clipping plane.

void V3d_View::SetZClippingType ( const V3d_TypeOfZclipping  Type)

Defines the type of ZClipping.

void V3d_View::SetZClippingWidth ( const Quantity_Length  Width)

Defines the thicknes around the medium clippling plane. .

void V3d_View::SetZCueingDepth ( const Quantity_Length  Depth)

Defines the depth of the medium plane.

void V3d_View::SetZCueingOff ( )

Desactivates ZCueing in the view.

void V3d_View::SetZCueingOn ( )

Activates ZCueing in the view.

void V3d_View::SetZCueingWidth ( const Quantity_Length  Width)

Defines the thickness around the medium plane.

void V3d_View::SetZoom ( const Quantity_Factor  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 Quantity_Length  Size)

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 .

V3d_TypeOfShadingModel V3d_View::ShadingModel ( ) const

Returns the current shading model.

void V3d_View::Size ( Quantity_Length Width,
Quantity_Length Height 
) const

Returns the height and width of the view.

void V3d_View::StartRotation ( const Standard_Integer  X,
const Standard_Integer  Y,
const Quantity_Ratio  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.

Parameters
theXp[in] the x mouse coordinate, in pixels.
theYp[in] the y mouse coordinate, in pixels.
V3d_TypeOfSurfaceDetail V3d_View::SurfaceDetail ( ) const
Handle< Graphic3d_TextureEnv > V3d_View::TextureEnv ( ) const
Standard_Boolean V3d_View::ToPixMap ( Image_PixMap theImage,
const Standard_Integer  theWidth,
const Standard_Integer  theHeight,
const Graphic3d_BufferType theBufferType = Graphic3d_BT_RGB,
const Standard_Boolean  theToKeepAspect = Standard_True,
const V3d_StereoDumpOptions  theStereoOptions = V3d_SDO_MONO 
)

Dumps the full contents of the view to a pixmap of pixel size <theWidth> * <theHeight> and buffer type <theBufferType>. If <theToKeepAspect> is true the aspect ratio of view will be kept if <theWidth> and <theHeight> define another ratio. Pixmap will be automatically (re)allocated when needed. When dumping stereographic camera - the corresponding middle-point monographic projection will be used for dumping by default. <theStereoOptions> flags are to be used for dumping then left or right eye projections.

void V3d_View::Translate ( const Quantity_Length  Dx,
const Quantity_Length  Dy,
const Quantity_Length  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 V3d_TypeOfAxe  Axe,
const Quantity_Length  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::Translate ( const Quantity_Length  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 Handle< Graphic3d_Camera > &  theCamera,
const Standard_Real  theDXv,
const Standard_Real  theDYv 
) const
protected
void V3d_View::TriedronDisplay ( const Aspect_TypeOfTriedronPosition  APosition = Aspect_TOTP_CENTER,
const Quantity_NameOfColor  AColor = Quantity_NOC_WHITE,
const Standard_Real  AScale = 0.02,
const V3d_TypeOfVisualization  AMode = 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::TriedronEcho ( const Aspect_TypeOfTriedronEcho  AType = Aspect_TOTE_NONE)

Highlights the echo zone of the Triedron.

void V3d_View::TriedronErase ( )

Erases the Triedron.

void V3d_View::Turn ( const Quantity_PlaneAngle  Ax,
const Quantity_PlaneAngle  Ay,
const Quantity_PlaneAngle  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 Quantity_PlaneAngle  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 V3d_View::Turn ( const Quantity_PlaneAngle  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.

Quantity_PlaneAngle 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 ( Quantity_Parameter Vx,
Quantity_Parameter Vy,
Quantity_Parameter 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. The view is redrawn.

Handle< Visual3d_View > V3d_View::View ( ) const

Returns the associated Visual3d view.

Handle< V3d_Viewer > V3d_View::Viewer ( ) const

Returns the viewer in which the view has been created.

V3d_TypeOfVisualization V3d_View::Visualization ( ) const

Returns the current visualisation mode.

Handle< Aspect_Window > V3d_View::Window ( ) const

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.

Parameters
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.
void V3d_View::WindowFitAll ( const Standard_Integer  Xmin,
const Standard_Integer  Ymin,
const Standard_Integer  Xmax,
const Standard_Integer  Ymax 
)

idem than WindowFit

void V3d_View::ZBufferTriedronSetup ( const Quantity_NameOfColor  XColor = Quantity_NOC_RED,
const Quantity_NameOfColor  YColor = Quantity_NOC_GREEN,
const Quantity_NameOfColor  ZColor = Quantity_NOC_BLUE1,
const Standard_Real  SizeRatio = 0.8,
const Standard_Real  AxisDiametr = 0.05,
const Standard_Integer  NbFacettes = 12 
)

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

V3d_TypeOfZclipping V3d_View::ZClipping ( Quantity_Length Depth,
Quantity_Length Width 
) const

Returns current information on the ZClipping. <Depth> : Depth of plane. <Width> : Thickness around the plane. <TypeOfZclipping> : "BACK" "FRONT" "SLICE" "OFF".

Standard_Boolean V3d_View::ZCueing ( Quantity_Length Depth,
Quantity_Length Width 
) const

Returns activity and information on the Zcueing. <Depth> : Depth of plane. <Width> : Thickness around the plane.

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

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.

Parameters
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 .

Friends And Related Function Documentation

void V3d_Viewer::SetViewOff ( )
friend

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

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

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

void V3d_Viewer::SetViewOn ( )
friend

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

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

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

Field Documentation

Handle< Graphic3d_Camera > V3d_View::myCamera
protected
Standard_Real V3d_View::myCamStartOpBnd[6]
protected
gp_Pnt V3d_View::myCamStartOpCenter
protected
gp_Pnt V3d_View::myCamStartOpEye
protected
gp_Dir V3d_View::myCamStartOpUp
protected
Standard_Boolean V3d_View::myImmediateUpdate
protected
Standard_Real V3d_View::myOldMouseX
protected
Standard_Real V3d_View::myOldMouseY
protected
Handle< Visual3d_View > V3d_View::MyView
protected

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