1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
-- File: Quadric.cdl
-- Created: Wed Jul 1 10:52:36 1992
-- Author: Laurent BUCHARD
-- <lbr@topsn3>
---Copyright: Matra Datavision 1992
class Quadric from IntAna
---Purpose: This class provides a description of Quadrics by their
-- Coefficients in natural coordinate system.
uses Ax3 from gp,
Cylinder from gp,
Cone from gp,
Sphere from gp,
Pln from gp
is
Create
---Purpose: Empty Constructor
returns Quadric from IntAna;
Create(P : Pln from gp)
---Purpose: Creates a Quadric from a Pln
returns Quadric from IntAna;
Create(Sph: Sphere from gp)
---Purpose: Creates a Quadric from a Sphere
returns Quadric from IntAna;
Create(Cyl: Cylinder from gp)
---Purpose: Creates a Quadric from a Cylinder
returns Quadric from IntAna;
Create(Cone: Cone from gp)
---Purpose: Creates a Quadric from a Cone
returns Quadric from IntAna;
SetQuadric(me: in out; P: Pln from gp)
---Purpose: Initializes the quadric with a Pln
is static;
SetQuadric(me: in out; Sph: Sphere from gp)
---Purpose: Initialize the quadric with a Sphere
is static;
SetQuadric(me: in out; Con: Cone from gp)
---Purpose: Initializes the quadric with a Cone
is static;
SetQuadric(me: in out; Cyl: Cylinder from gp)
---Purpose: Initializes the quadric with a Cylinder
is static;
Coefficients(me; xCXX,xCYY,xCZZ,xCXY
,xCXZ,xCYZ,xCX,xCY,xCZ,xCCte: out Real from Standard)
---Purpose: Returns the coefficients of the polynomial equation
-- which define the quadric:
-- xCXX x**2 + xCYY y**2 + xCZZ z**2
-- + 2 ( xCXY x y + xCXZ x z + xCYZ y z )
-- + 2 ( xCX x + xCY y + xCZ z )
-- + xCCte
is static;
NewCoefficients(me; xCXX,xCYY,xCZZ,xCXY,xCXZ
,xCYZ,xCX,xCY,xCZ,xCCte: in out Real from Standard;
Axis: Ax3 from gp)
---Purpose: Returns the coefficients of the polynomial equation
-- ( written in the natural coordinates system )
-- in the local coordinates system defined by Axis
is static;
fields
CXX : Real from Standard;
CYY : Real from Standard;
CZZ : Real from Standard;
CXY : Real from Standard;
CXZ : Real from Standard;
CYZ : Real from Standard;
CX : Real from Standard;
CY : Real from Standard;
CZ : Real from Standard;
CCte : Real from Standard;
end Quadric;
|