1 -- File: HLRAlgo_Projector.cdl
2 -- Created: Thu Mar 12 13:32:28 1992
3 -- Author: Christophe MARION
4 ---Copyright: Matra Datavision 1992
6 class Projector from HLRAlgo
7 ---Purpose: Implements a projector object.
8 -- This object is designed to be used in the
9 -- removal of hidden lines and is returned by the
10 -- Prs3d_Projector::Projector function.
11 -- You define the projection of the selected shape
12 -- by calling one of the following functions:
13 -- - HLRBRep_Algo::Projector, or
14 -- - HLRBRep_PolyAlgo::Projector
15 -- The choice depends on the algorithm, which you are using.
16 -- The parameters of the view are defined at the
17 -- time of construction of a Prs3d_Projector object.
20 Boolean from Standard,
30 NoSuchObject from Standard
33 Create returns Projector from HLRAlgo;
35 Create(CS : Ax2 from gp)
36 ---Purpose: Creates an axonometric projector. <CS> is the
37 -- viewing coordinate system.
38 returns Projector from HLRAlgo;
40 Create(CS : Ax2 from gp;
41 Focus : Real from Standard)
42 ---Purpose: Creates a perspective projector. <CS> is the
43 -- viewing coordinate system.
44 returns Projector from HLRAlgo;
46 Create(T : Trsf from gp;
47 Persp : Boolean from Standard;
48 Focus : Real from Standard)
49 ---Purpose: build a Projector with automatic minmax directions.
50 returns Projector from HLRAlgo;
52 Create(T : Trsf from gp;
53 Persp : Boolean from Standard;
54 Focus : Real from Standard;
55 v1,v2,v3 : Vec2d from gp)
56 ---Purpose: build a Projector with given minmax directions.
57 returns Projector from HLRAlgo;
61 Persp : Boolean from Standard;
62 Focus : Real from Standard)
65 Directions(me; D1 , D2 , D3 : out Vec2d from gp)
69 Scaled(me : in out; On : Boolean from Standard = Standard_False)
70 ---Purpose: to compute with the given scale and translation.
73 Perspective(me) returns Boolean
74 ---Purpose: Returns True if there is a perspective transformation.
78 Transformation(me) returns Trsf from gp
79 ---Purpose: Returns the active transformation.
80 ---C++: return const &
83 InvertedTransformation(me) returns Trsf from gp
84 ---Purpose: Returns the active inverted transformation.
86 ---C++: return const &
89 FullTransformation(me) returns Trsf from gp
90 ---Purpose: Returns the original transformation.
92 ---C++: return const &
95 Focus(me) returns Real from Standard
96 ---Purpose: Returns the focal length.
99 NoSuchObject from Standard -- if there is no perspective
102 Transform(me; D : in out Vec from gp)
106 Transform(me; Pnt : in out Pnt from gp)
110 Project(me; P : Pnt from gp;
111 Pout : out Pnt2d from gp)
112 ---Purpose: Transform and apply perspective if needed.
115 Project(me; P : Pnt from gp;
116 X,Y,Z : out Real from Standard)
117 ---Purpose: Transform and apply perspective if needed.
120 Project(me; P : Pnt from gp;
122 Pout : out Pnt2d from gp;
123 D1out : out Vec2d from gp)
124 ---Purpose: Transform and apply perspective if needed.
127 Shoot(me; X , Y : Real from Standard)
129 ---Purpose: return a line going through the eye towards the
133 SetDirection(me: in out)
137 myType : Integer from Standard;
139 myPersp : Boolean from Standard;
140 myFocus : Real from Standard;
141 myScaledTrsf : Trsf from gp;
142 myTrsf : Trsf from gp;
143 myInvTrsf : Trsf from gp;
144 myD1 : Vec2d from gp;
145 myD2 : Vec2d from gp;
146 myD3 : Vec2d from gp;