|
Open CASCADE Technology
6.7.1
|
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:
More...
#include <Visual3d_View.hxx>

Public Member Functions | |
| Visual3d_View (const Handle< Visual3d_ViewManager > &AManager) | |
| Creates a view in the viewer <AManager> with a default orientation and a default mapping. More... | |
| 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>. More... | |
| void | Activate () |
Activates the view <me>. <br> Map the associated window on the screen and <br> post the view in this window. <br> Category: Methods to modify the class definition | |
| void | Deactivate () |
Deactivates the view <me>. <br> Unmap the associated window on the screen and <br> unpost the view in this window. <br> Category: Methods to modify the class definition | |
| virtual void | Destroy () |
| Deletes and erases the view <me>. More... | |
| ~Visual3d_View () | |
| void | Redraw () |
| Updates screen in all cases. More... | |
| void | Redraw (const Standard_Integer x, const Standard_Integer y, const Standard_Integer width, const Standard_Integer height) |
Updates screen area in all cases. <br> area is given by his xy min corner and size in pixel coordinates | |
| void | Redraw (const Handle< Visual3d_Layer > &AnUnderLayer, const Handle< Visual3d_Layer > &AnOverLayer) |
| Updates screen in all cases. More... | |
| 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. <br> area is given by his xy min corner and size in pixel coordinates | |
| void | Remove () |
Deletes and erases the view <me>. <br> Warning: No more graphic operations in <me> after this call. | |
| void | Resized () |
Updates the view <me> after the modification <br> of the associated window. <br> Category: Methods to modify the class definition | |
| void | SetBackground (const Aspect_Background &ABack) |
Modifies the default window background. <br> Category: Methods to modify the class definition | |
| 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. More... | |
| 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. More... | |
| void | SetGradientBackground (const Aspect_GradientBackground &ABack, const Standard_Boolean update) |
Modifies the gradient window background. <br> Category: Methods to modify the class definition | |
| void | SetBgGradientStyle (const Aspect_GradientFillMethod FillStyle, const Standard_Boolean update) |
| Category: Methods to modify the class definition Warning: Raises ViewDefinitionError if the associated window isn't defined. More... | |
| void | SetBackFacingModel (const Visual3d_TypeOfBackfacingModel aModel) |
| Manages display of the back faces More... | |
| Visual3d_TypeOfBackfacingModel | BackFacingModel () const |
| Returns current state of the back faces display More... | |
| void | SetContext (const Visual3d_ContextView &CTX) |
| Sets the context <CTX> in the view <me>. More... | |
| void | SetTransform (const TColStd_Array2OfReal &AMatrix) |
Sets the transformation matrix that is applied <br>
to <MyViewOrientation> field of the view <me>. <br>
| |
| void | SetViewMapping (const Visual3d_ViewMapping &VM) |
| Modifies the mapping of the view <me>. More... | |
| void | SetViewMappingDefault () |
| Saves the current mapping which will be the reference value for the reset of the mapping done by the ViewmappingReset method. More... | |
| void | SetViewOrientation (const Visual3d_ViewOrientation &VO) |
| Modifies the orientation of <me>. More... | |
| void | SetViewOrientationDefault () |
| Saves the current orientation which will be the reference value for the reset of the orientation done by the ViewOrientationReset method. More... | |
| void | SetWindow (const Handle< Aspect_Window > &AWindow) |
Associates the window <AWindow> to the view <me>. <br> No new association if the window is already defined. <br> Category: Methods to modify the class definition | |
| 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> <br>
to the view <me>. <br>
If <AContext> is not NULL the graphic context is used <br>
directly to draw something in this view. <br>
Otherwise an internal context is created. <br>
If <ADisplayCB> is not NULL then a user display CB is <br>
call at the end of the OCC graphic traversal and just <br>
before the swap of buffers. The <aClientData> is pass <br>
to this call back. <br>
No new association if the window is already defined. <br>
Category: Methods to modify the class definition | |
| void | Update () |
| Updates screen in function of modifications of the structures. More... | |
| void | Update (const Handle< Visual3d_Layer > &AnUnderLayer, const Handle< Visual3d_Layer > &AnOverLayer) |
| Updates screen in function of modifications of the structures. More... | |
| void | ViewMappingReset () |
| Sets the value of the mapping to be the same as the mapping saved by the SetViewMappingDefaut method. More... | |
| void | ViewOrientationReset () |
| Sets the value of the orientation to be the same as the orientation saved by the SetViewOrientationDefaut method. 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 | 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 More... | |
| 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 More... | |
| void | TriedronErase () |
| Erases the Triedron. More... | |
| void | TriedronEcho (const Aspect_TypeOfTriedronEcho AType=Aspect_TOTE_NONE) |
| Highlights the echo zone of the Triedron. More... | |
| 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, Font_FontAspect &styleOfNames, Standard_Integer &sizeOfNames, TCollection_AsciiString &fontOfValues, Font_FontAspect &styleOfValues, Standard_Integer &sizeOfValues) const |
| Returns data of a graduated trihedron if displayed (return value is True) More... | |
| 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 Font_FontAspect styleOfNames, const Standard_Integer sizeOfNames, const TCollection_AsciiString &fontOfValues, const Font_FontAspect styleOfValues, const Standard_Integer sizeOfValues) |
| Displays a graduated trihedron. More... | |
| void | GraduatedTrihedronErase () |
| Erases a graduated trihedron from the view. More... | |
| Aspect_Background | Background () const |
| Returns the value of the default window background. More... | |
| Aspect_GradientBackground | GradientBackground () const |
| Returns the value of the window background. More... | |
| Standard_Boolean | ContainsFacet () const |
| Returns Standard_True if one of the structures displayed in the view <me> contains Polygons, Triangles or Quadrangles. More... | |
| 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. More... | |
| const Visual3d_ContextView & | Context () const |
| Returns the current context of the view <me>. More... | |
| void | DisplayedStructures (Graphic3d_MapOfStructure &SG) const |
| Returns the set of structures displayed in the view <me>. More... | |
| Standard_Boolean | IsActive () const |
| Returns the activity flag of the view <me>. More... | |
| Standard_Boolean | IsDefined () const |
| Returns True if the window associated to the view <me> is defined. More... | |
| Standard_Boolean | IsDeleted () const |
| Returns Standard_True is the view <me> is deleted. <me> is deleted after the call Remove (me). More... | |
| 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>. More... | |
| 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>. More... | |
| 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>. More... | |
| 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>. More... | |
| Standard_Integer | NumberOfDisplayedStructures () const |
| Returns number of displayed structures in the view <me>. More... | |
| 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>. More... | |
| const TColStd_Array2OfReal & | Transform () const |
| Returns the transformation associated to the view <me> More... | |
| Visual3d_ViewMapping | ViewMapping () const |
| Returns the current mapping of the view <me>. More... | |
| Visual3d_ViewMapping | ViewMappingDefault () const |
| Returns the current reset mapping of the view <me>. More... | |
| Visual3d_ViewOrientation | ViewOrientation () const |
| Returns the current orientation of the view <me>. More... | |
| Visual3d_ViewOrientation | ViewOrientationDefault () const |
| Returns the current reset orientation of the view <me>. More... | |
| Handle_Aspect_Window | Window () const |
Returns the window associated to the view <me>. <br> Warning: Raises ViewDefinitionError if the associated | |
| Standard_Integer | LightLimit () const |
| Returns the MAX number of light associated to the view <me>. More... | |
| Standard_Integer | PlaneLimit () const |
Returns the MAX number of clipping planes <br> associated to the view <me>. | |
| Handle_Visual3d_ViewManager | ViewManager () const |
| Returns the view manager handle which manage this view More... | |
| void | ReCompute (const Handle< Graphic3d_Structure > &AStructure) |
| Computes the new presentation of the structure <AStructure> displayed in <me> with the type Graphic3d_TOS_COMPUTED. More... | |
| Standard_Integer | Identification () const |
| Returns the identification number of the view <me>. More... | |
| const TColStd_Array2OfReal & | MatrixOfMapping () |
Returns the current matrix of mapping of the view <me>. <br> Warning: Stores the current matrix of mapping. | |
| const TColStd_Array2OfReal & | MatrixOfOrientation () |
Returns the current matrix of orientation of the view <me>. <br> Warning: Stores the current matrix of orientation. | |
| Standard_Address | CView () const |
| Returns the c structure associated to <me>. More... | |
| const Handle_Graphic3d_GraphicDriver & | GraphicDriver () const |
| Returns the associated GraphicDriver. More... | |
| void | Plot (const Handle< Graphic3d_Plotter > &APlotter) const |
| Calls the method Plot for each Structure displayed in <me>. More... | |
| 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 all layers of the view to the printer. <br> <hPrnDC> : Pass the PrinterDeviceContext (HDC), | |
| 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 |
print the contents of the view to printer. <br> <hPrnDC> : Pass the PrinterDeviceContext (HDC), | |
| void | SetTransparency (const Standard_Boolean AFlag) |
| if <AFlag> is Standard_True then the transparency is managed in the view <me>. Default Standard_False More... | |
| Standard_Boolean | ZBufferIsActivated () const |
| Returns Standard_True if the ZBuffer is activated in the view <me> and Standard_False if not. More... | |
| 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 More... | |
| const Handle_Visual3d_Layer & | UnderLayer () const |
| Returns the underlay of the view <me>. More... | |
| const Handle_Visual3d_Layer & | OverLayer () const |
| Returns the underlay of the view <me>. More... | |
| void | EnableDepthTest (const Standard_Boolean enable) const |
| turns on/off opengl depth More... | |
| Standard_Boolean | IsDepthTestEnabled () const |
| returns current state of the opengl depth testing More... | |
| 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 More... | |
| Graphic3d_PtrFrameBuffer | FBOCreate (const Standard_Integer width, const Standard_Integer height) |
| Generate offscreen FBO in the graphic library More... | |
| void | FBORelease (Graphic3d_PtrFrameBuffer &fboPtr) |
| Remove offscreen FBO from the graphic library More... | |
| void | FBOGetDimensions (const Graphic3d_PtrFrameBuffer fboPtr, Standard_Integer &width, Standard_Integer &height, Standard_Integer &widthMax, Standard_Integer &heightMax) |
| Read offscreen FBO configuration. More... | |
| void | FBOChangeViewport (Graphic3d_PtrFrameBuffer &fboPtr, const Standard_Integer width, const Standard_Integer height) |
| Change offscreen FBO viewport. More... | |
| Standard_Boolean | BufferDump (Image_PixMap &theImage, const Graphic3d_BufferType &theBufferType) |
| Dump active rendering buffer into specified memory buffer. More... | |
| void | EnableGLLight (const Standard_Boolean enable) 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... | |
| Standard_Boolean | Export (const Standard_CString theFileName, const Graphic3d_ExportFormat theFormat, const Graphic3d_SortType theSortType=Graphic3d_ST_BSP_Tree, const Standard_Real thePrecision=0.005, const Standard_Address theProgressBarFunc=NULL, const Standard_Address theProgressObject=NULL) const |
| Export scene into the one of the Vector graphics formats (SVG, PS, PDF...). In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer). Notice however that results may differ a lot and do not contain some elements. More... | |
Public Member Functions inherited from Graphic3d_DataStructureManager | |
| ~Graphic3d_DataStructureManager () | |
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_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More... | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. More... | |
| virtual void | ShallowDump (Standard_OStream &) const |
| 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... | |
Additional Inherited Members | |
Protected Member Functions inherited from Graphic3d_DataStructureManager | |
| Graphic3d_DataStructureManager () | |
| Initializes the manager <me>. More... | |
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:
| Visual3d_View::Visual3d_View | ( | const Handle< Visual3d_ViewManager > & | AManager | ) |
Creates a view in the viewer <AManager> with a default
orientation and a default mapping.
| Visual3d_View::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>.
|
inline |
| void Visual3d_View::Activate | ( | ) |
Activates the view <me>. <br> Map the associated window on the screen and <br> post the view in this window. <br>
Category: Methods to modify the class definition
Warning: Raises ViewDefinitionError if the associated
window isn't defined.
| Visual3d_TypeOfBackfacingModel Visual3d_View::BackFacingModel | ( | ) | const |
Returns current state of the back faces display
| Aspect_Background Visual3d_View::Background | ( | ) | const |
Returns the value of the default window background.
| Standard_Boolean Visual3d_View::BufferDump | ( | Image_PixMap & | theImage, |
| const Graphic3d_BufferType & | theBufferType | ||
| ) |
Dump active rendering buffer into specified memory buffer.
| Standard_Boolean Visual3d_View::ComputedMode | ( | ) | const |
Returns the computed HLR mode state
| Standard_Boolean Visual3d_View::ContainsFacet | ( | ) | const |
Returns Standard_True if one of the structures
displayed in the view <me> contains Polygons,
Triangles or Quadrangles.
| Standard_Boolean Visual3d_View::ContainsFacet | ( | const Graphic3d_MapOfStructure & | ASet | ) | const |
Returns Standard_True if one of the structures
in the set <ASet> contains Polygons, Triangles
or Quadrangles.
| const Visual3d_ContextView& Visual3d_View::Context | ( | ) | const |
Returns the current context of the view <me>.
| Standard_Address Visual3d_View::CView | ( | ) | const |
Returns the c structure associated to <me>.
| void Visual3d_View::Deactivate | ( | ) |
Deactivates the view <me>. <br> Unmap the associated window on the screen and <br> unpost the view in this window. <br>
Category: Methods to modify the class definition
Warning: Raises ViewDefinitionError if the associated
window isn't defined.
|
virtual |
Deletes and erases the view <me>.
Reimplemented from Graphic3d_DataStructureManager.
| void Visual3d_View::DisplayedStructures | ( | Graphic3d_MapOfStructure & | SG | ) | const |
Returns the set of structures displayed in
the view <me>.
| void Visual3d_View::EnableDepthTest | ( | const Standard_Boolean | enable | ) | const |
turns on/off opengl depth
| void Visual3d_View::EnableGLLight | ( | const Standard_Boolean | enable | ) | const |
turns on/off opengl lighting, currently used in triedron displaying
| Standard_Boolean Visual3d_View::Export | ( | const Standard_CString | theFileName, |
| const Graphic3d_ExportFormat | theFormat, | ||
| const Graphic3d_SortType | theSortType = Graphic3d_ST_BSP_Tree, |
||
| const Standard_Real | thePrecision = 0.005, |
||
| const Standard_Address | theProgressBarFunc = NULL, |
||
| const Standard_Address | theProgressObject = NULL |
||
| ) | const |
Export scene into the one of the Vector graphics formats (SVG, PS, PDF...).
In contrast to Bitmaps, Vector graphics is scalable (so you may got quality benefits on printing to laser printer).
Notice however that results may differ a lot and do not contain some elements.
| void Visual3d_View::FBOChangeViewport | ( | Graphic3d_PtrFrameBuffer & | fboPtr, |
| const Standard_Integer | width, | ||
| const Standard_Integer | height | ||
| ) |
Change offscreen FBO viewport.
| Graphic3d_PtrFrameBuffer Visual3d_View::FBOCreate | ( | const Standard_Integer | width, |
| const Standard_Integer | height | ||
| ) |
Generate offscreen FBO in the graphic library
| void Visual3d_View::FBOGetDimensions | ( | const Graphic3d_PtrFrameBuffer | fboPtr, |
| Standard_Integer & | width, | ||
| Standard_Integer & | height, | ||
| Standard_Integer & | widthMax, | ||
| Standard_Integer & | heightMax | ||
| ) |
Read offscreen FBO configuration.
| void Visual3d_View::FBORelease | ( | Graphic3d_PtrFrameBuffer & | fboPtr | ) |
Remove offscreen FBO from the graphic library
Returns data of a graduated trihedron if displayed (return value is True)
| Aspect_GradientBackground Visual3d_View::GradientBackground | ( | ) | const |
Returns the value of the window background.
| void Visual3d_View::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 Font_FontAspect | styleOfNames, | ||
| const Standard_Integer | sizeOfNames, | ||
| const TCollection_AsciiString & | fontOfValues, | ||
| const Font_FontAspect | styleOfValues, | ||
| const Standard_Integer | sizeOfValues | ||
| ) |
Displays a graduated trihedron.
| void Visual3d_View::GraduatedTrihedronErase | ( | ) |
Erases a graduated trihedron from the view.
| const Handle_Graphic3d_GraphicDriver& Visual3d_View::GraphicDriver | ( | ) | const |
Returns the associated GraphicDriver.
| Standard_Integer Visual3d_View::Identification | ( | ) | const |
Returns the identification number of the view <me>.
| Standard_Boolean Visual3d_View::IsActive | ( | ) | const |
Returns the activity flag of the view <me>.
| Standard_Boolean Visual3d_View::IsDefined | ( | ) | const |
Returns True if the window associated to the view
<me> is defined.
| Standard_Boolean Visual3d_View::IsDeleted | ( | ) | const |
Returns Standard_True is the view <me> is deleted.
<me> is deleted after the call Remove (me).
| Standard_Boolean Visual3d_View::IsDepthTestEnabled | ( | ) | const |
returns current state of the opengl depth testing
| Standard_Boolean Visual3d_View::IsGLLightEnabled | ( | ) | const |
returns the current state of the gl lighting
currently used in triedron displaying
| Standard_Integer Visual3d_View::LightLimit | ( | ) | const |
Returns the MAX number of light associated to the view <me>.
| const TColStd_Array2OfReal& Visual3d_View::MatrixOfMapping | ( | ) |
Returns the current matrix of mapping of the view <me>. <br>
Warning: Stores the current matrix of mapping.
| const TColStd_Array2OfReal& Visual3d_View::MatrixOfOrientation | ( | ) |
Returns the current matrix of orientation of the view <me>. <br>
Warning: Stores the current matrix of orientation.
| void Visual3d_View::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>.
| void Visual3d_View::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>.
| void Visual3d_View::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>.
| void Visual3d_View::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_Integer Visual3d_View::NumberOfDisplayedStructures | ( | ) | const |
Returns number of displayed structures in
the view <me>.
| const Handle_Visual3d_Layer& Visual3d_View::OverLayer | ( | ) | const |
Returns the underlay of the view <me>.
| Standard_Integer Visual3d_View::PlaneLimit | ( | ) | const |
Returns the MAX number of clipping planes <br>
associated to the view <me>.
| void Visual3d_View::Plot | ( | const Handle< Graphic3d_Plotter > & | APlotter | ) | const |
Calls the method Plot for each Structure
displayed in <me>.
| Standard_Boolean Visual3d_View::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 all layers of the view to the printer. <br>
<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.
<printAlgo>: Select print algorithm: stretch, tile.
<theScaleFactor>: 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_Boolean Visual3d_View::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 |
print the contents of the view to printer. <br>
<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.
<printAlgo>: Select print algorithm: stretch, tile.
<theScaleFactor>: 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.
| void Visual3d_View::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>.
| void Visual3d_View::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
| void Visual3d_View::ReCompute | ( | const Handle< Graphic3d_Structure > & | AStructure | ) |
Computes the new presentation of the
structure <AStructure> displayed in <me>
with the type Graphic3d_TOS_COMPUTED.
| void Visual3d_View::Redraw | ( | ) |
Updates screen in all cases.
| void Visual3d_View::Redraw | ( | const Standard_Integer | x, |
| const Standard_Integer | y, | ||
| const Standard_Integer | width, | ||
| const Standard_Integer | height | ||
| ) |
Updates screen area in all cases. <br>
area is given by his xy min corner and size in pixel coordinates
| void Visual3d_View::Redraw | ( | const Handle< Visual3d_Layer > & | AnUnderLayer, |
| const Handle< Visual3d_Layer > & | AnOverLayer | ||
| ) |
Updates screen in all cases.
| void Visual3d_View::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. <br>
area is given by his xy min corner and size in pixel coordinates
| void Visual3d_View::Remove | ( | ) |
Deletes and erases the view <me>. <br>
Warning: No more graphic operations in <me> after this call.
| void Visual3d_View::Resized | ( | ) |
Updates the view <me> after the modification <br> of the associated window. <br>
Category: Methods to modify the class definition
Warning: Raises ViewDefinitionError if the associated
window isn't defined.
| void Visual3d_View::SetBackFacingModel | ( | const Visual3d_TypeOfBackfacingModel | aModel | ) |
Manages display of the back faces
| void Visual3d_View::SetBackground | ( | const Aspect_Background & | ABack | ) |
Modifies the default window background. <br>
Category: Methods to modify the class definition
Warning: Raises ViewDefinitionError if the associated
window isn't defined.
| void Visual3d_View::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.
| void Visual3d_View::SetBgGradientStyle | ( | const Aspect_GradientFillMethod | FillStyle, |
| const Standard_Boolean | update | ||
| ) |
Category: Methods to modify the class definition
Warning: Raises ViewDefinitionError if the associated
window isn't defined.
| void Visual3d_View::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.
| void Visual3d_View::SetComputedMode | ( | const Standard_Boolean | aMode | ) |
Switches computed HLR mode in the view
| void Visual3d_View::SetContext | ( | const Visual3d_ContextView & | CTX | ) |
Sets the context <CTX> in the view <me>.
| void Visual3d_View::SetGradientBackground | ( | const Aspect_GradientBackground & | ABack, |
| const Standard_Boolean | update | ||
| ) |
Modifies the gradient window background. <br>
Category: Methods to modify the class definition
Warning: Raises ViewDefinitionError if the associated
window isn't defined.
| void Visual3d_View::SetTransform | ( | const TColStd_Array2OfReal & | AMatrix | ) |
Sets the transformation matrix that is applied <br>
to <MyViewOrientation> field of the view <me>. <br>
<AMatrix> is defined as a 4*4 real matrix.
----------------—
| a11 a12 a13 t1 |
| a21 a22 a23 t2 |
| a31 a32 a33 t3 |
| 0 0 0 1 |
----------------—
Category: Methods to modify the class definition
Warning: Raises TransformError if the matrix isn't a 4x4 matrix.
| void Visual3d_View::SetTransparency | ( | const Standard_Boolean | AFlag | ) |
if <AFlag> is Standard_True then the transparency
is managed in the view <me>.
Default Standard_False
| void Visual3d_View::SetViewMapping | ( | const Visual3d_ViewMapping & | VM | ) |
Modifies the mapping of the view <me>.
| void Visual3d_View::SetViewMappingDefault | ( | ) |
Saves the current mapping which will be the
reference value for the reset of the mapping
done by the ViewmappingReset method.
| void Visual3d_View::SetViewOrientation | ( | const Visual3d_ViewOrientation & | VO | ) |
Modifies the orientation of <me>.
| void Visual3d_View::SetViewOrientationDefault | ( | ) |
Saves the current orientation which will be the
reference value for the reset of the orientation
done by the ViewOrientationReset method.
| void Visual3d_View::SetWindow | ( | const Handle< Aspect_Window > & | AWindow | ) |
Associates the window <AWindow> to the view <me>. <br> No new association if the window is already defined. <br>
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.
Programming example :
An example when we have 1 view and 1 window
----------------------------------------—
Handle(Aspect_DisplayConnection) aDisplayConnection;
// Display connection initialization only needed on Linux platform
// and on Mac OS X, in cases when you use Xlib for windows drawing.
aDisplayConnection = new Aspect_DisplayConnection();
// Graphic driver initialization
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
Graphic3d::InitGraphicDriver (aDisplayConnection);
// Define a view manager
Handle(Visual3d_ViewManager) aVisualManager = new Visual3d_ViewManager (aGraphicDriver);
// Define a view
Handle(Visual3d_View) aView = new Visual3d_View (aVisaulManager);
// Define a window
Handle(Xw_Window) aWindow = new Xw_Window
(aDisplayConnection, "Graphic View 1", 0.695, 0.695, 0.600, 0.600, Quantity_NOC_MATRAGRAY);
// Associate the view and the window
aView->SetWindow (aWindow);
// Map the window
aWindow->Map ();
// Activate the view
aView->Activate ();
| void Visual3d_View::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> <br>
to the view <me>. <br>
If <AContext> is not NULL the graphic context is used <br>
directly to draw something in this view. <br>
Otherwise an internal context is created. <br>
If <ADisplayCB> is not NULL then a user display CB is <br>
call at the end of the OCC graphic traversal and just <br>
before the swap of buffers. The <aClientData> is pass <br>
to this call back. <br>
No new association if the window is already defined. <br>
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.
| void Visual3d_View::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
| const TColStd_Array2OfReal& Visual3d_View::Transform | ( | ) | const |
Returns the transformation associated to the view <me>
| void Visual3d_View::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
| void Visual3d_View::TriedronEcho | ( | const Aspect_TypeOfTriedronEcho | AType = Aspect_TOTE_NONE | ) |
Highlights the echo zone of the Triedron.
| void Visual3d_View::TriedronErase | ( | ) |
Erases the Triedron.
| const Handle_Visual3d_Layer& Visual3d_View::UnderLayer | ( | ) | const |
Returns the underlay of the view <me>.
| void Visual3d_View::Update | ( | ) |
Updates screen in function of modifications of
the structures.
| void Visual3d_View::Update | ( | const Handle< Visual3d_Layer > & | AnUnderLayer, |
| const Handle< Visual3d_Layer > & | AnOverLayer | ||
| ) |
Updates screen in function of modifications of
the structures.
| Handle_Visual3d_ViewManager Visual3d_View::ViewManager | ( | ) | const |
Returns the view manager handle which manage this view
| Visual3d_ViewMapping Visual3d_View::ViewMapping | ( | ) | const |
Returns the current mapping of the view <me>.
| Visual3d_ViewMapping Visual3d_View::ViewMappingDefault | ( | ) | const |
Returns the current reset mapping of the view <me>.
| void Visual3d_View::ViewMappingReset | ( | ) |
Sets the value of the mapping to be the same as
the mapping saved by the SetViewMappingDefaut method.
| Visual3d_ViewOrientation Visual3d_View::ViewOrientation | ( | ) | const |
Returns the current orientation of the view <me>.
| Visual3d_ViewOrientation Visual3d_View::ViewOrientationDefault | ( | ) | const |
Returns the current reset orientation of the view <me>.
| void Visual3d_View::ViewOrientationReset | ( | ) |
Sets the value of the orientation to be the same as the
orientation saved by the SetViewOrientationDefaut method.
| Handle_Aspect_Window Visual3d_View::Window | ( | ) | const |
Returns the window associated to the view <me>. <br>
Warning: Raises ViewDefinitionError if the associated
window isn't defined.
| Standard_Boolean Visual3d_View::ZBufferIsActivated | ( | ) | const |
Returns Standard_True if the ZBuffer is activated
in the view <me> and Standard_False if not.
| void Visual3d_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.
Initializes Colors of X Y and axis
Scale ratio defines decreasing of trihedron size when
its position is out of a View
1.8.5