+-- Created on: 1992-01-15
+-- Created by: GG
+-- Copyright (c) 1992-1999 Matra Datavision
+-- Copyright (c) 1999-2012 OPEN CASCADE SAS
--
--- File: V3d_View.cdl
--- Created: Wed Jan 15 14:47:42 1992
--- Author: GG
+-- The content of this file is subject to the Open CASCADE Technology Public
+-- License Version 6.5 (the "License"). You may not use the content of this file
+-- except in compliance with the License. Please obtain a copy of the License
+-- at http://www.opencascade.org and read it completely before using this file.
+--
+-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+--
+-- The Original Code and all software distributed under the License is
+-- distributed on an "AS IS" basis, without warranty of any kind, and the
+-- Initial Developer hereby disclaims all such warranties, including without
+-- limitation, any warranties of merchantability, fitness for a particular
+-- purpose or non-infringement. Please see the License for the specific terms
+-- and conditions governing the rights and limitations under the License.
+
-- Modified: FMN - 24/12/97 -> Suppression GEOMLITE
-- CQO - 24/12/97 -> BUC50037
-- stt:25-02-98; S3558: ajout IfManageStandardEvent
-- -> Add ConvertToGrid() methods,
-- the Compute() internal method become private.
-- -> Add SetProjModel() method.
--- EUG - 25/01/00 : G003
--- -> Add methods SetAnimationMode() and
--- AnimationMode()
--- -> Add methods SetComputedMode() and
--- ComputedMode()
--- Warning : SetDegenerateModeOn() and Off()
--- become obsolete.
--- -> Add methods SetBackFacingModel() and
--- BackFacingModel()
-- VKH - 15/11/99 : G004
-- -> Add method Dump()
-- GG - IMP210200
-- -> Add Transparency() method
---
-- THA - 17/08/00 Thomas HARTL <t-hartl@muenchen.matra-dtv.fr>
-- -> Add Print method (works only under Windows).
---
-- GG - IMP231100
-- -> Add IsActiveLight() & IsActivePlane() methods
-- SZV - IMP100701
-- -> Add ToPixMap() method
-- GG - RIC120302 Add NEW SetWindow method.
---
-- SAV - 22/10/01
-- -> Add EnableDepthTest() & IsDepthTestEnabled().
-- VSV - 28/05/02: ZBUFFER mode of Trihedron
---
-- SAV - 23/12/02 -> Added methods to set background image
---
-- NKV - 23/07/07 -> Define custom projection and model view matrixes
---
-- NKV - 08/02/07 -> Add ConvertWithProj() method
---
----Copyright: Matra Datavision 1992
---
-deferred class View from V3d
+class View from V3d inherits TShared from MMgt
---Purpose: Defines the application object VIEW for the
-- VIEWER application.
-- View->Move(10.,20.,0.,True) (Starting motion)
-- View->Move(15.,-5.,0.,False) (Next motion)
-
-inherits
-
- View from Viewer
-
uses
-- S3892
Plotter from Graphic3d,
Window from Aspect,
PixMap from Image,
- TypeOfImage from Image,
+ BufferType from Graphic3d,
Background from Aspect,
GradientBackground from Aspect,
- PlotterDriver from PlotMgt,
TypeOfColor from Quantity,
NameOfColor from Quantity,
Color from Quantity,
TransientManager from Visual3d,
TypeOfTriedronEcho from Aspect,
TypeOfTriedronPosition from Aspect,
- FormatOfSheetPaper from Aspect,
RenderingContext from Aspect,
GraphicCallbackProc from Aspect,
FillMethod from Aspect,
GradientFillMethod from Aspect,
- FontAspect from OSD
+ FontAspect from Font,
+ AsciiString from TCollection,
+ ExtendedString from TCollection,
+ PrintAlgo from Aspect
raises
- BadValue from Viewer, TypeMismatch from Standard,
+ BadValue from V3d, TypeMismatch from Standard,
MultiplyDefined from Standard,UnMapped from V3d
is
- Initialize ( VM : mutable Viewer; Type : TypeOfView from V3d = V3d_ORTHOGRAPHIC );
+ Create ( VM : mutable Viewer; Type : TypeOfView from V3d = V3d_ORTHOGRAPHIC );
---Purpose: Initialises the view.
- Initialize ( VM : mutable Viewer ; V : View from V3d; Type : TypeOfView from V3d = V3d_ORTHOGRAPHIC );
+ Create ( VM : mutable Viewer ; V : View from V3d; Type : TypeOfView from V3d = V3d_ORTHOGRAPHIC );
---Purpose: Initialises the view by copying.
--------------------------------------------------------
---Level: Public
---Purpose: Destroys the view.
- Update ( me ) is redefined static;
+ Update ( me ) is static;
---Level: Public
- ---Purpose: Updates the display of the view.
- -- Must be called to update the view
- -- when the update mode is deferred (WAIT) .
+ ---Purpose: Deprecated, Redraw() should be used instead.
Redraw ( me );
---Level: Public
---Level: Public
---Purpose: Defines the gradient background colours of the view
-- by supplying :
- -- the colour objects.
+ -- two colour objects,
+ -- and fill method (horizontal by default)
SetBgGradientColors ( me : mutable ;
Color1 : NameOfColor;
---Level: Public
---Purpose: Defines the gradient background colours of the view
-- by supplying :
- -- the colour names in the form Quantity_NOC_xxxx .
+ -- two colour names in the form Quantity_NOC_xxxx,
+ -- and fill method (horizontal by default)
- SetBgGradientStyle( me ;
+ SetBgGradientStyle( me : mutable ;
AMethod : GradientFillMethod from Aspect = Aspect_GFM_HOR;
update : Boolean from Standard = Standard_False);
---Level: Public
SetBackgroundImage( me : mutable; FileName : CString from Standard;
FillStyle : FillMethod from Aspect = Aspect_FM_CENTERED;
update : Boolean from Standard = Standard_False );
+ ---Level: Public
+ ---Purpose: Defines the background texture of the view
+ --- by supplying :
+ --- texture image file name,
+ --- and fill method (centered by default)
SetBgImageStyle( me : mutable; FillStyle : FillMethod from Aspect;
update : Boolean from Standard = Standard_False );
+ ---Level: Public
+ ---Purpose: Defines the textured background fill method of the view
SetAxis ( me : mutable; X,Y,Z : Coordinate ;
Vx,Vy,Vz : Parameter )
---Purpose: Definition of an axis from its origin and
-- its orientation .
-- This will be the current axis for rotations and movements.
- raises BadValue from Viewer;
- ---Purpose: Warning! raises BadValue from Viewer if the vector normal is NULL. .
+ raises BadValue from V3d;
+ ---Purpose: Warning! raises BadValue from V3d if the vector normal is NULL. .
SetShadingModel ( me : mutable; Model : TypeOfShadingModel );
---Level: Public
SetZClippingWidth ( me : mutable; Width : Length )
---Level: Public
---Purpose: Defines the thicknes around the medium clippling plane. .
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the thickness is <= 0
SetZClippingType ( me : mutable; Type : TypeOfZclipping );
SetZCueingWidth ( me : mutable; Width : Length )
---Level: Public
---Purpose: Defines the thickness around the medium plane.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If thickness is <= 0
SetZCueingOn ( me : mutable );
SetLightOn( me : mutable ; MyLight : Light from V3d )
---Level: Public
---Purpose: Activates MyLight in the view.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If No More Light can be activated in MyView .
SetLightOn( me : mutable )
---Level: Public
---Purpose: Activates all the lights defined in this view.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If No More Light can be activated in MyView .
SetLightOff( me : mutable ; MyLight : Light from V3d );
SetPlaneOn( me : mutable ; MyPlane : Plane from V3d )
---Level: Public
---Purpose: Activates the clipping plane in this view.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
---Purpose: If No More Plane can be activated in MyView .
SetPlaneOn( me : mutable )
---Level: Public
---Purpose: Activate all the clipping planes defined in
-- this view.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
---Purpose: If No More Plane can be activated in MyView .
SetPlaneOff( me : mutable ; MyPlane : Plane from V3d );
returns Boolean from Standard;
---Level: Public
---Purpose: Returns TRUE when the plane is active in this view.
+
+ SetImmediateUpdate(me: mutable; theImmediateUpdate: Boolean from Standard)
+ returns Boolean from Standard;
+ ---Purpose: sets the immediate update mode and returns the previous one.
+
---------------------------------------------------
-- Triedron methods
GetGraduatedTrihedron(me;
-- Names of axes --
- xname : out CString from Standard;
- yname : out CString from Standard;
- zname : out CString from Standard;
+ xname, yname, zname : out ExtendedString from TCollection;
-- Draw names --
- xdrawname : out Boolean from Standard;
- ydrawname : out Boolean from Standard;
- zdrawname : out Boolean from Standard;
+ xdrawname, ydrawname, zdrawname : out Boolean from Standard;
-- Draw values --
- xdrawvalues : out Boolean from Standard;
- ydrawvalues : out Boolean from Standard;
- zdrawvalues : out Boolean from Standard;
+ xdrawvalues, ydrawvalues, zdrawvalues : out Boolean from Standard;
-- Draw grid --
drawgrid : out Boolean from Standard;
-- Draw axes --
drawaxes : out Boolean from Standard;
-- Number of splits along axes --
- nbx : out Integer from Standard;
- nby : out Integer from Standard;
- nbz : out Integer from Standard;
+ nbx, nby, nbz : out Integer from Standard;
-- Offset for drawing values --
- xoffset : out Integer from Standard;
- yoffset : out Integer from Standard;
- zoffset : out Integer from Standard;
+ xoffset, yoffset, zoffset : out Integer from Standard;
-- Offset for drawing names of axes --
- xaxisoffset : out Integer from Standard;
- yaxisoffset : out Integer from Standard;
- zaxisoffset : out Integer from Standard;
+ xaxisoffset, yaxisoffset, zaxisoffset : out Integer from Standard;
-- Draw tickmarks --
- xdrawtickmarks : out Boolean from Standard;
- ydrawtickmarks : out Boolean from Standard;
- zdrawtickmarks : out Boolean from Standard;
+ xdrawtickmarks, ydrawtickmarks, zdrawtickmarks : out Boolean from Standard;
-- Length of tickmarks --
- xtickmarklength : out Integer from Standard;
- ytickmarklength : out Integer from Standard;
- ztickmarklength : out Integer from Standard;
+ xtickmarklength, ytickmarklength, ztickmarklength : out Integer from Standard;
-- Grid color --
gridcolor : out Color from Quantity;
- -- X name color --
- xnamecolor : out Color from Quantity;
- -- Y name color --
- ynamecolor : out Color from Quantity;
- -- Z name color --
- znamecolor : out Color from Quantity;
- -- X color of axis and values --
- xcolor : out Color from Quantity;
- -- Y color of axis and values --
- ycolor : out Color from Quantity;
- -- Z color of axis and values --
- zcolor : out Color from Quantity;
+ -- Colors of axis names --
+ xnamecolor, ynamecolor, znamecolor : out Color from Quantity;
+ -- Colors of axis and values --
+ xcolor, ycolor, zcolor : out Color from Quantity;
-- Name of font for names of axes --
- fontOfNames : out CString from Standard;
+ fontOfNames : out AsciiString from TCollection;
-- Style of names of axes --
- styleOfNames : out FontAspect from OSD;
+ styleOfNames : out FontAspect from Font;
-- Size of names of axes --
sizeOfNames : out Integer from Standard;
-- Name of font for values --
- fontOfValues : out CString from Standard;
+ fontOfValues : out AsciiString from TCollection;
-- Style of values --
- styleOfValues : out FontAspect from OSD;
+ styleOfValues : out FontAspect from Font;
-- Size of values --
sizeOfValues : out Integer from Standard)
---Purpose: Returns data of a graduated trihedron.
GraduatedTrihedronDisplay(me : mutable;
-- Names of axes --
- xname : CString from Standard = "X\0";
- yname : CString from Standard = "Y\0";
- zname : CString from Standard = "Z\0";
+ xname : ExtendedString from TCollection = "X";
+ yname : ExtendedString from TCollection = "Y";
+ zname : ExtendedString from TCollection = "Z";
-- Draw names --
xdrawname : Boolean from Standard = Standard_True;
ydrawname : Boolean from Standard = Standard_True;
-- Z color of axis and values --
zcolor : Color from Quantity = Quantity_NOC_BLUE1;
-- Name of font for names of axes --
- fontOfNames : CString from Standard = "Arial";
+ fontOfNames : AsciiString from TCollection = "Arial";
-- Style of names of axes --
- styleOfNames : FontAspect from OSD = OSD_FA_Bold;
+ styleOfNames : FontAspect from Font = Font_FA_Bold;
-- Size of names of axes --
sizeOfNames : Integer from Standard = 12;
-- Name of font for values --
- fontOfValues : CString from Standard = "Arial";
+ fontOfValues : AsciiString from TCollection = "Arial";
-- Style of values --
- styleOfValues : FontAspect from OSD = OSD_FA_Regular;
+ styleOfValues : FontAspect from Font = Font_FA_Regular;
-- Size of values --
sizeOfValues : Integer from Standard = 12)
---Purpose: Displays a graduated trihedron.
-- for which the origin is the view point of the projection,
-- with a relative angular value in RADIANS with respect to
-- the initial position expressed by Start = Standard_True
- raises BadValue from Viewer;
- ---Purpose: Warning! raises BadValue from Viewer
+ raises BadValue from V3d;
+ ---Purpose: Warning! raises BadValue from V3d
-- If the eye, the view point, or the high point are
-- aligned or confused.
-- for which the origin is Gravity point {X,Y,Z},
-- with a relative angular value in RADIANS with respect to
-- the initial position expressed by Start = Standard_True
- raises BadValue from Viewer;
+ raises BadValue from V3d;
---Purpose: If the eye, the view point, or the high point are
-- aligned or confused.
---Purpose: Movement of the eye parallel to the coordinate system
-- of reference of the screen a distance relative to the
-- initial position expressed by Start = Standard_True.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the eye, the view point, or the high point are
-- aligned or confused.
-- coordinate system of reference of the view a distance
-- relative to the initial position expressed by
-- Start = Standard_True.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the eye, view point, or high point are aligned or confused.
Move ( me : mutable ; Length : Length ;
---Purpose: Movement of the eye parllel to the current axis
-- a distance relative to the initial position
-- expressed by Start = Standard_True
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the eye, view point, or high point are aligned or confused.
Translate ( me : mutable ; Dx,Dy,Dz : Length ;
-- frame of reference of the screen a distance relative
-- to the initial position expressed by
-- Start = Standard_True
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the eye, view point, or high point are aligned or confused.
Translate ( me : mutable ; Axe : TypeOfAxe ; Length : Length ;
---Purpose: places the point of the view corresponding
-- at the pixel position x,y at the center of the window
-- and updates the view.
- is redefined static;
+ is static;
Turn ( me : mutable ; Ax,Ay,Az : PlaneAngle ;
Start : Boolean = Standard_True )
-- projection with a relative angular value in RADIANS
-- with respect to the initial position expressed by
-- Start = Standard_True
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the eye, view point, or high point are aligned or confused.
Turn ( me : mutable ; Axe : TypeOfAxe ; Angle : PlaneAngle ;
-- the reference frame of the view with respect to the
-- Y screen axis with an absolute angular value in
-- RADIANS.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the eye, view point, or high point are aligned or confused.
SetEye( me : mutable ; X,Y,Z : Coordinate )
---Level: Public
---Purpose: Defines the position of the eye..
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the eye, view point, or high point are aligned or confused.
SetDepth( me : mutable ; Depth : Length )
---Level: Public
---Purpose: Defines the Depth of the eye from the view point
-- without update the projection .
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the Depth is <= 0.
SetProj( me : mutable ; Vx,Vy,Vz : Parameter )
---Level: Public
---Purpose: Defines the orientation of the projection.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the eye, view point, or high point are aligned or confused.
SetProj( me : mutable ; Orientation : TypeOfOrientation )
---Level: Public
---Purpose: Defines the orientation of the projection .
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the eye, view point, or high point are aligned or confused.
-- Updates the view
SetAt( me : mutable ; X,Y,Z : Coordinate )
---Level: Public
---Purpose: Defines the position of the view point.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the eye, view point, or high point are aligned or confused.
SetUp( me : mutable ; Vx,Vy,Vz : Parameter )
---Level: Public
---Purpose: Defines the orientation of the high point.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the eye, view point, or high point are aligned or confused.
SetUp( me : mutable ; Orientation : TypeOfOrientation )
---Level: Public
---Purpose: Defines the orientation(SO) of the high point.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the eye, view point, or high point are aligned or confused.
SetViewOrientation ( me : mutable; VO : ViewOrientation from Visual3d );
---Level: Public
---Purpose: translates the center of the view and zooms the view.
-- Updates the view.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
SetCenter ( me : mutable ; Xc , Yc : Coordinate )
---Level: Public
---Purpose: Defines the centre of the view.
-- Updates the view.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If one of the dimensions of the projection is NULL.
SetCenter ( me : mutable ; X,Y: Integer from Standard)
---Level: Public
---Purpose: Defines the centre of the view from a pixel position.
-- Updates the view.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If one of the dimensions of the projection is NULL.
SetSize ( me : mutable ; Size : Length )
-- center and height/width ratio of the window supporting
-- the view.
-- NOTE than the Depth of the View is NOT modified .
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the size of the view is <= 0
SetZSize ( me : mutable ; Size : Length )
-- Any Object located Above the Front Plane or
-- behind the Back Plane will be Clipped .
-- NOTE than the XY Size of the View is NOT modified .
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the size of the view is <= 0
SetZoom ( me : mutable ; Coef : Factor ; Start : Boolean = Standard_True )
---Purpose: Zooms the view by a factor relative to the initial
-- value expressed by Start = Standard_True
-- Updates the view.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the zoom coefficient is <= 0
SetScale ( me : mutable ; Coef : Factor )
---Purpose: Zooms the view by a factor relative to the value
-- initialised by SetViewMappingDefault().
-- Updates the view.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the zoom coefficient is <= 0
SetAxialScale ( me : mutable ; Sx, Sy, Sz : Real from Standard )
-- || 0 0 Sz 0 ||
-- || 0 0 0 1 ||
-- Updates the view.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the one of factors <= 0
FitAll ( me : mutable ; Coef : Coefficient = 0.01;
-- so as to occupy the maximum space while respecting the
-- margin coefficient and the initial height /width ratio.
-- NOTE than the original Z size of the view is NOT modified .
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the margin coefficient is <0 ou >= 1 or
-- Updates the view
-- visualised so as to occupy the maximum Z amount of space
-- while respecting the margin coefficient .
-- NOTE than the original XY size of the view is NOT modified .
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
-- If the margin coefficient is <0 ou or
-- If No Objects are displayed in the view
-- the maximum space while respecting the initial
-- height/width ratio.
-- NOTE than the original Z size of the view is NOT modified .
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the defined projection window has zero size.
-- the maximum space while respecting the initial
-- height/width ratio.
-- NOTE than the original Z size of the view is NOT modified .
- raises BadValue from Viewer
+ raises BadValue from V3d
-- If the defined projection window has zero size.
- is redefined static;
+ is static;
SetViewingVolume ( me : mutable ; Left, Right, Bottom, Top, ZNear, ZFar : Real from Standard)
---Level: Public
---Purpose: Sets Z and XY size of the view according to given values
- -- with respecting the initial view depth (eye position)
- raises BadValue from Viewer;
+ -- with respecting the initial view depth (eye position).
+ -- Width/heigth aspect ratio should be preserved by the caller
+ -- of this method similarly to SetSize() to avoid unexpected
+ -- visual results like non-uniform scaling of objects in the view.
+ raises BadValue from V3d;
-- If the ZNear<0, ZFar<0 or ZNear>=Zfar.
SetViewMapping ( me : mutable; VM : ViewMapping from Visual3d );
Window ( me ) returns mutable Window from Aspect
---Level: Public
---Purpose: Returns the Aspect Window associated with the view.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If MyView is not associated with a window
Type( me ) returns TypeOfView from V3d;
Matrix : Array2OfReal from TColStd )
returns Vector from Graphic3d is private ;
---Purpose: Transforms the vector V according to the matrice Matrix .
+
+ ImmediateUpdate (me) is static protected;
+ ---Purpose:
-----------------------------------------
---Category: TransientManager methods
--
returns Boolean from Standard;
- ---------------------------------------------------
- -- Category: Methods to modify the class definition
- -- Animation Mode
- ---------------------------------------------------
-
- SetAnimationModeOn ( me : mutable )
- is static;
- ---Level: Advanced
- ---Purpose: Activates animation mode.
- -- When the animation mode is activated in the view,
- -- all Graphic3d_Structure are stored in a graphic object.
- ---Category: Methods to modify the class definition
-
- SetAnimationModeOff ( me : mutable )
- is static;
- ---Level: Advanced
- ---Purpose: Deactivates the animation mode.
- ---Category: Methods to modify the class definition
-
- AnimationModeIsOn ( me )
- returns Boolean from Standard
- is static;
- ---Level: Advanced
- ---Purpose: Returns the activity of the animation mode.
- ---Category: Inquire methods
-
- SetAnimationMode ( me : mutable;
- anAnimationFlag : Boolean from Standard = Standard_True;
- aDegenerationFlag : Boolean from Standard = Standard_False
- ) is static;
- ---Level : Advanced
- ---Purpose : Enable/Disable animation/degeneration mode
- ---Category : Methods to modify the class definition
-
- AnimationMode ( me; isDegenerate: out Boolean from Standard )
- returns Boolean from Standard
- is static;
- ---Level : Advanced
- ---Purpose : Returns the animation and degenerate status.
- ---Category: Inquire methods
-
- ---------------------------------------------------
- -- Category: Methods to modify the class definition
- -- Degenerate Mode
- ---------------------------------------------------
-
- SetDegenerateModeOn ( me : mutable )
- is static;
- ---Level : Obsolete
- ---Purpose: 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.
- -- Warning: Obsolete method , use SetComputedMode()
- ---Category: Methods to modify the class definition
-
- SetDegenerateModeOff ( me : mutable )
- is static;
- ---Level : Obsolete
- ---Purpose: Deactivates the degenerate mode.
- -- Category: Methods to modify the class definition
- -- Warning: if the computed mode has been disabled in the
- -- viewer the mode will remain degenerated.
- -- Warning: Obsolete method , use SetComputedMode()
-
- DegenerateModeIsOn ( me )
- returns Boolean from Standard
- is static;
- ---Level : Obsolete
- ---Purpose: Returns the activity of the degenerate mode.
- ---Category: Inquire methods
-
SetComputedMode ( me : mutable; aMode : Boolean from Standard )
is static;
---Level: Advanced
Plot ( me : mutable )
---Purpose: Create a 2D View for plotting the contents of the view
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- if the plotter is undefined.
Compute ( me; AVertex : Vertex from Graphic3d )
-- grid in <me>
---Category: Methods to modify the class definition
- Tumble ( me : mutable;
- NbImages : Integer from Standard = 314;
- AnimationMode : Boolean from Standard = Standard_False )
- returns Real from Standard
- is static;
- ---Level : Advanced
- ---Purpose: Animates the view <me>
- -- Returns the number of images per second
- -- if <AnimationMode> is Standard_True, the animation mode
- -- is activated.
-
- ScreenCopy (me : mutable;
- aPlotterDriver : PlotterDriver from PlotMgt;
- fWhiteBackground : Boolean from Standard = Standard_True;
- aScale : Factor from Quantity = 1.0
- ) is static;
- ---Purpose: dump the view
-
Dump ( me: mutable;
- theFile: CString from Standard;
- theBufferType : TypeOfImage from Image = Image_TOI_RGB )
+ theFile : CString from Standard;
+ theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB )
returns Boolean from Standard;
---Level: Public
---Purpose: dump the full contents of the view at the same
-- extension must be one of ".png",".bmp",".jpg",".gif".
-- Returns FALSE when the dump has failed
- Dump ( me: mutable;
- theFile : CString from Standard;
- theFormat : FormatOfSheetPaper from Aspect;
- theBufferType : TypeOfImage from Image = Image_TOI_RGB )
- returns Boolean from Standard;
- ---Level: Public
- ---Purpose: dump the full contents of the view with a
- -- different scale according to the required sheet
- -- paper size (format) and the ratio
- -- width/height of the view.
- -- and returns FALSE when the dump has failed
- -- Warning : the file name extension must be one of
- -- ".png",".bmp",".jpg",".gif"
- -- but make becarefull about the time to dump and
- -- resulting file size especially for the A0 format.
- -- NOTE that you can use after any standard system utility
- -- for editing or sending the image file to a laser printer.
- -- (i.e: Microsoft Photo Editor on Windows system
- -- or Image Viewer on SUN system)
-
Print (me; hPrnDC: Handle from Aspect = NULL;
showDialog: Boolean = Standard_True;
- showBackground: Boolean = Standard_True;
- filename: CString = NULL)
- is static;
+ showBackground : Boolean = Standard_True;
+ filename: CString = NULL;
+ printAlgorithm : PrintAlgo from Aspect = Aspect_PA_STRETCH)
+ returns Boolean from Standard is static;
---Level: Public
---Purpose: print the contents of the view to printer with preview.
-- (background is white)
-- else set to TRUE for printing with current background color.
-- <filename>: If != NULL, then the view will be printed to a file.
+ -- <printAlgorithm>: If you want to select the print algorithm, then you can
+ -- specify one of existing algorithms: Aspect_PA_STRETCH, Aspect_PA_TILE.
+ -- Returns Standard_True if the data is passed to the printer, otherwise
+ -- Standard_False if the print operation failed. This might be related to
+ -- insufficient memory or some internal errors. All this errors are
+ -- indicated by the message boxes (on level of OpenGl_GraphicDriver).
+ -- Warning: This function can reuse FBO assigned to the
+ -- view on level of OpenGl_GraphicDriver; Please take it into account if
+ -- you use it for your purposes;
-- Warning: Works only under Windows.
ToPixMap ( me : mutable;
+ theImage : in out PixMap from Image;
theWidth : Integer from Standard;
theHeight : Integer from Standard;
- theBufferType : TypeOfImage from Image = Image_TOI_RGB;
+ theBufferType : BufferType from Graphic3d = Graphic3d_BT_RGB;
theForceCentered : Boolean from Standard = Standard_True )
- returns PixMap from Image;
+ returns Boolean from Standard;
---Level : Public
---Purpose : dump the full contents of the view
-- to a pixmap of pixel size <theWidth>*<theHeight> and
-- buffer type <theBufferType>. If <theForceCentered> is true
-- view scene will be centered.
+ -- Pixmap will be automatically (re)allocated when needed.
SetProjModel( me : mutable;
amOdel: TypeOfProjectionModel from V3d = V3d_TPM_SCREEN )
--MyColorScale : ColorScale from V3d;
MyLayerMgr : LayerMgr from V3d;
+ MyProjModel : TypeOfProjectionModel from V3d is protected;
+
-- the transformation between XoY and the grid plane
MyTrsf : Array2OfReal from TColStd;
MyGridEchoStructure : Structure from Graphic3d;
MyGridEchoGroup : Group from Graphic3d;
- MyProjModel : TypeOfProjectionModel from V3d is protected;
- MyAnimationFlags : Integer from Standard;
-
- MyTransparencyFlag : Boolean from Standard;
+ MyTransparencyFlag : Boolean from Standard;
+ myImmediateUpdate: Boolean from Standard is protected;
friends
SetViewOn from class Viewer from V3d ( me : mutable ),