1 -- File: Law_Composite.cdl
2 -- Created: Fri Mar 29 10:39:22 1996
3 -- Author: Laurent BOURESCHE
5 ---Copyright: Matra Datavision 1996
8 class Composite from Law inherits Function from Law
10 ---Purpose: Loi composite constituee d une liste de lois de
11 -- ranges consecutifs.
12 -- Cette implementation un peu lourde permet de reunir
13 -- en une seule loi des portions de loi construites de
14 -- facon independantes (par exemple en interactif) et
15 -- de lancer le walking d un coup a l echelle d une
17 -- CET OBJET REPOND DONC A UN PROBLEME D IMPLEMENTATION
18 -- SPECIFIQUE AUX CONGES!!!
22 Array1OfReal from TColStd,
25 raises OutOfRange from Standard
29 Create returns mutable Composite from Law;
30 ---Purpose: Construct an empty Law
32 Create (First, Last : Real;
34 ---Purpose: Construct an empty, trimed Law
35 returns mutable Composite from Law;
37 Continuity(me) returns Shape from GeomAbs
40 NbIntervals(me; S : Shape from GeomAbs) returns Integer
41 ---Purpose: Returns the number of intervals for continuity
42 -- <S>. May be one if Continuity(me) >= <S>
45 Intervals(me; T : in out Array1OfReal from TColStd;
46 S : Shape from GeomAbs)
47 ---Purpose: Stores in <T> the parameters bounding the intervals
50 -- The array must provide enough room to accomodate
51 -- for the parameters. i.e. T.Length() > NbIntervals()
53 OutOfRange from Standard
56 Value(me: mutable; X: Real from Standard)
57 ---Purpose: Returns the value at parameter X.
58 returns Real from Standard;
60 D1(me: mutable; X: Real from Standard; F,D: out Real from Standard);
61 ---Purpose: Returns the value and the first derivative at parameter X.
63 D2(me: mutable; X: Real from Standard;
64 F,D, D2: out Real from Standard);
65 ---Purpose: Returns the value, first and second derivatives
68 Trim(me; PFirst, PLast, Tol :Real from Standard) returns Function
70 ---Purpose: Returns a law equivalent of <me> between
71 -- parameters <First> and <Last>. <Tol> is used to
72 -- test for 3d points confusion.
73 -- It is usfule to determines the derivatives
74 -- in these values <First> and <Last> if
79 Bounds(me: mutable; PFirst,PLast : out Real from Standard);
80 ---Purpose: Returns the parametric bounds of the function.
82 Prepare(me: mutable; W : in out Real from Standard)
83 ---Purpose: Set the current function.
86 ChangeElementaryLaw(me: mutable; W : Real from Standard)
88 returns mutable Function from Law
89 ---Purpose: Returns the elementary function of the composite used
90 -- to compute at parameter W.
93 ChangeLaws(me : mutable)
99 returns Boolean from Standard
102 SetPeriodic(me : mutable)
107 first : Real from Standard;
108 last : Real from Standard;
109 curfunc : Function from Law;
110 funclist : Laws from Law;
111 periodic : Boolean from Standard;
112 TFirst : Real from Standard;
113 TLast : Real from Standard;
114 PTol : Real from Standard;