0024157: Parallelization of assembly part of BO
[occt.git] / src / Vrml / Vrml_PerspectiveCamera.cdl
1 -- Created on: 1997-02-12
2 -- Created by: Alexander BRIVIN
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22
23 class PerspectiveCamera from Vrml 
24
25         ---Purpose: specifies a PerspectiveCamera node of VRML specifying properties of cameras. 
26         --  A perspective camera defines a perspective projection from a viewpoint. The viewing
27         --  volume for a perspective camera is a truncated right pyramid. 
28 uses
29  
30      Vec         from gp, 
31      SFRotation  from  Vrml
32 is
33                                                     --  defaults  :
34     Create  returns  PerspectiveCamera from Vrml;   --  myPosition(0 0 1) Camera looks along the negative Z-axis
35                                                     --  myOrientation(0 0 1 0)
36                                                     --  myFocalDistance(5)
37                                                     --  myHeightAngle(0.785398)
38     Create  ( aPosition      :  Vec         from  gp; 
39               aOrientation   :  SFRotation  from  Vrml; 
40               aFocalDistance :  Real        from  Standard; 
41               aHeightAngle   :  Real        from  Standard ) 
42         returns  PerspectiveCamera from Vrml; 
43
44     SetPosition ( me : in out;  aPosition : Vec  from  gp );
45     Position ( me  )  returns Vec  from  gp;
46
47     SetOrientation ( me : in out;  aOrientation : SFRotation  from  Vrml );
48     Orientation ( me )  returns SFRotation  from  Vrml;
49
50     SetFocalDistance ( me : in out;  aFocalDistance : Real  from  Standard );
51     FocalDistance ( me )  returns Real  from  Standard;
52
53     SetAngle ( me : in out;  aHeightAngle : Real  from  Standard );
54     Angle ( me )  returns  Real  from  Standard;
55
56     Print  ( me;  anOStream: in out OStream from Standard) returns OStream from Standard;
57     ---C++:  return  & 
58
59 fields
60  
61     myPosition      :  Vec         from  gp;       -- Location of viewpoint
62     myOrientation   :  SFRotation  from  Vrml;     -- Orientation (rotation with respect to (0,0,-1) vector)     
63     myFocalDistance :  Real        from  Standard; -- Distance from viewpoint to point of focus.
64     myHeightAngle   :  Real        from  Standard; -- Angle (in radians) of field
65                                                    -- of  view, in  height  direction
66 end PerspectiveCamera;