summaryrefslogtreecommitdiff
path: root/src/Select2D/Select2D_SensitiveCircle.cdl
blob: b64fde34ddc335cd84d211496ccb370ca06fbcf5 (plain)
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
-- File:	Select2D_SensitiveCircle.cdl
-- Created:	Mon Jan 30 16:13:58 1995
-- Author:	Mister rmi
--		<rmi@photon>
---Copyright:	 Matra Datavision 1995



class SensitiveCircle from Select2D 
inherits SensitiveEntity from Select2D

	---Purpose: A framework to define sensitive Areas for a Circle
	--           Radius and center, or a geometric circle is given.

uses

    Circ2d from gp,
    TypeOfSelection,
    EntityOwner from SelectBasics,
    ListOfBox2d from SelectBasics
is

    Create (OwnerId      : EntityOwner from SelectBasics;
    	    TheCirc      : Circ2d from gp;
    	    TheType      : TypeOfSelection = Select2D_TOS_BOUNDARY)
    returns mutable SensitiveCircle ;
    	--- Purpose: Constructs a sensitive circle object defined by the
    	-- owner OwnerId, the circle Circle, and the selection type Type.
    	-- Type can be:
    	-- -   interior
    	-- -   boundary.   
    
    Areas (me:mutable ; aresul : in out ListOfBox2d from SelectBasics) is static;
    	---Level: Public 
    	---Purpose: returns the sensitive areas for a circle...    
    
    Matches (me  : mutable ;
             X,Y : Real from Standard;
             aTol: Real from Standard;
             DMin: out Real from Standard) 
    returns Boolean is static;     
    	---Purpose: Returns true if the minimum distance DMin
    	--          between the postion x,y and the circle is less than aTol..

    Matches (me  :mutable; 
             XMin,YMin,XMax,YMax : Real from Standard;
             aTol: Real from Standard) 
    returns Boolean
    is static;
		     


    Circle(me) returns Circ2d from gp;
    	---Purpose: Returns the circle used at the time of construction of this object.
        ---C++: inline
        ---C++: return const&

    SetTypeOfSelection(me:mutable;aType : TypeOfSelection);
    	---Purpose: Sets the selection type.
        ---C++: inline

    Selection(me:mutable) returns TypeOfSelection from Select2D;
    	---Purpose: Returns the selection type used at the time of construction of this object.
        ---C++: inline

fields

    myCirc  : Circ2d from gp;
    mytype  : TypeOfSelection;   

end SensitiveCircle;