// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Visual3d_View_HeaderFile #define _Visual3d_View_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_Visual3d_View_HeaderFile #include #endif #ifndef _Graphic3d_CView_HeaderFile #include #endif #ifndef _Visual3d_ContextView_HeaderFile #include #endif #ifndef _Visual3d_ViewMapping_HeaderFile #include #endif #ifndef _Visual3d_ViewOrientation_HeaderFile #include #endif #ifndef _Handle_Aspect_Window_HeaderFile #include #endif #ifndef _TColStd_Array2OfReal_HeaderFile #include #endif #ifndef _Graphic3d_SequenceOfStructure_HeaderFile #include #endif #ifndef _Handle_Graphic3d_GraphicDriver_HeaderFile #include #endif #ifndef _Aspect_Background_HeaderFile #include #endif #ifndef _Aspect_GradientBackground_HeaderFile #include #endif #ifndef _Graphic3d_MapOfStructure_HeaderFile #include #endif #ifndef _Visual3d_ViewManagerPtr_HeaderFile #include #endif #ifndef _Graphic3d_CBitFields8_HeaderFile #include #endif #ifndef _Graphic3d_CGraduatedTrihedron_HeaderFile #include #endif #ifndef _Graphic3d_DataStructureManager_HeaderFile #include #endif #ifndef _Handle_Visual3d_ViewManager_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Handle_Visual3d_Layer_HeaderFile #include #endif #ifndef _Standard_CString_HeaderFile #include #endif #ifndef _Aspect_FillMethod_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Aspect_GradientFillMethod_HeaderFile #include #endif #ifndef _Visual3d_TypeOfBackfacingModel_HeaderFile #include #endif #ifndef _Aspect_RenderingContext_HeaderFile #include #endif #ifndef _Aspect_GraphicCallbackProc_HeaderFile #include #endif #ifndef _Standard_Address_HeaderFile #include #endif #ifndef _Quantity_NameOfColor_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Aspect_TypeOfTriedronPosition_HeaderFile #include #endif #ifndef _Aspect_TypeOfTriedronEcho_HeaderFile #include #endif #ifndef _OSD_FontAspect_HeaderFile #include #endif #ifndef _Visual3d_TypeOfAnswer_HeaderFile #include #endif #ifndef _Handle_Graphic3d_Structure_HeaderFile #include #endif #ifndef _Aspect_TypeOfUpdate_HeaderFile #include #endif #ifndef _Aspect_TypeOfHighlightMethod_HeaderFile #include #endif #ifndef _Handle_Aspect_GraphicDriver_HeaderFile #include #endif #ifndef _Handle_Graphic3d_Plotter_HeaderFile #include #endif #ifndef _Aspect_Handle_HeaderFile #include #endif #ifndef _Aspect_PrintAlgo_HeaderFile #include #endif #ifndef _Graphic3d_PtrFrameBuffer_HeaderFile #include #endif #ifndef _Image_CRawBufferData_HeaderFile #include #endif #ifndef _Graphic3d_ExportFormat_HeaderFile #include #endif #ifndef _Graphic3d_SortType_HeaderFile #include #endif class Aspect_Window; class Graphic3d_GraphicDriver; class Visual3d_TransformError; class Visual3d_ViewDefinitionError; class Visual3d_ViewManager; class Visual3d_ViewOrientation; class Visual3d_ViewMapping; class Visual3d_ContextView; class Visual3d_Layer; class Aspect_Background; class Aspect_GradientBackground; class TColStd_Array2OfReal; class TCollection_ExtendedString; class Quantity_Color; class TCollection_AsciiString; class Graphic3d_MapOfStructure; class Graphic3d_Structure; class Aspect_GraphicDriver; class Graphic3d_Plotter; //! Creation and edition of a view in a 3D visualiser.
//! A 3D view is composed of an "orientation" part defined
//! by the position of the observer, the direction of view,
//! and a "mapping" part defined by the type of projection
//! (parallel or perspective) and by the window-viewport
//! couple which allows passage from the projected coordinate
//! space into the screen space.
//! Summary of 3D Viewing
//! To define a view, you must define:
//! - The view orientation transformation
//! - The view mapping transformation
//! - The view representation.
//! To activate a view, you must define:
//! - The associated window.
class Visual3d_View : public Graphic3d_DataStructureManager { public: //! Creates a view in the viewer with a default
//! orientation and a default mapping.
Standard_EXPORT Visual3d_View(const Handle(Visual3d_ViewManager)& AManager); //! Creates a view in the viewer with the orientation
//! , the mapping , and the context.
Standard_EXPORT Visual3d_View(const Handle(Visual3d_ViewManager)& AManager,const Visual3d_ViewOrientation& VO,const Visual3d_ViewMapping& VM,const Visual3d_ContextView& CTX); //! Activates the view .
//! Map the associated window on the screen and
//! post the view in this window.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT void Activate() ; //! Deactivates the view .
//! Unmap the associated window on the screen and
//! unpost the view in this window.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT void Deactivate() ; //! Deletes and erases the view .
Standard_EXPORT virtual void Destroy() ; ~Visual3d_View() { Destroy(); } //! Updates screen in all cases.
Standard_EXPORT void Redraw() ; //! Updates screen area in all cases.
//! area is given by his xy min corner and size in pixel coordinates
Standard_EXPORT void Redraw(const Standard_Integer x,const Standard_Integer y,const Standard_Integer width,const Standard_Integer height) ; //! Updates screen in all cases.
Standard_EXPORT void Redraw(const Handle(Visual3d_Layer)& AnUnderLayer,const Handle(Visual3d_Layer)& AnOverLayer) ; //! Updates screen area in all cases.
//! area is given by his xy min corner and size in pixel coordinates
Standard_EXPORT void Redraw(const Handle(Visual3d_Layer)& AnUnderLayer,const Handle(Visual3d_Layer)& AnOverLayer,const Standard_Integer x,const Standard_Integer y,const Standard_Integer width,const Standard_Integer height) ; //! Deletes and erases the view .
//! Warning: No more graphic operations in after this call.
Standard_EXPORT void Remove() ; //! Updates the view after the modification
//! of the associated window.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT void Resized() ; //! Modifies the default window background.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT void SetBackground(const Aspect_Background& ABack) ; //! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT void SetBackgroundImage(const Standard_CString FileName,const Aspect_FillMethod FillStyle,const Standard_Boolean update) ; //! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT void SetBgImageStyle(const Aspect_FillMethod FillStyle,const Standard_Boolean update) ; //! Modifies the gradient window background.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT void SetGradientBackground(const Aspect_GradientBackground& ABack,const Standard_Boolean update) ; //! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT void SetBgGradientStyle(const Aspect_GradientFillMethod FillStyle,const Standard_Boolean update) ; //! Manages display of the back faces
Standard_EXPORT void SetBackFacingModel(const Visual3d_TypeOfBackfacingModel aModel) ; //! Returns current state of the back faces display
Standard_EXPORT Visual3d_TypeOfBackfacingModel BackFacingModel() const; //! Sets the context in the view .
Standard_EXPORT void SetContext(const Visual3d_ContextView& CTX) ; //! Sets the transformation matrix that is applied
//! to field of the view .
Standard_EXPORT void SetTransform(const TColStd_Array2OfReal& AMatrix) ; //! Modifies the mapping of the view .
Standard_EXPORT void SetViewMapping(const Visual3d_ViewMapping& VM) ; //! Saves the current mapping which will be the
//! reference value for the reset of the mapping
//! done by the ViewmappingReset method.
Standard_EXPORT void SetViewMappingDefault() ; //! Modifies the orientation of .
Standard_EXPORT void SetViewOrientation(const Visual3d_ViewOrientation& VO) ; //! Saves the current orientation which will be the
//! reference value for the reset of the orientation
//! done by the ViewOrientationReset method.
Standard_EXPORT void SetViewOrientationDefault() ; //! Associates the window to the view .
//! No new association if the window is already defined.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if it is impossible
//! to associate a view and a window.
//! (association already done or another problem)
//! Modifies the viewmapping of the associated view
//! when it calls the SetRatio method.
//! After this call, each view is mapped in an unique window.
Standard_EXPORT void SetWindow(const Handle(Aspect_Window)& AWindow) ; //! Associates the window and context
//! to the view .
//! If is not NULL the graphic context is used
//! directly to draw something in this view.
//! Otherwise an internal context is created.
//! If 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 is pass
//! to this call back.
//! No new association if the window is already defined.
//! Category: Methods to modify the class definition
//! Warning: Raises ViewDefinitionError if it is impossible
//! to associate a view and a window.
//! (association already done or another problem)
//! Modifies the viewmapping of the associated view
//! when it calls the SetRatio method.
//! After this call, each view is mapped in an unique window.
Standard_EXPORT void SetWindow(const Handle(Aspect_Window)& AWindow,const Aspect_RenderingContext AContext,const Aspect_GraphicCallbackProc& ADisplayCB,const Standard_Address AClientData) ; //! Updates screen in function of modifications of
//! the structures.
Standard_EXPORT void Update() ; //! Updates screen in function of modifications of
//! the structures.
Standard_EXPORT void Update(const Handle(Visual3d_Layer)& AnUnderLayer,const Handle(Visual3d_Layer)& AnOverLayer) ; //! Sets the value of the mapping to be the same as
//! the mapping saved by the SetViewMappingDefaut method.
Standard_EXPORT void ViewMappingReset() ; //! Sets the value of the orientation to be the same as the
//! orientation saved by the SetViewOrientationDefaut method.
Standard_EXPORT void ViewOrientationReset() ; //! Activates animation mode with an optional degeneration
//! according to the TypeOfDegenerateModel of each graphic structure
//! When the animation mode is activated in the view,
//! all Graphic3d_Structure are stored in a graphic object.
//! Warning: only ONE view may have animation mode turned on
//! at same time.
Standard_EXPORT void SetAnimationModeOn(const Standard_Boolean degenerate = Standard_False) ; //! Deactivates the animation mode.
Standard_EXPORT void SetAnimationModeOff() ; //! Returns the activity of the animation mode.
Standard_EXPORT Standard_Boolean AnimationModeIsOn() const; //! Returns the activity of the degenerate mode.
Standard_EXPORT Standard_Boolean DegenerateModeIsOn() const; //! Switches computed HLR mode in the view
Standard_EXPORT void SetComputedMode(const Standard_Boolean aMode) ; //! Returns the computed HLR mode state
Standard_EXPORT Standard_Boolean ComputedMode() const; //! Customization of the ZBUFFER Triedron.
//! Initializes Colors of X Y and axis
//! Scale ratio defines decreasing of trihedron size when
//! its position is out of a View
Standard_EXPORT 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) ; //! Display of the Triedron.
//! Initialize position, color and length of Triedron axes.
//! The scale is a percent of the window width.
//! If AsWireframe is FALSE triedron is shown in shaded mode
//! AColor is not considered for ZBUFFER mode
Standard_EXPORT void TriedronDisplay(const Aspect_TypeOfTriedronPosition APosition = Aspect_TOTP_CENTER,const Quantity_NameOfColor AColor = Quantity_NOC_WHITE,const Standard_Real AScale = 0.02,const Standard_Boolean AsWireframe = Standard_True) ; //! Erases the Triedron.
Standard_EXPORT void TriedronErase() ; //! Highlights the echo zone of the Triedron.
Standard_EXPORT void TriedronEcho(const Aspect_TypeOfTriedronEcho AType = Aspect_TOTE_NONE) ; //! Returns data of a graduated trihedron if displayed (return value is True)
Standard_EXPORT Standard_Boolean GetGraduatedTrihedron(TCollection_ExtendedString& xname,TCollection_ExtendedString& yname,TCollection_ExtendedString& zname,Standard_Boolean& xdrawname,Standard_Boolean& ydrawname,Standard_Boolean& zdrawname,Standard_Boolean& xdrawvalues,Standard_Boolean& ydrawvalues,Standard_Boolean& zdrawvalues,Standard_Boolean& drawgrid,Standard_Boolean& drawaxes,Standard_Integer& nbx,Standard_Integer& nby,Standard_Integer& nbz,Standard_Integer& xoffset,Standard_Integer& yoffset,Standard_Integer& zoffset,Standard_Integer& xaxisoffset,Standard_Integer& yaxisoffset,Standard_Integer& zaxisoffset,Standard_Boolean& xdrawtickmarks,Standard_Boolean& ydrawtickmarks,Standard_Boolean& zdrawtickmarks,Standard_Integer& xtickmarklength,Standard_Integer& ytickmarklength,Standard_Integer& ztickmarklength,Quantity_Color& gridcolor,Quantity_Color& xnamecolor,Quantity_Color& ynamecolor,Quantity_Color& znamecolor,Quantity_Color& xcolor,Quantity_Color& ycolor,Quantity_Color& zcolor,TCollection_AsciiString& fontOfNames,OSD_FontAspect& styleOfNames,Standard_Integer& sizeOfNames,TCollection_AsciiString& fontOfValues,OSD_FontAspect& styleOfValues,Standard_Integer& sizeOfValues) const; //! Displays a graduated trihedron.
Standard_EXPORT void GraduatedTrihedronDisplay(const TCollection_ExtendedString& xname,const TCollection_ExtendedString& yname,const TCollection_ExtendedString& zname,const Standard_Boolean xdrawname,const Standard_Boolean ydrawname,const Standard_Boolean zdrawname,const Standard_Boolean xdrawvalues,const Standard_Boolean ydrawvalues,const Standard_Boolean zdrawvalues,const Standard_Boolean drawgrid,const Standard_Boolean drawaxes,const Standard_Integer nbx,const Standard_Integer nby,const Standard_Integer nbz,const Standard_Integer xoffset,const Standard_Integer yoffset,const Standard_Integer zoffset,const Standard_Integer xaxisoffset,const Standard_Integer yaxisoffset,const Standard_Integer zaxisoffset,const Standard_Boolean xdrawtickmarks,const Standard_Boolean ydrawtickmarks,const Standard_Boolean zdrawtickmarks,const Standard_Integer xtickmarklength,const Standard_Integer ytickmarklength,const Standard_Integer ztickmarklength,const Quantity_Color& gridcolor,const Quantity_Color& xnamecolor,const Quantity_Color& ynamecolor,const Quantity_Color& znamecolor,const Quantity_Color& xcolor,const Quantity_Color& ycolor,const Quantity_Color& zcolor,const TCollection_AsciiString& fontOfNames,const OSD_FontAspect styleOfNames,const Standard_Integer sizeOfNames,const TCollection_AsciiString& fontOfValues,const OSD_FontAspect styleOfValues,const Standard_Integer sizeOfValues) ; //! Erases a graduated trihedron from the view.
Standard_EXPORT void GraduatedTrihedronErase() ; //! Returns the value of the default window background.
Standard_EXPORT Aspect_Background Background() const; //! Returns the value of the window background.
Standard_EXPORT Aspect_GradientBackground GradientBackground() const; //! Returns Standard_True if one of the structures
//! displayed in the view contains Polygons,
//! Triangles or Quadrangles.
Standard_EXPORT Standard_Boolean ContainsFacet() const; //! Returns Standard_True if one of the structures
//! in the set contains Polygons, Triangles
//! or Quadrangles.
Standard_EXPORT Standard_Boolean ContainsFacet(const Graphic3d_MapOfStructure& ASet) const; //! Returns the current context of the view .
Standard_EXPORT const Visual3d_ContextView& Context() const; //! Returns the set of structures displayed in
//! the view .
Standard_EXPORT void DisplayedStructures(Graphic3d_MapOfStructure& SG) const; //! Returns the activity flag of the view .
Standard_EXPORT Standard_Boolean IsActive() const; //! Returns True if the window associated to the view
//! is defined.
Standard_EXPORT Standard_Boolean IsDefined() const; //! Returns Standard_True is the view is deleted.
//! is deleted after the call Remove (me).
Standard_EXPORT Standard_Boolean IsDeleted() const; //! Returns the coordinates of the boundary box of all
//! structures displayed in the view .
Standard_EXPORT void MinMaxValues(Standard_Real& XMin,Standard_Real& YMin,Standard_Real& ZMin,Standard_Real& XMax,Standard_Real& YMax,Standard_Real& ZMax) const; //! Returns the coordinates of the boundary box of all
//! structures in the set .
Standard_EXPORT void MinMaxValues(const Graphic3d_MapOfStructure& ASet,Standard_Real& XMin,Standard_Real& YMin,Standard_Real& ZMin,Standard_Real& XMax,Standard_Real& YMax,Standard_Real& ZMax) const; //! Returns the coordinates of the projection of the
//! boundary box of all structures displayed in the view .
Standard_EXPORT void MinMaxValues(Standard_Real& XMin,Standard_Real& YMin,Standard_Real& XMax,Standard_Real& YMax) ; //! Returns the coordinates of the projection of the
//! boundary box of all structures in the set .
Standard_EXPORT void MinMaxValues(const Graphic3d_MapOfStructure& ASet,Standard_Real& XMin,Standard_Real& YMin,Standard_Real& XMax,Standard_Real& YMax) ; //! Returns number of displayed structures in
//! the view .
Standard_EXPORT Standard_Integer NumberOfDisplayedStructures() const; //! Returns the coordinates of the projection of the
//! 3d coordinates , , .
Standard_EXPORT void Projects(const Standard_Real AX,const Standard_Real AY,const Standard_Real AZ,Standard_Real& APX,Standard_Real& APY,Standard_Real& APZ) ; //! Returns the transformation associated to the view
Standard_EXPORT const TColStd_Array2OfReal& Transform() const; //! Returns the current mapping of the view .
Standard_EXPORT Visual3d_ViewMapping ViewMapping() const; //! Returns the current reset mapping of the view .
Standard_EXPORT Visual3d_ViewMapping ViewMappingDefault() const; //! Returns the current orientation of the view .
Standard_EXPORT Visual3d_ViewOrientation ViewOrientation() const; //! Returns the current reset orientation of the view .
Standard_EXPORT Visual3d_ViewOrientation ViewOrientationDefault() const; //! Returns the window associated to the view .
//! Warning: Raises ViewDefinitionError if the associated
//! window isn't defined.
Standard_EXPORT Handle_Aspect_Window Window() const; //! Returns the MAX number of light associated to the view .
Standard_EXPORT Standard_Integer LightLimit() const; //! Returns the MAX number of clipping planes
//! associated to the view .
Standard_EXPORT Standard_Integer PlaneLimit() const; //! Returns the view manager handle which manage this view
Standard_EXPORT Handle_Visual3d_ViewManager ViewManager() const; //! Computes the new presentation of the
//! structure displayed in
//! with the type Graphic3d_TOS_COMPUTED.
Standard_EXPORT void ReCompute(const Handle(Graphic3d_Structure)& AStructure) ; //! Prints informations about the view .
Standard_EXPORT void Exploration() const; //! Returns the identification number of the view .
Standard_EXPORT Standard_Integer Identification() const; //! Returns the current matrix of mapping of the view .
//! Warning: Stores the current matrix of mapping.
Standard_EXPORT const TColStd_Array2OfReal& MatrixOfMapping() ; //! Returns the current matrix of orientation of the view .
//! Warning: Stores the current matrix of orientation.
Standard_EXPORT const TColStd_Array2OfReal& MatrixOfOrientation() ; //! Returns the c structure associated to .
Standard_EXPORT Standard_Address CView() const; //! Returns the associated GraphicDriver.
Standard_EXPORT Handle_Aspect_GraphicDriver GraphicDriver() const; //! Calls the method Plot for each Structure
//! displayed in .
Standard_EXPORT void Plot(const Handle(Graphic3d_Plotter)& APlotter) const; //! print the contents of all layers of the view to the printer.
//! : Pass the PrinterDeviceContext (HDC),
//! : When set to FALSE then print the view without background color
//! (background is white)
//! else set to TRUE for printing with current background color.
//! : If != NULL, then the view will be printed to a file.
//! : Select print algorithm: stretch, tile.
//! : Scaling coefficient, used internally to scale the
//! printings accordingly to the scale factor selected in the printer
//! properties dialog.
//! Returns Standard_True if the data is passed to the printer, otherwise
//! Standard_False if the print operation failed due to printer error
//! or insufficient memory.
//! Warning: Works only under Windows.
Standard_EXPORT Standard_Boolean Print(const Handle(Visual3d_Layer)& AnUnderLayer,const Handle(Visual3d_Layer)& AnOverLayer,const Aspect_Handle hPrnDC,const Standard_Boolean showBackground,const Standard_CString filename,const Aspect_PrintAlgo printAlgorithm = Aspect_PA_STRETCH,const Standard_Real theScaleFactor = 1.0) const; //! print the contents of the view to printer.
//! : Pass the PrinterDeviceContext (HDC),
//! : When set to FALSE then print the view without background color
//! (background is white)
//! else set to TRUE for printing with current background color.
//! : If != NULL, then the view will be printed to a file.
//! : Select print algorithm: stretch, tile.
//! : Scaling coefficient, used internally to scale the
//! printings accordingly to the scale factor selected in the printer
//! properties dialog.
//! Returns Standard_True if the data is passed to the printer, otherwise
//! Standard_False if the print operation failed due to printer error
//! or insufficient memory.
//! Warning: Works only under Windows.
Standard_EXPORT Standard_Boolean Print(const Aspect_Handle hPrnDC,const Standard_Boolean showBackground,const Standard_CString filename,const Aspect_PrintAlgo printAlgorithm = Aspect_PA_STRETCH,const Standard_Real theScaleFactor = 1.0) const; //! if is Standard_True then the transparency
//! is managed in the view .
//! Default Standard_False
Standard_EXPORT void SetTransparency(const Standard_Boolean AFlag) ; //! Returns Standard_True if the ZBuffer is activated
//! in the view and Standard_False if not.
Standard_EXPORT Standard_Boolean ZBufferIsActivated() const; //! Activates the ZBuffer if the integer
//! is equal to 1.
//! Deactivates the ZBuffer if the integer
//! is equal to 0.
//! If the integer is equal to -1 then
//! - the ZBuffer is activated if
//! me->Context ().Visualization () == Visual3d_TOV_SHADING
//! - the ZBuffer is deactivated if
//! me->Context ().Visualization () == Visual3d_TOV_WIREFRAME
Standard_EXPORT void SetZBufferActivity(const Standard_Integer AnActivity) ; //! Returns the underlay of the view .
Standard_EXPORT const Handle_Visual3d_Layer& UnderLayer() const; //! Returns the underlay of the view .
Standard_EXPORT const Handle_Visual3d_Layer& OverLayer() const; //! turns on/off opengl depth
Standard_EXPORT void EnableDepthTest(const Standard_Boolean enable) const; //! returns current state of the opengl depth testing
Standard_EXPORT Standard_Boolean IsDepthTestEnabled() const; //! Reads depths of shown pixels of the given rectangle
Standard_EXPORT void ReadDepths(const Standard_Integer x,const Standard_Integer y,const Standard_Integer width,const Standard_Integer height,const Standard_Address buffer) const; //! Generate offscreen FBO in the graphic library
Standard_EXPORT Graphic3d_PtrFrameBuffer FBOCreate(const Standard_Integer width,const Standard_Integer height) ; //! Remove offscreen FBO from the graphic library
Standard_EXPORT void FBORelease(Graphic3d_PtrFrameBuffer& fboPtr) ; //! Read offscreen FBO configuration.
Standard_EXPORT void FBOGetDimensions(const Graphic3d_PtrFrameBuffer fboPtr,Standard_Integer& width,Standard_Integer& height,Standard_Integer& widthMax,Standard_Integer& heightMax) ; //! Change offscreen FBO viewport.
Standard_EXPORT void FBOChangeViewport(Graphic3d_PtrFrameBuffer& fboPtr,const Standard_Integer width,const Standard_Integer height) ; //! Dump active rendering buffer into specified memory buffer.
Standard_EXPORT Standard_Boolean BufferDump(Image_CRawBufferData& buffer) ; //! turns on/off opengl lighting, currently used in triedron displaying
Standard_EXPORT void EnableGLLight(const Standard_Boolean enable) const; //! returns the current state of the gl lighting
//! currently used in triedron displaying
Standard_EXPORT Standard_Boolean IsGLLightEnabled() const; Standard_EXPORT void Export(const Standard_CString FileName,const Graphic3d_ExportFormat Format,const Graphic3d_SortType SortType = Graphic3d_ST_BSP_Tree,const Standard_Real Precision = 0.005,const Standard_Address ProgressBarFunc = NULL,const Standard_Address ProgressObject = NULL) const; friend class Visual3d_ViewManager; DEFINE_STANDARD_RTTI(Visual3d_View) protected: private: //! Activates degenerate mode.
//! When the degenerate mode is activated in the view,
//! all Graphic3d_Structure with the type TOS_COMPUTED
//! displayed in this view are not computed.
Standard_EXPORT void SetDegenerateModeOn() ; //! Deactivates the degenerate mode.
Standard_EXPORT void SetDegenerateModeOff() ; //! Is it possible to display the structure
//! in the view ?
Standard_EXPORT Visual3d_TypeOfAnswer AcceptDisplay(const Handle(Graphic3d_Structure)& AStructure) const; //! Computes the new presentation of the
//! Structures displayed in with the type
//! Graphic3d_TOS_COMPUTED.
Standard_EXPORT void Compute() ; //! Changes the display priority of the structure .
Standard_EXPORT void ChangeDisplayPriority(const Handle(Graphic3d_Structure)& AStructure,const Standard_Integer OldPriority,const Standard_Integer NewPriority) ; //! Clears the structure to the view .
Standard_EXPORT void Clear(const Handle(Graphic3d_Structure)& AStructure,const Standard_Boolean WithDestruction) ; //! Connects the structures and .
Standard_EXPORT void Connect(const Handle(Graphic3d_Structure)& AMother,const Handle(Graphic3d_Structure)& ADaughter) ; //! Disconnects the structures and .
Standard_EXPORT void Disconnect(const Handle(Graphic3d_Structure)& AMother,const Handle(Graphic3d_Structure)& ADaughter) ; //! Display the structure to the view .
Standard_EXPORT void Display(const Handle(Graphic3d_Structure)& AStructure) ; //! Display the structure to the view .
Standard_EXPORT void Display(const Handle(Graphic3d_Structure)& AStructure,const Aspect_TypeOfUpdate AnUpdateMode) ; //! Erases the structure from the view .
Standard_EXPORT void Erase(const Handle(Graphic3d_Structure)& AStructure) ; //! Erases the structure from the view .
Standard_EXPORT void Erase(const Handle(Graphic3d_Structure)& AStructure,const Aspect_TypeOfUpdate AnUpdateMode) ; //! Highlights the structure in the view .
Standard_EXPORT void Highlight(const Handle(Graphic3d_Structure)& AStructure,const Aspect_TypeOfHighlightMethod AMethod) ; //! Transforms the structure in the view .
Standard_EXPORT void SetTransform(const Handle(Graphic3d_Structure)& AStructure,const TColStd_Array2OfReal& ATrsf) ; //! Suppress the highlighting on the structure
//! in the view .
Standard_EXPORT void UnHighlight(const Handle(Graphic3d_Structure)& AStructure) ; //! Returns an index != 0 if the structure
//! have another structure computed for the view .
Standard_EXPORT Standard_Integer IsComputed(const Handle(Graphic3d_Structure)& AStructure) const; //! Returns true if the structure is
//! displayed in the view .
Standard_EXPORT Standard_Boolean IsDisplayed(const Handle(Graphic3d_Structure)& AStructure) const; //! Modifies the aspect ratio of the view when the
//! associated window is defined or resized.
Standard_EXPORT void SetRatio() ; //! Updates the lights when the associated window is defined
//! and when the view is activated.
Standard_EXPORT void UpdateLights() ; //! Updates the planes when the associated window is defined
//! and when the view is activated.
Standard_EXPORT void UpdatePlanes() ; //! Updates the associated c structure before a call to the
//! graphic library.
Standard_EXPORT void UpdateView() ; //! Returns an index != 0 if the structure
//! have the same owner than another structure in the
//! sequence of the computed structures.
Standard_EXPORT Standard_Integer HaveTheSameOwner(const Handle(Graphic3d_Structure)& AStructure) const; Graphic3d_CView MyCView; Visual3d_ContextView MyContext; Visual3d_ViewMapping MyViewMapping; Visual3d_ViewMapping MyViewMappingReset; Visual3d_ViewOrientation MyViewOrientation; Visual3d_ViewOrientation MyViewOrientationReset; Handle_Aspect_Window MyWindow; TColStd_Array2OfReal MyTransformation; TColStd_Array2OfReal MyMatrixOfMapping; TColStd_Array2OfReal MyMatrixOfOrientation; Graphic3d_SequenceOfStructure MyTOCOMPUTESequence; Graphic3d_SequenceOfStructure MyCOMPUTEDSequence; Handle_Graphic3d_GraphicDriver MyGraphicDriver; Aspect_Background MyBackground; Aspect_GradientBackground MyGradientBackground; Graphic3d_MapOfStructure MyDisplayedStructure; Visual3d_ViewManagerPtr MyPtrViewManager; Graphic3d_CBitFields8 MyCBitFields; Graphic3d_CGraduatedTrihedron MyGTrihedron; }; // other Inline functions and methods (like "C++: function call" methods) #endif