42cf5bc1 |
1 | // Created on: 1992-11-13 |
2 | // Created by: GG |
3 | // Copyright (c) 1992-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _V3d_HeaderFile |
18 | #define _V3d_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <V3d_TypeOfOrientation.hxx> |
25 | #include <V3d_Coordinate.hxx> |
26 | #include <V3d_Parameter.hxx> |
27 | #include <Quantity_PlaneAngle.hxx> |
28 | #include <Quantity_Length.hxx> |
29 | class Graphic3d_Vector; |
30 | class Graphic3d_Group; |
31 | class V3d_View; |
32 | class V3d_Viewer; |
33 | class V3d_Viewer; |
34 | class V3d_View; |
42cf5bc1 |
35 | class V3d_Light; |
36 | class V3d_AmbientLight; |
37 | class V3d_PositionLight; |
38 | class V3d_PositionalLight; |
39 | class V3d_DirectionalLight; |
40 | class V3d_SpotLight; |
41 | class V3d_RectangularGrid; |
42 | class V3d_CircularGrid; |
43 | class V3d_ColorScale; |
44 | class V3d_ColorScaleLayerItem; |
45 | |
46 | |
47 | //! This package contains the set of commands and services |
48 | //! of the 3D Viewer. It provides a set of high level commands |
c357e426 |
49 | //! to control the views and viewing modes. |
42cf5bc1 |
50 | class V3d |
51 | { |
52 | public: |
53 | |
54 | DEFINE_STANDARD_ALLOC |
55 | |
56 | |
57 | //! Determines the orientation vector corresponding |
58 | //! to the predefined orientation type. |
59 | Standard_EXPORT static Graphic3d_Vector GetProjAxis (const V3d_TypeOfOrientation Orientation); |
60 | |
61 | //! Compute the graphic structure of arrow. |
62 | //! X0,Y0,Z0 : coordinate of the arrow. |
63 | //! DX,DY,DZ : Direction of the arrow. |
64 | //! Alpha : Angle of arrow. |
65 | //! Lng : Length of arrow. |
66 | Standard_EXPORT static void ArrowOfRadius (const Handle(Graphic3d_Group)& garrow, const V3d_Coordinate X0, const V3d_Coordinate Y0, const V3d_Coordinate Z0, const V3d_Parameter DX, const V3d_Parameter DY, const V3d_Parameter DZ, const Quantity_PlaneAngle Alpha, const V3d_Parameter Lng); |
67 | |
68 | //! Compute the graphic structure of circle. |
69 | //! X0,Y0,Z0 : Center of circle. |
70 | //! VX,VY,VZ : Axis of circle. |
71 | //! Radius : Radius of circle. |
72 | Standard_EXPORT static void CircleInPlane (const Handle(Graphic3d_Group)& gcircle, const V3d_Coordinate X0, const V3d_Coordinate Y0, const V3d_Coordinate Z0, const V3d_Parameter VX, const V3d_Parameter VY, const V3d_Parameter VZ, const V3d_Parameter Radius); |
73 | |
74 | Standard_EXPORT static void SwitchViewsinWindow (const Handle(V3d_View)& aPreviousView, const Handle(V3d_View)& aNextView); |
75 | |
76 | //! test. |
77 | Standard_EXPORT static void DrawSphere (const Handle(V3d_Viewer)& aViewer, const Quantity_Length aRadius = 1000); |
78 | |
79 | //! test. |
80 | Standard_EXPORT static void PickGrid (const Handle(V3d_Viewer)& aViewer, const Quantity_Length aRadius = 1000); |
81 | |
82 | //! test. |
83 | Standard_EXPORT static void SetPlane (const Handle(V3d_Viewer)& aViewer, const Quantity_Length x1, const Quantity_Length y1, const Quantity_Length z1, const Quantity_Length x2, const Quantity_Length y2, const Quantity_Length z2); |
84 | |
85 | |
86 | |
87 | |
88 | protected: |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | private: |
95 | |
96 | |
97 | |
98 | |
99 | friend class V3d_Viewer; |
100 | friend class V3d_View; |
42cf5bc1 |
101 | friend class V3d_Light; |
102 | friend class V3d_AmbientLight; |
103 | friend class V3d_PositionLight; |
104 | friend class V3d_PositionalLight; |
105 | friend class V3d_DirectionalLight; |
106 | friend class V3d_SpotLight; |
107 | friend class V3d_RectangularGrid; |
108 | friend class V3d_CircularGrid; |
109 | friend class V3d_ColorScale; |
110 | friend class V3d_ColorScaleLayerItem; |
111 | |
112 | }; |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | |
119 | |
120 | #endif // _V3d_HeaderFile |