#include <Visual3d_View.hxx>
Inheritance diagram for Visual3d_View:
Public Member Functions | |
Standard_EXPORT | Visual3d_View (const Handle(Visual3d_ViewManager)&AManager) |
Creates a view in the viewer <amanager> with a default orientation and a default mapping. . | |
Standard_EXPORT | Visual3d_View (const Handle(Visual3d_ViewManager)&AManager, const Visual3d_ViewOrientation &VO, const Visual3d_ViewMapping &VM, const Visual3d_ContextView &CTX) |
Creates a view in the viewer <amanager> with the orientation <vo>, the mapping <vm>, and the context<CTX>. . | |
Standard_EXPORT void | Activate () |
Activates the view <me>. 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 | Deactivate () |
Deactivates the view <me>. 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. . | |
virtual Standard_EXPORT void | Destroy () |
Deletes and erases the view <me>. . | |
~Visual3d_View () | |
Standard_EXPORT void | Redraw () |
Updates screen in all cases. . | |
Standard_EXPORT void | Redraw (const Standard_Integer x, const Standard_Integer y, const Standard_Integer width, const Standard_Integer height) |
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) |
Updates screen in all cases. . | |
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) |
Updates screen area in all cases. area is given by his xy min corner and size in pixel coordinates . | |
Standard_EXPORT void | Remove () |
Deletes and erases the view <me>. Warning: No more graphic operations in <me> after this call. . | |
Standard_EXPORT void | Resized () |
Updates the view <me> 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 | SetBackground (const Aspect_Background &ABack) |
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 | 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) |
Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn't defined. . | |
Standard_EXPORT void | SetBackFacingModel (const Visual3d_TypeOfBackfacingModel aModel) |
Manages display of the back faces . | |
Standard_EXPORT Visual3d_TypeOfBackfacingModel | BackFacingModel () const |
Returns current state of the back faces display . | |
Standard_EXPORT void | SetContext (const Visual3d_ContextView &CTX) |
Sets the context <ctx> in the view <me>. . | |
Standard_EXPORT void | SetTransform (const TColStd_Array2OfReal &AMatrix) |
Sets the transformation matrix that is applied to <myvieworientation> field of the view <me>. . | |
Standard_EXPORT void | SetViewMapping (const Visual3d_ViewMapping &VM) |
Modifies the mapping of the view <me>. . | |
Standard_EXPORT void | SetViewMappingDefault () |
Saves the current mapping which will be the reference value for the reset of the mapping done by the ViewmappingReset method. . | |
Standard_EXPORT void | SetViewOrientation (const Visual3d_ViewOrientation &VO) |
Modifies the orientation of <me>. . | |
Standard_EXPORT void | SetViewOrientationDefault () |
Saves the current orientation which will be the reference value for the reset of the orientation done by the ViewOrientationReset method. . | |
Standard_EXPORT void | SetWindow (const Handle(Aspect_Window)&AWindow) |
Associates the window <awindow> to the view <me>. 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) |
Associates the window <awindow> and context <acontext> to the view <me>. If <acontext> is not NULL the graphic context is used directly to draw something in this view. Otherwise an internal 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. 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 | Update () |
Updates screen in function of modifications of the structures. . | |
Standard_EXPORT void | Update (const Handle(Visual3d_Layer)&AnUnderLayer, const Handle(Visual3d_Layer)&AnOverLayer) |
Updates screen in function of modifications of the structures. . | |
Standard_EXPORT void | ViewMappingReset () |
Sets the value of the mapping to be the same as the mapping saved by the SetViewMappingDefaut method. . | |
Standard_EXPORT void | ViewOrientationReset () |
Sets the value of the orientation to be the same as the orientation saved by the SetViewOrientationDefaut method. . | |
Standard_EXPORT void | SetAnimationModeOn (const Standard_Boolean degenerate=Standard_False) |
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 | SetAnimationModeOff () |
Deactivates the animation mode. . | |
Standard_EXPORT Standard_Boolean | AnimationModeIsOn () const |
Returns the activity of the animation mode. . | |
Standard_EXPORT Standard_Boolean | DegenerateModeIsOn () const |
Returns the activity of the degenerate mode. . | |
Standard_EXPORT void | SetComputedMode (const Standard_Boolean aMode) |
Switches computed HLR mode in the view . | |
Standard_EXPORT Standard_Boolean | ComputedMode () const |
Returns the computed HLR mode state . | |
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) |
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 | 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) |
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 | TriedronErase () |
Erases the Triedron. . | |
Standard_EXPORT void | TriedronEcho (const Aspect_TypeOfTriedronEcho AType=Aspect_TOTE_NONE) |
Highlights the echo zone of the Triedron. . | |
Standard_EXPORT Aspect_Background | Background () const |
Returns the value of the default window background. . | |
Standard_EXPORT Standard_Boolean | ContainsFacet () const |
Returns Standard_True if one of the structures displayed in the view <me> contains Polygons, Triangles or Quadrangles. . | |
Standard_EXPORT Standard_Boolean | ContainsFacet (const Graphic3d_MapOfStructure &ASet) const |
Returns Standard_True if one of the structures in the set <aset> contains Polygons, Triangles or Quadrangles. . | |
Standard_EXPORT const Visual3d_ContextView & | Context () const |
Returns the current context of the view <me>. . | |
Standard_EXPORT void | DisplayedStructures (Graphic3d_MapOfStructure &SG) const |
Returns the set of structures displayed in the view <me>. . | |
Standard_EXPORT Standard_Boolean | IsActive () const |
Returns the activity flag of the view <me>. . | |
Standard_EXPORT Standard_Boolean | IsDefined () const |
Returns True if the window associated to the view <me> is defined. . | |
Standard_EXPORT Standard_Boolean | IsDeleted () const |
Returns Standard_True is the view <me> is deleted. <me> is deleted after the call Remove (me). . | |
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 displayed in the view <me>. . | |
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 boundary box of all structures in the set <aset>. . | |
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 displayed in the view <me>. . | |
Standard_EXPORT void | MinMaxValues (const Graphic3d_MapOfStructure &ASet, 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 <aset>. . | |
Standard_EXPORT Standard_Integer | NumberOfDisplayedStructures () const |
Returns number of displayed structures in the view <me>. . | |
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 coordinates of the projection of the 3d coordinates <ax>, <ay>, <az>. . | |
Standard_EXPORT const TColStd_Array2OfReal & | Transform () const |
Returns the transformation associated to the view <me> . | |
Standard_EXPORT Visual3d_ViewMapping | ViewMapping () const |
Returns the current mapping of the view <me>. . | |
Standard_EXPORT Visual3d_ViewMapping | ViewMappingDefault () const |
Returns the current reset mapping of the view <me>. . | |
Standard_EXPORT Visual3d_ViewOrientation | ViewOrientation () const |
Returns the current orientation of the view <me>. . | |
Standard_EXPORT Visual3d_ViewOrientation | ViewOrientationDefault () const |
Returns the current reset orientation of the view <me>. . | |
Standard_EXPORT Handle_Aspect_Window | Window () const |
Returns the window associated to the view <me>. Warning: Raises ViewDefinitionError if the associated window isn't defined. . | |
Standard_EXPORT Standard_Integer | LightLimit () const |
Returns the MAX number of light associated to the view <me>. . | |
Standard_EXPORT Standard_Integer | PlaneLimit () const |
Returns the MAX number of clipping planes associated to the view <me>. . | |
Standard_EXPORT Handle_Visual3d_ViewManager | ViewManager () const |
Returns the view manager handle which manage this view . | |
Standard_EXPORT void | ReCompute (const Handle(Graphic3d_Structure)&AStructure) |
Computes the new presentation of the structure <astructure> displayed in <me> with the type Graphic3d_TOS_COMPUTED. . | |
Standard_EXPORT void | Exploration () const |
Prints informations about the view <me>. . | |
Standard_EXPORT Standard_Integer | Identification () const |
Returns the identification number of the view <me>. . | |
Standard_EXPORT const TColStd_Array2OfReal & | MatrixOfMapping () |
Returns the current matrix of mapping of the view <me>. Warning: Stores the current matrix of mapping. . | |
Standard_EXPORT const TColStd_Array2OfReal & | MatrixOfOrientation () |
Returns the current matrix of orientation of the view <me>. Warning: Stores the current matrix of orientation. . | |
Standard_EXPORT Standard_Address | CView () const |
Returns the c structure associated to <me>. . | |
Standard_EXPORT Handle_Aspect_GraphicDriver | GraphicDriver () const |
Returns the associated GraphicDriver. . | |
Standard_EXPORT void | Plot (const Handle(Graphic3d_Plotter)&APlotter) const |
Calls the method Plot for each Structure displayed in <me>. . | |
Standard_EXPORT void | Print (const Handle(Visual3d_Layer)&AnUnderLayer, const Handle(Visual3d_Layer)&AnOverLayer, const Aspect_Handle hPrnDC, const Standard_Boolean showBackground, const Standard_CString filename) const |
print the contents of all layers of the view to the printer. <hprndc> : Pass the PrinterDeviceContext (HDC), <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. Warning: Works only under Windows. | |
Standard_EXPORT void | Print (const Aspect_Handle hPrnDC, const Standard_Boolean showBackground, const Standard_CString filename) const |
print the contents of the view to printer. <hprndc> : Pass the PrinterDeviceContext (HDC), <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. Warning: Works only under Windows. | |
Standard_EXPORT void | SetTransparency (const Standard_Boolean AFlag) |
if <aflag> is Standard_True then the transparency is managed in the view <me>. Default Standard_False | |
Standard_EXPORT Standard_Boolean | ZBufferIsActivated () const |
Returns Standard_True if the ZBuffer is activated in the view <me> and Standard_False if not. . | |
Standard_EXPORT void | SetZBufferActivity (const Standard_Integer AnActivity) |
Activates the ZBuffer if the integer <anactivity> is equal to 1. Deactivates the ZBuffer if the integer <anactivity> is equal to 0. If the integer <anactivity> 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 const Handle_Visual3d_Layer & | UnderLayer () const |
Returns the underlay of the view <me>. . | |
Standard_EXPORT const Handle_Visual3d_Layer & | OverLayer () const |
Returns the underlay of the view <me>. . | |
Standard_EXPORT void | EnableDepthTest (const Standard_Boolean enable) const |
turns on/off opengl depth | |
Standard_EXPORT Standard_Boolean | IsDepthTestEnabled () const |
returns current state of the opengl depth testing | |
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 |
Reads depths of shown pixels of the given rectangle . | |
Standard_EXPORT void | EnableGLLight (const Standard_Boolean enable) const |
turns on/off opengl lighting, currently used in triedron displaying | |
Standard_EXPORT Standard_Boolean | IsGLLightEnabled () const |
returns the current state of the gl lighting currently used in triedron displaying | |
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 |
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const |
Private Member Functions | |
Standard_EXPORT void | SetDegenerateModeOn () |
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 | SetDegenerateModeOff () |
Deactivates the degenerate mode. . | |
Standard_EXPORT Visual3d_TypeOfAnswer | AcceptDisplay (const Handle(Graphic3d_Structure)&AStructure) const |
Is it possible to display the structure <astructure> in the view <me> ? . | |
Standard_EXPORT void | Compute () |
Computes the new presentation of the Structures displayed in <me> with the type Graphic3d_TOS_COMPUTED. . | |
Standard_EXPORT void | ChangeDisplayPriority (const Handle(Graphic3d_Structure)&AStructure, const Standard_Integer OldPriority, const Standard_Integer NewPriority) |
Changes the display priority of the structure <astructure>. . | |
Standard_EXPORT void | Clear (const Handle(Graphic3d_Structure)&AStructure, const Standard_Boolean WithDestruction) |
Clears the structure <astructure> to the view <me>. . | |
Standard_EXPORT void | Connect (const Handle(Graphic3d_Structure)&AMother, const Handle(Graphic3d_Structure)&ADaughter) |
Connects the structures <amother> and <adaughter>. . | |
Standard_EXPORT void | Disconnect (const Handle(Graphic3d_Structure)&AMother, const Handle(Graphic3d_Structure)&ADaughter) |
Disconnects the structures <amother> and <adaughter>. . | |
Standard_EXPORT void | Display (const Handle(Graphic3d_Structure)&AStructure) |
Display the structure <astructure> to the view <me>. . | |
Standard_EXPORT void | Display (const Handle(Graphic3d_Structure)&AStructure, const Aspect_TypeOfUpdate AnUpdateMode) |
Display the structure <astructure> to the view <me>. . | |
Standard_EXPORT void | Erase (const Handle(Graphic3d_Structure)&AStructure) |
Erases the structure <astructure> from the view <me>. . | |
Standard_EXPORT void | Erase (const Handle(Graphic3d_Structure)&AStructure, const Aspect_TypeOfUpdate AnUpdateMode) |
Erases the structure <astructure> from the view <me>. . | |
Standard_EXPORT void | Highlight (const Handle(Graphic3d_Structure)&AStructure, const Aspect_TypeOfHighlightMethod AMethod) |
Highlights the structure <astructure> in the view <me>. . | |
Standard_EXPORT void | SetTransform (const Handle(Graphic3d_Structure)&AStructure, const TColStd_Array2OfReal &ATrsf) |
Transforms the structure <astructure> in the view <me>. . | |
Standard_EXPORT void | UnHighlight (const Handle(Graphic3d_Structure)&AStructure) |
Suppress the highlighting on the structure <astructure> in the view <me>. . | |
Standard_EXPORT Standard_Integer | IsComputed (const Handle(Graphic3d_Structure)&AStructure) const |
Returns an index != 0 if the structure <astructure> have another structure computed for the view <me>. . | |
Standard_EXPORT Standard_Boolean | IsDisplayed (const Handle(Graphic3d_Structure)&AStructure) const |
Returns true if the structure <astructure> is displayed in the view <me>. . | |
Standard_EXPORT void | SetRatio () |
Modifies the aspect ratio of the view <me> when the associated window is defined or resized. . | |
Standard_EXPORT void | UpdateLights () |
Updates the lights when the associated window is defined and when the view is activated. . | |
Standard_EXPORT void | UpdatePlanes () |
Updates the planes when the associated window is defined and when the view is activated. . | |
Standard_EXPORT void | UpdateView () |
Updates the associated c structure before a call to the graphic library. . | |
Standard_EXPORT Standard_Integer | HaveTheSameOwner (const Handle(Graphic3d_Structure)&AStructure) const |
Returns an index != 0 if the structure <astructure> have the same owner than another structure in the sequence of the computed structures. . | |
Private Attributes | |
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 |
Graphic3d_MapOfStructure | MyDisplayedStructure |
Visual3d_ViewManagerPtr | MyPtrViewManager |
Graphic3d_CBitFields8 | MyCBitFields |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from Graphic3d_DataStructureManager. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from Graphic3d_DataStructureManager. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|