b311480e |
1 | -- Created on: 1995-08-09 |
2 | -- Created by: Arnaud BOUZY |
3 | -- Copyright (c) 1995-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 | |
7fd59977 |
21 | -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead |
22 | -- the restricted NameOfColor. |
7fd59977 |
23 | |
24 | class Point from AIS inherits InteractiveObject from AIS |
25 | |
26 | ---Purpose: Constructs point datums to be used in construction of |
27 | -- composite shapes. The datum is displayed as the plus marker +. |
28 | |
29 | uses |
30 | Point from Geom, |
31 | TypeOfMarker from Aspect, |
32 | Presentation from Prs3d, |
33 | PresentationManager3d from PrsMgr, |
34 | NameOfColor from Quantity, |
35 | Color from Quantity, |
36 | Selection from SelectMgr, |
37 | Projector from Prs3d, |
38 | Transformation from Geom, |
7fd59977 |
39 | Vertex from TopoDS, |
40 | KindOfInteractive from AIS |
41 | |
42 | |
43 | is |
44 | Create(aComponent : Point from Geom) |
45 | returns mutable Point from AIS; |
46 | ---Purpose: |
47 | -- Initializes the point aComponent from which the point |
48 | -- datum will be built. |
49 | |
50 | Signature(me) returns Integer from Standard is redefined; |
51 | ---Purpose: Returns index 1, the default index for a point. |
52 | ---C++: inline |
53 | |
54 | Type(me) returns KindOfInteractive from AIS is redefined; |
55 | ---Purpose: Indicates that a point is a datum. |
56 | ---C++: inline |
57 | |
58 | Component(me: mutable) returns Point from Geom |
59 | is static; |
60 | ---Purpose: Returns the component specified in SetComponent. |
61 | SetComponent(me: mutable;aComponent:Point from Geom ) |
62 | is static; |
63 | ---Purpose: Constructs an instance of the point aComponent. |
64 | AcceptDisplayMode(me;aMode:Integer from Standard) returns Boolean from Standard is redefined static; |
65 | ---Purpose: Returns true if the display mode selected is valid for point datums. |
66 | |
67 | Compute(me : mutable; |
68 | aPresentationManager: PresentationManager3d from PrsMgr; |
69 | aPresentation : mutable Presentation from Prs3d; |
70 | aMode : Integer from Standard = 0) |
71 | is redefined virtual protected; |
72 | |
73 | Compute(me:mutable; |
74 | aProjector: Projector from Prs3d; |
75 | aPresentation: mutable Presentation from Prs3d) |
128cc8df |
76 | is redefined static private; |
7fd59977 |
77 | |
78 | Compute(me : mutable; |
79 | aProjector : Projector from Prs3d; |
80 | aTrsf : Transformation from Geom; |
81 | aPresentation : mutable Presentation from Prs3d) |
82 | is redefined; |
83 | ---Purpose: computes the presentation according to a point of view |
84 | -- given by <aProjector>. |
85 | -- To be Used when the associated degenerated Presentations |
86 | -- have been transformed by <aTrsf> which is not a Pure |
87 | -- Translation. The HLR Prs can't be deducted automatically |
88 | -- WARNING :<aTrsf> must be applied |
89 | -- to the object to display before computation !!! |
90 | |
91 | -- Methods from SelectableObject |
92 | |
93 | ComputeSelection(me : mutable; |
94 | aSelection : mutable Selection from SelectMgr; |
95 | aMode : Integer from Standard )is private; |
96 | |
97 | -- Methods from InteractiveObject |
98 | |
99 | SetColor(me :mutable; aColor : NameOfColor from Quantity) |
100 | is redefined static; |
101 | ---Purpose: Allows you to provide settings for the cp;pr aColor. |
102 | SetColor(me :mutable; aColor : Color from Quantity) |
103 | is redefined static; |
104 | |
105 | UnsetColor(me:mutable) is redefined static; |
106 | ---Purpose: Allows you to remove color settings. |
107 | SetMarker(me:mutable; aType : TypeOfMarker from Aspect); |
108 | ---Purpose: Allows you to provide settings for a marker. These include |
109 | -- - type of marker, |
110 | -- - marker color, |
111 | -- - scale factor. |
112 | |
113 | UnsetMarker(me:mutable); |
114 | ---Purpose: Removes the marker settings. |
115 | HasMarker(me) returns Boolean from Standard; |
116 | ---Purpose: Returns true if the point datum has a marker. |
117 | ---C++: inline |
118 | |
119 | Vertex(me) returns Vertex from TopoDS; |
120 | ---Purpose: Converts a point into a vertex. |
121 | UpdatePointValues(me:mutable) is private; |
122 | ---Level: Internal |
123 | |
124 | |
125 | |
126 | fields |
127 | |
128 | myComponent : Point from Geom; |
129 | myHasTOM : Boolean from Standard; |
130 | myTOM : TypeOfMarker from Aspect; |
131 | end Point; |