Removed package Viewer. Methods and class filed from Viewer_View and Viewer_Viewer have been moved to V3d_View and V3d_Viewer
accordingly.
Removed Aspect_GraphicDriver.
V3d_View declaration fix
p StdSelect
p TColQuantity
p V3d
-p Viewer
p Visual3d
p Voxel
p WNT
Quantity,
TColQuantity,
Resource,
- Viewer,
MMgt
is
---Purpose: Creates and controles all identifiers.
---Category: Classes
- deferred class GraphicDriver;
- ---Purpose: Defines a graphic driver (3d library)
-
class FontStyle;
---Purpose: Defines a Font Style
---Category: The classes
TypeOfColorScalePosition from Aspect,
ColorMap from Aspect,
SequenceOfColor from Aspect,
- View from Viewer,
Color from Quantity,
AsciiString from TCollection,
ExtendedString from TCollection,
+++ /dev/null
--- Created on: 1997-01-28
--- Created by: CAL
--- Copyright (c) 1997-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- 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.
-
-
-deferred class GraphicDriver from Aspect inherits TShared
-
-is
-
- Initialize;
-
-end GraphicDriver from Aspect;
+++ /dev/null
-// Created on: 1997-01-28
-// Created by: CAL
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// 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.
-
-
-
-
-#include <Aspect_GraphicDriver.ixx>
-
-Aspect_GraphicDriver::Aspect_GraphicDriver () {
-}
-- purpose or non-infringement. Please see the License for the specific terms
-- and conditions governing the rights and limitations under the License.
-deferred class GraphicDriver from Graphic3d inherits GraphicDriver from Aspect
+deferred class GraphicDriver from Graphic3d inherits TShared
---Version:
Array1OfEdge from Aspect,
CLayer2d from Aspect,
- GraphicDriver from Aspect,
TypeOfTriedronEcho from Aspect,
TypeOfTriedronPosition from Aspect,
Handle from Aspect,
TopLoc,
Prs3d,Graphic3d,
Quantity,Geom,
- Viewer,
+ V3d,
TColStd,
gp
uses
Presentation from PrsMgr,
PresentableObject from PrsMgr,
- View from Viewer,
+ View from V3d,
ListOfTransient from TColStd
-- aPresentableObject with the mode aMode from the
-- list of objects in immediate mode.
- EndDraw(me: mutable; aView: View from Viewer; DoubleBuffer: Boolean from Standard = Standard_False)
+ EndDraw(me: mutable; aView: View from V3d; DoubleBuffer: Boolean from Standard = Standard_False)
---Purpose: Allows rapid drawing of the view aView by avoiding
-- an update of the whole background. If DoubleBuffer
-- is true, the background is drawn.
--NameOfPhysicalMaterial from Graphic3d,
Presentation from PrsMgr,
Presentation3d from PrsMgr,
- View from Viewer,
+ View from V3d,
ShadingAspect from Prs3d,
Presentation from Prs3d
is
---Purpose: stores <aPrs> in a list of structure to be displayed
-- in immediate mode. will be taken in account in EndDraw Method.
- EndDraw(me: mutable; aView: View from Viewer; DoubleBuffer: Boolean from Standard = Standard_False)
+ EndDraw(me: mutable; theView: View from V3d; DoubleBuffer: Boolean from Standard = Standard_False)
is redefined static;
//purpose :
//=======================================================================
-void PrsMgr_PresentationManager3d::EndDraw(const Handle(Viewer_View)& aView, const Standard_Boolean DoubleBuffer) {
-
-
- Handle(V3d_View) v;
- v =*((Handle(V3d_View)*)&aView);
- if (!v->TransientManagerBeginDraw(DoubleBuffer,Standard_True))
+void PrsMgr_PresentationManager3d::EndDraw(const Handle(V3d_View)& theView, const Standard_Boolean DoubleBuffer)
+{
+ if (!theView->TransientManagerBeginDraw (DoubleBuffer, Standard_True))
{
myImmediateMode = Standard_False;
return;
Aspect
InterfaceGraphic
SelectBasics
-Viewer
Xw
AlienImage
Image
Cocoa
TColQuantity
Font
-
uses
- Viewer,
TColStd,
Graphic3d,
Visual3d,
--Category: The Exceptions
--------------------------
+ exception BadValue inherits OutOfRange;
exception UnMapped inherits DomainError;
-----------------------------
class Viewer;
---Purpose: Provides the services of a 3D viewer.
- deferred class View;
+ class View;
---Purpose: Provides a set of services common to all types of view.
class OrthographicView;
Group from Graphic3d,
View from V3d
-raises BadValue from Viewer
+raises BadValue from V3d
is
---Purpose : Defines the direction of the light source
-- by a predefined orientation.
- SetDirection ( me : mutable; Xm, Ym, Zm : Parameter ) raises BadValue from Viewer is static;
+ SetDirection ( me : mutable; Xm, Ym, Zm : Parameter ) raises BadValue from V3d is static;
---Level: Public
---Purpose : Defines the direction of the light source by the predefined
-- vector Xm,Ym,Zm.
- -- Warning: raises BadValue from Viewer if the vector is null.
+ -- Warning: raises BadValue from V3d if the vector is null.
SetDisplayPosition (me : mutable; X,Y,Z : Coordinate) is static;
---Level: Public
#include <Visual3d_PickDescriptor.hxx>
#include <Visual3d_HSequenceOfPickPath.hxx>
#include <Visual3d_PickPath.hxx>
-#include <Viewer_BadValue.hxx>
+#include <V3d_BadValue.hxx>
#include <gp_Dir.hxx>
#include <gp_Ax1.hxx>
#include <gp_Vec.hxx>
void V3d_DirectionalLight::SetDirection(const Standard_Real Vx, const Standard_Real Vy, const Standard_Real Vz) {
- Viewer_BadValue_Raise_if( sqrt( Vx*Vx + Vy*Vy + Vz*Vz ) <= 0.,"V3d_DirectionalLight::SetDirection, null vector" );
+ V3d_BadValue_Raise_if( sqrt( Vx*Vx + Vy*Vy + Vz*Vz ) <= 0.,"V3d_DirectionalLight::SetDirection, null vector" );
Graphic3d_Vector V(Vx,Vy,Vz) ;
V.Normalize() ;
Structure from Graphic3d
raises
- BadValue from Viewer
+ BadValue from V3d
is
raises
- BadValue from Viewer
+ BadValue from V3d
is
-- TAN(Angle/2) = Size/Length
-- Size expresses the smallest dimension of the window.
-- Length expresses the focal length.
- raises BadValue from Viewer
- ---Purpose: Warning! raises BadValue from Viewer
+ raises BadValue from V3d
+ ---Purpose: Warning! raises BadValue from V3d
-- if the opening angle is <= 0 or >= PI
is static;
-- angle of opening of the perspective in RADIANS,
-- aspect ratio of window width to its height and
-- near and far clipping planes
- raises BadValue from Viewer
+ raises BadValue from V3d
-- if the opening angle is <= 0 or >= PI or
-- the ZNear<0, ZFar<0 or ZNear>=Zfar.
is static;
#include <V3d_View.hxx>
#include <V3d_PerspectiveView.ixx>
#include <Visual3d_View.hxx>
-#include <Viewer_BadValue.hxx>
+#include <V3d_BadValue.hxx>
V3d_PerspectiveView::V3d_PerspectiveView (const Handle(V3d_Viewer)& VM):V3d_View (VM,V3d_PERSPECTIVE) {
MyViewMapping.SetProjection(Visual3d_TOP_PERSPECTIVE) ;
Standard_Real focale,Umin,Vmin,Umax,Vmax,Dxv,Dyv,Rap,Xrp,Yrp;
- Viewer_BadValue_Raise_if ( Angle <= 0. || Angle >= M_PI, "V3d_PerspectiveView::SetAngle, bad angle");
+ V3d_BadValue_Raise_if ( Angle <= 0. || Angle >= M_PI, "V3d_PerspectiveView::SetAngle, bad angle");
MyViewMapping.WindowLimit(Umin,Vmin,Umax,Vmax) ;
Dxv = Abs(Umax - Umin)/2. ; Dyv = Abs(Vmax - Vmin)/2.;
{
Standard_Real Umin,Vmin,Umax,Vmax,Xrp,Yrp,Zrp,du,dv;
- Viewer_BadValue_Raise_if ( ZNear <= 0. || ZFar <= 0. || ZNear >= ZFar, "V3d_PerspectiveView::SetPerspective, bad distances");
- Viewer_BadValue_Raise_if ( Angle <= 0. || Angle >= M_PI, "V3d_PerspectiveView::SetAngle, bad angle");
+ V3d_BadValue_Raise_if ( ZNear <= 0. || ZFar <= 0. || ZNear >= ZFar, "V3d_PerspectiveView::SetPerspective, bad distances");
+ V3d_BadValue_Raise_if ( Angle <= 0. || Angle >= M_PI, "V3d_PerspectiveView::SetAngle, bad angle");
Graphic3d_Vertex PRP = MyViewMapping.ProjectionReferencePoint() ;
Xrp = Yrp = Zrp = 0.;
raises
- BadValue from Viewer
+ BadValue from V3d
is
---Level : Public
---Purpose: Creates a clipping plane using the equation :
-- <A>*X + <B>*Y + <C>*Z + <D> = 0.0
- raises BadValue from Viewer;
- ---Purpose: Warning! raises BadValue from Viewer
+ raises BadValue from V3d;
+ ---Purpose: Warning! raises BadValue from V3d
-- if the norm of the plane is NULL.
--------------------------------------------------------
SetPlane( me : mutable; A,B,C,D : Parameter)
---Level : Public
---Purpose: Modifies the plane equation.
- raises BadValue from Viewer
- ---Purpose: Warning! raises BadValue from Viewer
+ raises BadValue from V3d
+ ---Purpose: Warning! raises BadValue from V3d
-- if the norm of the plane is NULL.
-- If the norm of the plane is NULL.
is static;
#include <V3d.hxx>
#include <V3d_Plane.ixx>
-#include <Viewer_BadValue.hxx>
+#include <V3d_BadValue.hxx>
#include <Graphic3d_Group.hxx>
#include <Graphic3d_ArrayOfQuadrangles.hxx>
V3d_Plane::V3d_Plane(const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D)
{
- Viewer_BadValue_Raise_if( sqrt(A*A + B*B + C*C) <= 0., "V3d_Plane::V3d_Plane, bad plane coefficients");
+ V3d_BadValue_Raise_if( sqrt(A*A + B*B + C*C) <= 0., "V3d_Plane::V3d_Plane, bad plane coefficients");
MyPlane = new Visual3d_ClipPlane(A,B,C,D) ;
}
void V3d_Plane::SetPlane(const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D)
{
- Viewer_BadValue_Raise_if( sqrt(A*A + B*B + C*C) <= 0., "V3d_Plane::SetPlane, bad plane coefficients");
+ V3d_BadValue_Raise_if( sqrt(A*A + B*B + C*C) <= 0., "V3d_Plane::SetPlane, bad plane coefficients");
MyPlane->SetPlane(A,B,C,D) ;
if( IsDisplayed() )
Vertex from Graphic3d,
Group from Graphic3d
-raises BadValue from Viewer
+raises BadValue from V3d
is
---Purpose: Defines the target of the light (the center
-- of the sphere)
- SetRadius ( me : mutable; Radius : Parameter) raises BadValue from Viewer is static;
+ SetRadius ( me : mutable; Radius : Parameter) raises BadValue from V3d is static;
---Level: Public
---Purpose: Define the radius.
- ---Warning: raises BadValue from Viewer if the radius is <= 0 or if the light is directional
+ ---Warning: raises BadValue from V3d if the radius is <= 0 or if the light is directional
OnHideFace (me : mutable; aView : View from V3d);
---Level: Public
#include <Visual3d_PickDescriptor.hxx>
#include <Visual3d_HSequenceOfPickPath.hxx>
#include <Visual3d_PickPath.hxx>
-#include <Viewer_BadValue.hxx>
+#include <V3d_BadValue.hxx>
#include <gp_Dir.hxx>
#include <gp_Ax1.hxx>
#include <gp_Vec.hxx>
void V3d_PositionLight::SetRadius(const Standard_Real Radius) {
- Viewer_BadValue_Raise_if( Radius <= 0. , "V3d_PositionLight::SetRadius, bad radius");
- Viewer_BadValue_Raise_if( MyType == V3d_DIRECTIONAL , "V3d_PositionLight::SetRadius, bad light type");
+ V3d_BadValue_Raise_if( Radius <= 0. , "V3d_PositionLight::SetRadius, bad radius");
+ V3d_BadValue_Raise_if( MyType == V3d_DIRECTIONAL , "V3d_PositionLight::SetRadius, bad light type");
Standard_Real X0,Y0,Z0, Xn,Yn,Zn, Xp,Yp,Zp;
Vertex from Graphic3d,
Group from Graphic3d
-raises BadValue from Viewer
+raises BadValue from V3d
is
-- A1,A2 being the two factors of attenuation
-- Length is the distance of the isolated source
-- from the surface.
- raises BadValue from Viewer;
- ---Purpose: Warning! raises BadValue from Viewer
+ raises BadValue from V3d;
+ ---Purpose: Warning! raises BadValue from V3d
-- if one of the attenuation coefficients is not between 0 et 1.
Create ( VM : mutable Viewer ; Xt,Yt,Zt : Coordinate;
-- F = 1/(A1 + A2*Length) where:
-- - A1,A2 are the two attenuation factors, and
-- - Length is the distance from the isolated source.
- raises BadValue from Viewer;
- ---Purpose: Warning! raises BadValue from Viewer
+ raises BadValue from V3d;
+ ---Purpose: Warning! raises BadValue from V3d
-- if one of the attenuation coefficients is not between 0 et 1.
---Level: Public
---Purpose: Defines the position of the light source.
- SetAttenuation( me : mutable; A1,A2 : Coefficient ) raises BadValue from Viewer is static;
+ SetAttenuation( me : mutable; A1,A2 : Coefficient ) raises BadValue from V3d is static;
---Level: Public
---Purpose: Defines the attenuation factors.
- -- Warning: raises BadValue from Viewer
+ -- Warning: raises BadValue from V3d
-- if one of the attenuation coefficients is not between 0 et 1.
---------------------------------------------------
#include <Visual3d_PickDescriptor.hxx>
#include <Visual3d_HSequenceOfPickPath.hxx>
#include <Visual3d_PickPath.hxx>
-#include <Viewer_BadValue.hxx>
+#include <V3d_BadValue.hxx>
#include <gp_Dir.hxx>
#include <gp_Ax1.hxx>
#include <gp_Vec.hxx>
Graphic3d_Vertex P(X,Y,Z) ;
Graphic3d_Vertex T(0.,0.,0.);
- Viewer_BadValue_Raise_if ( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1,
+ V3d_BadValue_Raise_if ( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1,
"V3d_PositionalLight, bad coefficients");
MyType = V3d_POSITIONAL ;
Graphic3d_Vertex T(Xt,Yt,Zt) ;
Graphic3d_Vertex P(Xp,Yp,Zp) ;
- Viewer_BadValue_Raise_if ( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1,
+ V3d_BadValue_Raise_if ( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1,
"V3d_PositionalLight, bad coefficients");
MyType = V3d_POSITIONAL ;
void V3d_PositionalLight::SetAttenuation(const Standard_Real A1, const Standard_Real A2) {
- Viewer_BadValue_Raise_if ( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1,
+ V3d_BadValue_Raise_if ( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1,
"V3d_PositionalLight::SetAttenuation, bad coefficients");
MyLight->SetAttenuation1(A1) ;
Vertex from Graphic3d,
Group from Graphic3d
-raises BadValue from Viewer
+raises BadValue from V3d
is
-- The concentration factor determines the dispersion
-- of the light on the surface, the default value
-- (1.0) corresponds to a minimum of dispersion .
- raises BadValue from Viewer;
- ---Purpose: Warning! raises BadValue from Viewer -
+ raises BadValue from V3d;
+ ---Purpose: Warning! raises BadValue from V3d -
-- If one of the coefficients is not between 0 and 1 .
-- If the lighting angle is <= 0 ou > PI .
-- Xt,Yt,Zt : Coordinate of light source Target.
-- Xp,Yp,Zp : Coordinate of light source Position.
-- The others parameters describe before.
- raises BadValue from Viewer;
- ---Purpose: Warning! raises BadValue from Viewer -
+ raises BadValue from V3d;
+ ---Purpose: Warning! raises BadValue from V3d -
-- If one of the coefficients is not between 0 and 1 .
-- If the lighting angle is <= 0 ou > PI .
---Level: Public
---Purpose: Defines the position of the light source.
- SetDirection ( me : mutable; Vx, Vy, Vz : Parameter ) raises BadValue from Viewer is static;
+ SetDirection ( me : mutable; Vx, Vy, Vz : Parameter ) raises BadValue from V3d is static;
---Level: Public
---Purpose : Defines the direction of the light source.
-- If the normal vector is NULL.
---Purpose : Defines the direction of the light source
-- according to a predefined directional vector.
- SetAttenuation( me : mutable; A1,A2 : Coefficient ) raises BadValue from Viewer is static;
+ SetAttenuation( me : mutable; A1,A2 : Coefficient ) raises BadValue from V3d is static;
---Level: Public
---Purpose: Defines the coefficients of attenuation.
- -- Warning! raises BadValue from Viewer
+ -- Warning! raises BadValue from V3d
-- if one of the coefficient is <0 ou >1 .
- SetConcentration( me : mutable; C : Coefficient ) raises BadValue from Viewer is static;
+ SetConcentration( me : mutable; C : Coefficient ) raises BadValue from V3d is static;
---Level: Public
---Purpose: Defines the coefficient of concentration.
-- if the coefficient is <0 ou >1 .
- SetAngle ( me : mutable; Angle : PlaneAngle ) raises BadValue from Viewer is static;
+ SetAngle ( me : mutable; Angle : PlaneAngle ) raises BadValue from V3d is static;
---Level: Public
---Purpose: Defines the spot angle in RADIANS.
- -- Warning: raises BadValue from from Viewer
+ -- Warning: raises BadValue from from V3d
-- If the angle is <= 0 ou > PI .
---------------------------------------------------
V3d_SpotLight::V3d_SpotLight(const Handle(V3d_Viewer)& VM, const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const V3d_TypeOfOrientation Direction, const Quantity_NameOfColor Name, const Standard_Real A1, const Standard_Real A2, const Standard_Real CN, const Standard_Real AN):V3d_PositionLight(VM) {
- Viewer_BadValue_Raise_if( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1
+ V3d_BadValue_Raise_if( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1
|| AN < 0. || AN > M_PI, "V3d_SpotLight, bad coefficient or angle");
Quantity_Color C(Name) ;
V3d_SpotLight::V3d_SpotLight(const Handle(V3d_Viewer)& VM, const Standard_Real Xt, const Standard_Real Yt, const Standard_Real Zt, const Standard_Real Xp, const Standard_Real Yp, const Standard_Real Zp, const Quantity_NameOfColor Name, const Standard_Real A1, const Standard_Real A2, const Standard_Real CN, const Standard_Real AN):V3d_PositionLight(VM) {
- Viewer_BadValue_Raise_if( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1
+ V3d_BadValue_Raise_if( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1
|| AN < 0. || AN > M_PI, "V3d_SpotLight, bad coefficient or angle");
Quantity_Color C(Name) ;
void V3d_SpotLight::SetAttenuation(const Standard_Real A1, const Standard_Real A2) {
- Viewer_BadValue_Raise_if( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1 ,
+ V3d_BadValue_Raise_if( A1 < 0 || A1 > 1. || A2 < 0 || A2 > 1 ,
"V3d_SpotLight::SetAttenuation, bad coefficients");
MyLight->SetAttenuation1(A1) ;
void V3d_SpotLight::SetConcentration(const Standard_Real C) {
- Viewer_BadValue_Raise_if( C < 0 || C > 1.,
+ V3d_BadValue_Raise_if( C < 0 || C > 1.,
"V3d_SpotLight::SetConcentration, bad coefficient");
MyLight->SetConcentration(C) ;
void V3d_SpotLight::SetAngle(const Standard_Real Angle) {
- Viewer_BadValue_Raise_if( Angle <= 0. || Angle >= M_PI,
+ V3d_BadValue_Raise_if( Angle <= 0. || Angle >= M_PI,
"V3d_SpotLight::SetAngle, bad angle");
MyLight->SetAngle(Angle) ;
-- NKV - 23/07/07 -> Define custom projection and model view matrixes
-- NKV - 08/02/07 -> Add ConvertWithProj() method
-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
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: Deprecated, Redraw() should be used instead.
---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
-- 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
-- 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 Viewer;
+ 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
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 )
MyAnimationFlags : Integer from Standard;
MyTransparencyFlag : Boolean from Standard;
+ myImmediateUpdate: Boolean from Standard is protected;
friends
SetViewOn from class Viewer from V3d ( me : mutable ),
#include <Image_AlienPixMap.hxx>
#include <V3d.hxx>
#include <V3d_View.ixx>
-#include <Viewer_BadValue.hxx>
+#include <V3d_BadValue.hxx>
#include <Standard_ShortReal.hxx>
#include <gp_Dir.hxx>
#include <TColStd_Array2OfReal.hxx>
Standard_Real D,Nx = Vx,Ny = Vy,Nz = Vz ;
D = Sqrt( Vx*Vx + Vy*Vy + Vz*Vz ) ;
- Viewer_BadValue_Raise_if ( D <= 0. , "V3d_View::SetAxis, bad axis");
+ V3d_BadValue_Raise_if ( D <= 0. , "V3d_View::SetAxis, bad axis");
Nx /= D ; Ny /= D ; Nz /= D ;
MyDefaultViewPoint.SetCoord(X,Y,Z) ;
MyDefaultViewAxis.SetCoord(Nx,Ny,Nz) ;
MyViewReferenceUp = MyViewOrientation.ViewReferenceUp() ;
if (!ScreenAxis(MyViewReferencePlane,MyViewReferenceUp,
MyXscreenAxis,MyYscreenAxis,MyZscreenAxis))
- Viewer_BadValue::Raise ("V3d_View::Rotate, alignment of Eye,At,Up");
+ V3d_BadValue::Raise ("V3d_View::Rotate, alignment of Eye,At,Up");
}
InitMatrix(Matrix) ;
MyViewReferenceUp = MyViewOrientation.ViewReferenceUp() ;
if (!ScreenAxis(MyViewReferencePlane,MyViewReferenceUp,
MyXscreenAxis,MyYscreenAxis,MyZscreenAxis))
- Viewer_BadValue::Raise ("V3d_View::Rotate, alignment of Eye,At,Up");
+ V3d_BadValue::Raise ("V3d_View::Rotate, alignment of Eye,At,Up");
}
InitMatrix(Matrix) ;
MyViewReferenceUp = MyViewOrientation.ViewReferenceUp() ;
if (!ScreenAxis(MyViewReferencePlane,MyViewReferenceUp,
MyXscreenAxis,MyYscreenAxis,MyZscreenAxis))
- Viewer_BadValue::Raise ("V3d_View::Turn, alignment of Eye,At,Up");
+ V3d_BadValue::Raise ("V3d_View::Turn, alignment of Eye,At,Up");
}
InitMatrix(Matrix) ;
MyXscreenAxis,MyYscreenAxis,MyZscreenAxis) ;
}
- Viewer_BadValue_Raise_if( !TheStatus,"V3d_ViewSetTwist, alignment of Eye,At,Up,");
+ V3d_BadValue_Raise_if( !TheStatus,"V3d_ViewSetTwist, alignment of Eye,At,Up,");
MyViewReferencePoint = MyViewOrientation.ViewReferencePoint() ;
RotAxis(MyViewReferencePoint,MyZscreenAxis,Angle,Matrix) ;
MyViewReferenceUp = MyViewOrientation.ViewReferenceUp() ;
Xpn = X - Xat ; Ypn = Y - Yat ; Zpn = Z - Zat ;
Zrp = Sqrt(Xpn*Xpn + Ypn*Ypn + Zpn*Zpn) ;
- Viewer_BadValue_Raise_if( Zrp <= 0. , "V3d_View::SetEye:: Eye,At are Confused");
+ V3d_BadValue_Raise_if( Zrp <= 0. , "V3d_View::SetEye:: Eye,At are Confused");
Xpn /= Zrp ; Ypn /= Zrp ; Zpn /= Zrp ;
MyViewReferencePlane.SetCoord(Xpn,Ypn,Zpn) ;
{
Standard_Real Xrp,Yrp,Zrp ;
#ifdef IMP250200
- Viewer_BadValue_Raise_if( Depth == 0. ,"V3d_View::SetDepth, bad depth");
+ V3d_BadValue_Raise_if( Depth == 0. ,"V3d_View::SetDepth, bad depth");
#else
- Viewer_BadValue_Raise_if( Depth <= 0. ,"V3d_View::SetDepth, bad depth");
+ V3d_BadValue_Raise_if( Depth <= 0. ,"V3d_View::SetDepth, bad depth");
#endif
MyViewReferencePoint = MyViewOrientation.ViewReferencePoint() ;
{
Standard_Real Angle ;
- Viewer_BadValue_Raise_if( Sqrt(Vx*Vx + Vy*Vy + Vz*Vz) <= 0.,
+ V3d_BadValue_Raise_if( Sqrt(Vx*Vx + Vy*Vy + Vz*Vz) <= 0.,
"V3d_View::SetProj, null projection vector");
Angle = Twist() ;
Xeye = Zrp*Xpn + Xat ; Yeye = Zrp*Ypn + Yat ; Zeye = Zrp*Zpn + Zat ;
Xpn = Xeye - X ; Ypn = Yeye - Y ; Zpn = Zeye - Z ;
Zrp = Sqrt(Xpn*Xpn + Ypn*Ypn + Zpn*Zpn) ;
- Viewer_BadValue_Raise_if( Zrp <= 0.,
+ V3d_BadValue_Raise_if( Zrp <= 0.,
"V3d_View::SetAt, Eye,At are Confused");
Xpn /= Zrp ; Ypn /= Zrp ; Zpn /= Zrp ;
void V3d_View::SetUp(const Standard_Real Vx,const Standard_Real Vy,const Standard_Real Vz)
{
Standard_Boolean TheStatus ;
- Viewer_BadValue_Raise_if( Sqrt(Vx*Vx + Vy*Vy + Vz*Vz) <= 0. ,
+ V3d_BadValue_Raise_if( Sqrt(Vx*Vx + Vy*Vy + Vz*Vz) <= 0. ,
"V3d_View::SetUp, nullUp vector");
MyViewReferencePlane = MyViewOrientation.ViewReferencePlane() ;
TheStatus = ScreenAxis(MyViewReferencePlane,MyViewReferenceUp,
MyXscreenAxis,MyYscreenAxis,MyZscreenAxis) ;
}
- Viewer_BadValue_Raise_if( !TheStatus,"V3d_View::Setup, alignment of Eye,At,Up");
+ V3d_BadValue_Raise_if( !TheStatus,"V3d_View::Setup, alignment of Eye,At,Up");
MyViewReferenceUp = MyYscreenAxis ;
MyViewOrientation.SetViewReferenceUp(MyViewReferenceUp) ;
TheStatus = ScreenAxis(MyViewReferencePlane,MyViewReferenceUp,
MyXscreenAxis,MyYscreenAxis,MyZscreenAxis) ;
}
- Viewer_BadValue_Raise_if( !TheStatus, "V3d_View::SetUp, alignment of Eye,At,Up");
+ V3d_BadValue_Raise_if( !TheStatus, "V3d_View::SetUp, alignment of Eye,At,Up");
MyViewReferenceUp = MyYscreenAxis ;
MyViewOrientation.SetViewReferenceUp(MyViewReferenceUp) ;
void V3d_View::Panning(const Standard_Real Dx, const Standard_Real Dy, const Quantity_Factor aZoomFactor, const Standard_Boolean Start)
{
Standard_Real Umin,Vmin,Umax,Vmax,Xrp,Yrp,Zrp,Dxv,Dyv ;
- Viewer_BadValue_Raise_if( aZoomFactor <= 0.,"V3d_View::Panning, bad zoom factor");
+ V3d_BadValue_Raise_if( aZoomFactor <= 0.,"V3d_View::Panning, bad zoom factor");
if( Start ) {
MyProjReferencePoint = MyViewMapping.ProjectionReferencePoint() ;
MyYwindowCenter = (Vmin + Vmax)/2. ;
MyWindowWidth = Abs(Umax - Umin) ;
MyWindowHeight = Abs(Vmax - Vmin) ;
- Viewer_BadValue_Raise_if( MyWindowWidth <= 0. || MyWindowHeight <= 0. ,
+ V3d_BadValue_Raise_if( MyWindowWidth <= 0. || MyWindowHeight <= 0. ,
"V3d_View::Panning, Window Size is NULL");
}
MyProjReferencePoint.Coord(Xrp,Yrp,Zrp) ;
MyXwindowCenter = Xrp = Xc ; MyYwindowCenter = Yrp = Yc ;
MyViewMapping.WindowLimit(Umin,Vmin,Umax,Vmax) ;
MyWindowWidth = Abs(Umax - Umin) ; MyWindowHeight = Abs(Vmax - Vmin) ;
- Viewer_BadValue_Raise_if( MyWindowWidth <= 0. || MyWindowHeight <= 0. ,
+ V3d_BadValue_Raise_if( MyWindowWidth <= 0. || MyWindowHeight <= 0. ,
"V3d_View::SetCenter, Window Size is NULL");
Umin = Xc - MyWindowWidth/2. ; Vmin = Yc - MyWindowHeight/2. ;
{
Standard_Real Umin,Vmin,Umax,Vmax,Rap ;
- Viewer_BadValue_Raise_if( Size <= 0.,
+ V3d_BadValue_Raise_if( Size <= 0.,
"V3d_View::SetSize, Window Size is NULL");
if( Zmax <= MyViewMapping.FrontPlaneDistance() ) return;
}
#else
- Viewer_BadValue_Raise_if( Size <= 0.,
+ V3d_BadValue_Raise_if( Size <= 0.,
"V3d_View::SetZSize, Window ZSize is NULL");
#endif
void V3d_View::SetZoom(const Standard_Real Coef,const Standard_Boolean Start)
{
Standard_Real Umin,Vmin,Umax,Vmax,Dxv,Dyv ;
- Viewer_BadValue_Raise_if( Coef <= 0.,"V3d_View::SetZoom, bad coefficient");
+ V3d_BadValue_Raise_if( Coef <= 0.,"V3d_View::SetZoom, bad coefficient");
if( Start ) {
MyViewMapping.WindowLimit(Umin,Vmin,Umax,Vmax) ;
Standard_Real Umin,Vmin,Umax,Vmax,Xrp,Yrp,Dxv,Dyv ;
Visual3d_ViewMapping VMD = MyView->ViewMappingDefault() ;
- Viewer_BadValue_Raise_if( Coef <= 0. ,"V3d_View::SetScale, bad coefficient");
+ V3d_BadValue_Raise_if( Coef <= 0. ,"V3d_View::SetScale, bad coefficient");
VMD.WindowLimit(Umin,Vmin,Umax,Vmax) ;
Dxv = Abs(Umax - Umin) ; Dyv = Abs(Vmax - Vmin) ;
{
Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,U,V,W ;
Standard_Real Umin,Vmin,Wmin,Umax,Vmax,Wmax ;
- Viewer_BadValue_Raise_if( Sx <= 0. || Sy <= 0. || Sz <= 0.,"V3d_View::SetAxialScale, bad coefficient");
+ V3d_BadValue_Raise_if( Sx <= 0. || Sy <= 0. || Sz <= 0.,"V3d_View::SetAxialScale, bad coefficient");
MyViewOrientation.SetAxialScale( Sx, Sy, Sz );
Aspect_TypeOfUpdate updateMode = MyView->ViewManager()->UpdateMode();
{
Standard_Real Umin,Vmin,Umax,Vmax,Xrp,Yrp,Zrp;
- Viewer_BadValue_Raise_if ( ZNear <= 0. || ZFar <= 0. || ZNear >= ZFar, "V3d_View::SetVolume, bad distances");
+ V3d_BadValue_Raise_if ( ZNear <= 0. || ZFar <= 0. || ZNear >= ZFar, "V3d_View::SetVolume, bad distances");
MyProjReferencePoint = MyViewMapping.ProjectionReferencePoint() ;
MyProjReferencePoint.Coord(Xrp,Yrp,Zrp) ;
Standard_Real dzoom = fabs(d) / 100.0 + 1.0;
dzoom = (d > 0) ? dzoom : 1.0 / dzoom;
- Viewer_BadValue_Raise_if( dzoom <= 0.,"V3d_View::ZoomAtPoint, bad coefficient");
+ V3d_BadValue_Raise_if( dzoom <= 0.,"V3d_View::ZoomAtPoint, bad coefficient");
Standard_Real Umin,Vmin,Umax,Vmax;
MyViewMapping.WindowLimit(Umin,Vmin,Umax,Vmax);
Standard_Integer Xpixel,Ypixel;
//Standard_Integer Xleft,Yup,Xright,Ylow ;
- Viewer_BadValue_Raise_if( (Xmin == Xmax) || (Ymin == Ymax) ,
+ V3d_BadValue_Raise_if( (Xmin == Xmax) || (Ymin == Ymax) ,
"V3d_View::FitAll, Window Size is NULL");
MyProjReferencePoint = MyViewMapping.ProjectionReferencePoint() ;
void V3d_View::Plot()
{
- Viewer_BadValue_Raise_if( !MyPlotter.IsNull(), "view has no plotter");
+ V3d_BadValue_Raise_if( !MyPlotter.IsNull(), "view has no plotter");
MyView->Plot(MyPlotter);
}
cView->ptrFBO = aPrevFBOPtr;
return isSuccess;
}
+
+void V3d_View::ImmediateUpdate() const
+{
+ if (myImmediateUpdate) Update();
+}
+
+Standard_Boolean V3d_View::SetImmediateUpdate (const Standard_Boolean theImmediateUpdate)
+{
+ Standard_Boolean aPreviousMode = myImmediateUpdate;
+ myImmediateUpdate = theImmediateUpdate;
+ return aPreviousMode;
+}
void V3d_View::SetZClippingWidth(const Standard_Real Width) {
Standard_Real Front,Back,Depth ;
- Viewer_BadValue_Raise_if( Width <= 0.,"V3d_View::SetZClippingWidth, bad width");
+ V3d_BadValue_Raise_if( Width <= 0.,"V3d_View::SetZClippingWidth, bad width");
Front = MyViewContext.ZClippingFrontPlane() ;
Back = MyViewContext.ZClippingBackPlane() ;
void V3d_View::SetZCueingWidth(const Standard_Real Width) {
Standard_Real Front,Back,Depth ;
- Viewer_BadValue_Raise_if( Width <= 0.,"V3d_View::SetZCueingWidth, bad width");
+ V3d_BadValue_Raise_if( Width <= 0.,"V3d_View::SetZCueingWidth, bad width");
Front = MyViewContext.DepthCueingFrontPlane() ;
Back = MyViewContext.DepthCueingBackPlane() ;
if( !MyActiveLights.Contains(TheLight)){
#ifdef GER61454
- Viewer_BadValue_Raise_if( MyActiveLights.Extent() >= MyView->LightLimit(),
+ V3d_BadValue_Raise_if( MyActiveLights.Extent() >= MyView->LightLimit(),
"too many lights");
#else
-// Viewer_BadValue_Raise_if( MyActiveLights.Extent() >= Visual3d_Light::Limit(),
+// V3d_BadValue_Raise_if( MyActiveLights.Extent() >= Visual3d_Light::Limit(),
// "too many lights");
#endif
MyActiveLights.Append(TheLight) ;
#ifdef GER61454
if( !MyActivePlanes.Contains(ThePlane)) {
- Viewer_BadValue_Raise_if( MyActivePlanes.Extent() >= MyView->PlaneLimit(), "too many planes");
+ V3d_BadValue_Raise_if( MyActivePlanes.Extent() >= MyView->PlaneLimit(), "too many planes");
MyActivePlanes.Append(ThePlane) ;
}
MyViewContext.SetClipPlaneOn(ThePlane->Plane()) ;
MyView->SetContext(MyViewContext);
#else //GER61454
if( !MyActivePlanes.Contains(ThePlane)) {
- Viewer_BadValue_Raise_if( MyActivePlanes.Extent() >= Visual3d_ClipPlane::Limit(), "too many planes");
+ V3d_BadValue_Raise_if( MyActivePlanes.Extent() >= Visual3d_ClipPlane::Limit(), "too many planes");
MyActivePlanes.Append(ThePlane) ;
MyViewContext.SetClipPlaneOn(ThePlane->Plane()) ;
#ifdef GER61454
for(MyViewer->InitDefinedPlanes();MyViewer->MoreDefinedPlanes();MyViewer->NextDefinedPlanes()) {
if(!MyActivePlanes.Contains(MyViewer->DefinedPlane())) {
- Viewer_BadValue_Raise_if( MyActivePlanes.Extent() >= MyView->PlaneLimit(), "too many planes");
+ V3d_BadValue_Raise_if( MyActivePlanes.Extent() >= MyView->PlaneLimit(), "too many planes");
MyActivePlanes.Append(MyViewer->DefinedPlane());
}
MyViewContext.SetClipPlaneOn(MyViewer->DefinedPlane()->Plane());
#else //GER61454
for(MyViewer->InitDefinedPlanes();MyViewer->MoreDefinedPlanes();MyViewer->NextDefinedPlanes()) {
if(!MyActivePlanes.Contains(MyViewer->DefinedPlane())) {
- Viewer_BadValue_Raise_if( MyActivePlanes.Extent() >= Visual3d_ClipPlane::Limit(),
+ V3d_BadValue_Raise_if( MyActivePlanes.Extent() >= Visual3d_ClipPlane::Limit(),
"too many planes");
MyActivePlanes.Append(MyViewer->DefinedPlane());
MyViewContext.SetClipPlaneOn(MyViewer->DefinedPlane()->Plane());
MyViewReferenceUp = MyViewOrientation.ViewReferenceUp() ;
if (!ScreenAxis(MyViewReferencePlane,MyViewReferenceUp,
MyXscreenAxis,MyYscreenAxis,MyZscreenAxis))
- Viewer_BadValue::Raise ("V3d_View::Move, alignment of Eye,At,Up");
+ V3d_BadValue::Raise ("V3d_View::Move, alignment of Eye,At,Up");
}
MyXscreenAxis.Coord(XX,XY,XZ) ;
MyYscreenAxis.Coord(YX,YY,YZ) ;
Yeye = Zrp*Ypn + Dx*XY + Dy*YY + Dz*ZY ;
Zeye = Zrp*Zpn + Dx*XZ + Dy*YZ + Dz*ZZ ;
Zrp = sqrt( Xeye*Xeye + Yeye*Yeye + Zeye*Zeye ) ;
- Viewer_BadValue_Raise_if( Zrp <= 0. ,"V3d_View::Move:: Eye,At are Confused");
+ V3d_BadValue_Raise_if( Zrp <= 0. ,"V3d_View::Move:: Eye,At are Confused");
#ifdef DEB
Standard_Real focale =
#endif
Yeye = Zrp*Ypn + Vy*Length ;
Zeye = Zrp*Zpn + Vz*Length ;
Zrp = sqrt( Xeye*Xeye + Yeye*Yeye + Zeye*Zeye ) ;
- Viewer_BadValue_Raise_if( Zrp <= 0. ,"V3d_View::Move:: Eye,At are Confused");
+ V3d_BadValue_Raise_if( Zrp <= 0. ,"V3d_View::Move:: Eye,At are Confused");
#ifdef DEB
Standard_Real focale =
MyProjReferencePoint = MyViewMapping.ProjectionReferencePoint();
if (!ScreenAxis(MyViewReferencePlane,MyViewReferenceUp,
MyXscreenAxis,MyYscreenAxis,MyZscreenAxis))
- Viewer_BadValue::Raise ("V3d_View::Translate, alignment of Eye,At,Up");
+ V3d_BadValue::Raise ("V3d_View::Translate, alignment of Eye,At,Up");
}
MyXscreenAxis.Coord(XX,XY,XZ) ;
MyYscreenAxis.Coord(YX,YY,YZ) ;
-- Add ShowGridEcho() private method
-- SAV - 26/11/02 -> Add new field to store grid echo aspect
-class Viewer from V3d
+class Viewer from V3d inherits TShared from MMgt
---Version:
---References:
-inherits
-
- Viewer from Viewer
-
uses
GraphicDriver from Graphic3d,
raises
- BadValue from Viewer
+ BadValue from V3d
is
- Create ( theDriver : GraphicDriver from Graphic3d;
- aName : ExtString from Standard;
- aDomain : CString from Standard = "";
- ViewSize : Length from Quantity = 1000.0 ;
- ViewProj : TypeOfOrientation from V3d= V3d_XposYnegZpos ;
- ViewBackground : NameOfColor from Quantity = Quantity_NOC_GRAY30;
- Visualization : TypeOfVisualization from V3d = V3d_ZBUFFER;
- ShadingModel : TypeOfShadingModel from V3d = V3d_GOURAUD ;
- UpdateMode : TypeOfUpdate from V3d = V3d_WAIT;
- ComputedMode : Boolean from Standard = Standard_True;
- DefaultComputedMode: Boolean from Standard = Standard_True;
- SurfaceDetail : TypeOfSurfaceDetail from V3d = V3d_TEX_NONE)
+ Create (theDriver : GraphicDriver from Graphic3d;
+ theName : ExtString from Standard;
+ theDomain : CString from Standard = "";
+ theViewSize : Length from Quantity = 1000.0 ;
+ theViewProj : TypeOfOrientation from V3d= V3d_XposYnegZpos ;
+ theViewBackground : NameOfColor from Quantity = Quantity_NOC_GRAY30;
+ theVisualization : TypeOfVisualization from V3d = V3d_ZBUFFER;
+ theShadingModel : TypeOfShadingModel from V3d = V3d_GOURAUD ;
+ theUpdateMode : TypeOfUpdate from V3d = V3d_WAIT;
+ theComputedMode : Boolean from Standard = Standard_True;
+ theDefaultComputedMode: Boolean from Standard = Standard_True;
+ theSurfaceDetail : TypeOfSurfaceDetail from V3d = V3d_TEX_NONE)
returns mutable Viewer from V3d
---Purpose: Create a Viewer with the given graphic driver and the given parameters or
-- with their default values.
-- Currently creating of more than 100 viewer instances
-- is not supported and leads to an exception.
-- This limitation might be addressed in some future OCCT releases.
- raises BadValue from Viewer ;
+ raises BadValue from V3d ;
---Purpose: If the size of the view is <= 0
-- if ComputedMode is false, only the degenerate mode will be used.
--
---Purpose: Activates a particular view in the Viewer .
-- Must be call if the Window attached to the view
-- has been Deiconified .
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the view is not mapped on the window.
SetViewOff (me:mutable);
---Purpose: Deactivates a particular view in the Viewer.
-- Must be call if the Window attached to the view
-- has been Iconified .
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the view is not mapped on the window.
- Update (me:mutable ) is redefined static;
+ Update (me:mutable ) is static;
---Level: Public
---Purpose: Deprecated, Redraw() should be used instead.
---Level: Public
---Purpose: Gives a default size for the creation of views of
-- the viewer.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If the size of the view is <= 0
SetDefaultViewProj (me:mutable; Orientation : TypeOfOrientation );
SetLightOn(me:mutable; MyLight : Light from V3d )
---Level: Public
---Purpose: Activates MyLight in the viewer.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If No More Light can be activated in MyViewer .
SetLightOn(me:mutable)
---Level: Public
---Purpose: Activates all the lights defined in this viewer.
- raises BadValue from Viewer;
+ raises BadValue from V3d;
-- If No More Light can be activated in MyViewer .
SetLightOff(me:mutable; MyLight : Light from V3d );
-- from lowest layer to highest ( foreground ). The first layer ID
-- in sequence is the default layer that can't be removed.
+ Driver(me) returns mutable GraphicDriver from Graphic3d
+ is static;
+ ---C++: return const &
+
+ NextName(me) returns ExtString from Standard
+ is static;
+
+ Domain(me) returns CString from Standard
+ is static;
+
+ IncrCount(me:mutable) is static protected;
+
fields
+ myNextCount: Integer from Standard;
+ myDriver: GraphicDriver from Graphic3d;
+ myName: ExtendedString from TCollection;
+ myDomain: AsciiString from TCollection;
+
MyViewer: ViewManager from Visual3d ;
MyDefinedViews: ListOfTransient from V3d;
MyActiveViews: ListOfTransient from V3d;
#include <Visual3d_Light.hxx>
#include <V3d_Viewer.ixx>
#include <V3d_View.hxx>
-#include <Viewer_BadValue.hxx>
+#include <V3d_BadValue.hxx>
#include <V3d_OrthographicView.hxx>
#include <V3d_PerspectiveView.hxx>
/*----------------------------------------------------------------------*/
//-Constructor:
-V3d_Viewer::V3d_Viewer(const Handle(Graphic3d_GraphicDriver)& theDriver , const Standard_ExtString aName, const Standard_CString aDomain,const Standard_Real ViewSize , const V3d_TypeOfOrientation ViewProj , const Quantity_NameOfColor ViewBackground , const V3d_TypeOfVisualization Visualization , const V3d_TypeOfShadingModel ShadingModel , const V3d_TypeOfUpdate UpdateMode, const Standard_Boolean ComputedMode , const Standard_Boolean DefaultComputedMode , const V3d_TypeOfSurfaceDetail SurfaceDetail )
-:Viewer_Viewer(theDriver,aName,aDomain,-1),
+V3d_Viewer::V3d_Viewer (const Handle(Graphic3d_GraphicDriver)& theDriver,
+ const Standard_ExtString theName,
+ const Standard_CString theDomain,
+ const Standard_Real theViewSize,
+ const V3d_TypeOfOrientation theViewProj,
+ const Quantity_NameOfColor theViewBackground,
+ const V3d_TypeOfVisualization theVisualization,
+ const V3d_TypeOfShadingModel theShadingModel,
+ const V3d_TypeOfUpdate theUpdateMode,
+ const Standard_Boolean theComputedMode,
+ const Standard_Boolean theDefaultComputedMode,
+ const V3d_TypeOfSurfaceDetail theSurfaceDetail)
+:myNextCount (-1),
+myDriver (theDriver),
+myName (TCollection_ExtendedString (theName)),
+myDomain (TCollection_AsciiString (theDomain)),
MyDefinedViews(),
MyActiveViews(),
MyDefinedLights(),
myActiveLightsIterator(),
myDefinedLightsIterator(),
myDefinedPlanesIterator(),
-myComputedMode(ComputedMode),
-myDefaultComputedMode(DefaultComputedMode),
-myPrivilegedPlane(gp_Ax3(gp_Pnt(0.,0.,0),gp_Dir(0.,0.,1.),gp_Dir(1.,0.,0.))),
-myDisplayPlane(Standard_False),
-myDisplayPlaneLength(ViewSize)
+myComputedMode (theComputedMode),
+myDefaultComputedMode (theDefaultComputedMode),
+myPrivilegedPlane (gp_Ax3 (gp_Pnt (0.,0.,0), gp_Dir (0.,0.,1.), gp_Dir (1.,0.,0.))),
+myDisplayPlane (Standard_False),
+myDisplayPlaneLength (theViewSize)
#ifdef IMP240100
-,myGridEcho(Standard_True),myGridEchoStructure(),myGridEchoGroup()
+,myGridEcho (Standard_True), myGridEchoStructure(), myGridEchoGroup()
#endif
{
-
- MyViewer = new Visual3d_ViewManager(theDriver) ;
+ MyViewer = new Visual3d_ViewManager (theDriver);
// san (16/09/2010): It has been decided to turn depth test ON
// by default, as this is important for new font rendering
// (without it, there are numerous texture rendering artefacts)
MyViewer->SetZBufferAuto (Standard_False);
- SetUpdateMode( UpdateMode ) ;
- SetDefaultViewSize(ViewSize) ;
- SetDefaultViewProj(ViewProj) ;
- SetDefaultBackgroundColor(ViewBackground) ;
- SetDefaultVisualization(Visualization) ;
- SetDefaultShadingModel(ShadingModel) ;
- SetDefaultSurfaceDetail(SurfaceDetail) ;
- SetDefaultAngle(M_PI / 2.);
- SetDefaultTypeOfView(V3d_ORTHOGRAPHIC);
+ SetUpdateMode (theUpdateMode);
+ SetDefaultViewSize (theViewSize);
+ SetDefaultViewProj (theViewProj);
+ SetDefaultBackgroundColor (theViewBackground);
+ SetDefaultVisualization (theVisualization);
+ SetDefaultShadingModel (theShadingModel);
+ SetDefaultSurfaceDetail (theSurfaceDetail);
+ SetDefaultAngle (M_PI / 2.);
+ SetDefaultTypeOfView (V3d_ORTHOGRAPHIC);
Quantity_Color Color1 (Quantity_NOC_GRAY50);
Quantity_Color Color2 (Quantity_NOC_GRAY70);
// Quantity_Color White (Quantity_NOC_WHITE);
- myRGrid = new V3d_RectangularGrid(this,Color1,Color2);
- myCGrid = new V3d_CircularGrid(this,Color1,Color2);
+ myRGrid = new V3d_RectangularGrid (this, Color1, Color2);
+ myCGrid = new V3d_CircularGrid (this, Color1, Color2);
myGridType = Aspect_GT_Rectangular;
}
void V3d_Viewer::SetDefaultViewSize(const Standard_Real Size) {
- Viewer_BadValue_Raise_if( Size <= 0. ,"V3d_Viewer::SetDefaultViewSize, bad size");
+ V3d_BadValue_Raise_if( Size <= 0. ,"V3d_Viewer::SetDefaultViewSize, bad size");
MyViewSize = Size ;
}
{
MyViewer->GetAllZLayers (theLayerSeq);
}
+
+//=======================================================================
+//function : Domain
+//purpose :
+//=======================================================================
+
+Standard_CString V3d_Viewer::Domain() const
+{
+ return myDomain.ToCString();
+}
+
+//=======================================================================
+//function : Driver
+//purpose :
+//=======================================================================
+
+const Handle(Graphic3d_GraphicDriver)& V3d_Viewer::Driver() const
+{
+ return myDriver;
+}
+
+//=======================================================================
+//function : NextName
+//purpose :
+//=======================================================================
+
+Standard_ExtString V3d_Viewer::NextName() const
+{
+ TCollection_ExtendedString aNextName = TCollection_ExtendedString (myName.ToExtString());
+ aNextName.AssignCat (TCollection_ExtendedString (myNextCount));
+
+ return aNextName.ToExtString();
+}
+
+//=======================================================================
+//function : IncrCount
+//purpose :
+//=======================================================================
+
+void V3d_Viewer::IncrCount()
+{
+ myNextCount++;
+}
\ No newline at end of file
#include <V3d_DirectionalLight.hxx>
#include <V3d_PositionalLight.hxx>
#include <V3d_AmbientLight.hxx>
-#include <Viewer_BadValue.hxx>
+#include <V3d_BadValue.hxx>
#include <V3d.hxx>
void V3d_Viewer::UpdateLights() {
if(!MyActiveLights.Contains(TheLight)) {
-// Viewer_BadValue_Raise_if( MyActiveLights.Extent() >= Visual3d_Light::Limit(),
+// V3d_BadValue_Raise_if( MyActiveLights.Extent() >= Visual3d_Light::Limit(),
// "too many lights");
MyActiveLights.Append(TheLight) ;
}
for (InitDefinedLights();MoreDefinedLights();NextDefinedLights()) {
if(!MyActiveLights.Contains(DefinedLight())) {
-// Viewer_BadValue_Raise_if( MyActiveLights.Extent() >= Visual3d_Light::Limit(),
+// V3d_BadValue_Raise_if( MyActiveLights.Extent() >= Visual3d_Light::Limit(),
// "too many lights");
MyActiveLights.Append(DefinedLight());
for (InitActiveViews();MoreActiveViews();NextActiveViews()) {
+++ /dev/null
--- Created on: 1995-04-06
--- Created by: Jean-Louis Frenkel
--- Copyright (c) 1995-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- 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.
-
-
-package Viewer
-
-uses MMgt,TCollection,Graphic3d,Quantity
-
-is
-
- deferred class Viewer;
- deferred class View;
-
- exception BadValue inherits OutOfRange;
-
-end Viewer;
+++ /dev/null
--- Created on: 1996-03-07
--- Created by: Jean-Louis Frenkel
--- Copyright (c) 1996-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- 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.
-
-
-deferred class View from Viewer inherits TShared from MMgt
- ---Purpose: This class defines a view.
-uses
- Length from Quantity,Factor from Quantity
-raises
- BadValue from Viewer
-is
- Initialize;
-
- Update(me)
- ---Purpose: Clears the window and redraws all primitives.
- is deferred;
-
-
- SetImmediateUpdate(me: mutable; onoff: Boolean from Standard)
- ---Purpose: sets the immediate update mode and returns the previous one.
- returns Boolean from Standard;
-
- ImmediateUpdate(me)
- ---Purpose:
- is static protected;
-
- WindowFit(me: mutable ; Xmin, Ymin, Xmax, Ymax : Integer)
- ---Purpose: Centres the defined pixel window defined by the
- -- minimum and maximum pixels Xmin, Ymin, Xmax,
- -- Ymax so that it occupies the largest possible space
- -- while maintaining the initial height/width ratio.
- -- Exceptions
- -- Viewer_BadValue if the size of the defined
- -- projection window is equal to 0.
- raises BadValue from Viewer
- is deferred;
-
- Place (me:mutable; x,y: Integer from Standard;
- aZoomFactor: Factor from Quantity = 1)
- ---Purpose: Sets the center of the object space defined by x, y
- -- and the zoom factor aZoomFactor. The view is updated.
- is deferred;
-
-fields
-
- myImmediateUpdate: Boolean from Standard is protected;
-
-
-end View from Viewer;
+++ /dev/null
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// 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.
-
-#include <Viewer_View.ixx>
-
-Viewer_View::Viewer_View():myImmediateUpdate (Standard_True) {}
-
-void Viewer_View::ImmediateUpdate() const {
- if (myImmediateUpdate) Update();
-}
-
-Standard_Boolean Viewer_View::SetImmediateUpdate(const Standard_Boolean onoff) {
- Standard_Boolean p = myImmediateUpdate;
- myImmediateUpdate = onoff;
- return p;
-}
+++ /dev/null
--- Created on: 1995-04-06
--- Created by: Jean-Louis Frenkel
--- Copyright (c) 1995-1999 Matra Datavision
--- Copyright (c) 1999-2012 OPEN CASCADE SAS
---
--- 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.
-
-
-deferred class Viewer from Viewer inherits TShared from MMgt
-
-uses
- AsciiString,ExtendedString from TCollection,
- GraphicDriver from Graphic3d
-
-is
- Initialize( aDriver: GraphicDriver from Graphic3d;
- aName: ExtString from Standard;
- aDomain: CString from Standard;
- aNextCount: Integer from Standard);
-
- Update(me: mutable) is deferred;
-
-
- Driver(me) returns mutable GraphicDriver from Graphic3d
- is static;
- ---C++: return const &
-
- NextName(me) returns ExtString from Standard
- is static;
-
- Domain(me) returns CString from Standard
- is static;
-
- IncrCount(me:mutable) is static protected;
-
-fields
- myNextCount: Integer from Standard;
- myDomain: AsciiString from TCollection;
- myName: ExtendedString from TCollection;
- myDriver: GraphicDriver from Graphic3d;
-end Viewer from Viewer;
+++ /dev/null
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
-//
-// 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 27/12/98 : FMN ; PERF: OPTIMISATION LOADER (LOPTIM)
-
-#include <Viewer_Viewer.ixx>
-
-
-#define LOPTIM
-#ifndef LOPTIM
-static TCollection_ExtendedString nm;
-#else
-static TCollection_ExtendedString& _nm() {
- static TCollection_ExtendedString nm("");
-return nm;
-}
-#define nm _nm()
-#endif // LOPTIM
-
-Viewer_Viewer::Viewer_Viewer(const Handle(Graphic3d_GraphicDriver)& theDriver,
- const Standard_ExtString aName,
- const Standard_CString aDomain,
- const Standard_Integer aNextCount)
-:myNextCount(aNextCount),
-myDomain(TCollection_AsciiString(aDomain)),
-myName(TCollection_ExtendedString(aName)),
-myDriver(theDriver)
-{}
-
-Standard_CString Viewer_Viewer::Domain() const {
- return myDomain.ToCString();
-}
-const Handle(Graphic3d_GraphicDriver)& Viewer_Viewer::Driver() const {
- return myDriver;
-}
-
-Standard_ExtString Viewer_Viewer::NextName () const {
- nm = TCollection_ExtendedString(myName.ToExtString());
- nm.AssignCat(TCollection_ExtendedString(myNextCount));
-
- return nm.ToExtString();
-}
-void Viewer_Viewer::IncrCount() {
- myNextCount++;
-}
}
// Begin rendering
- Handle(Aspect_GraphicDriver) agd = AView->GraphicDriver ();
-
- theGraphicDriver = *(Handle(Graphic3d_GraphicDriver) *) &agd;
+ theGraphicDriver = AView->GraphicDriver();
if (theGraphicDriver->BeginImmediatMode
(theCView, UnderCLayer, OverCLayer, DoubleBuffer, RetainMode))
OverCLayer = AView->OverLayer()->CLayer();
theCView.ptrOverLayer = (CALL_DEF_LAYER *) &OverCLayer;
}
- Handle(Aspect_GraphicDriver) agd = AView->GraphicDriver ();
-
- theGraphicDriver = *(Handle(Graphic3d_GraphicDriver) *) &agd;
+ theGraphicDriver = AView->GraphicDriver();
theGraphicDriver->ClearImmediatMode (theCView, aFlush);
}
OverCLayer = AView->OverLayer()->CLayer();
theCView.ptrOverLayer = (CALL_DEF_LAYER *) &OverCLayer;
}
- Handle(Aspect_GraphicDriver) agd = AView->GraphicDriver ();
- theGraphicDriver = *(Handle(Graphic3d_GraphicDriver) *) &agd;
+ theGraphicDriver = AView->GraphicDriver ();
if (theGraphicDriver->BeginAddMode (theCView))
{
Background from Aspect,
GradientBackground from Aspect,
- GraphicDriver from Aspect,
Window from Aspect,
TypeOfUpdate from Aspect,
TypeOfHighlightMethod from Aspect,
---Category: Private methods
GraphicDriver ( me )
- returns GraphicDriver from Aspect
+ returns GraphicDriver from Graphic3d
is static;
---Level: Internal
---Purpose: Returns the associated GraphicDriver.
}
-const Handle(Aspect_GraphicDriver)& Visual3d_View::GraphicDriver () const {
+const Handle(Graphic3d_GraphicDriver)& Visual3d_View::GraphicDriver () const {
return MyGraphicDriver;