Normand Briere
2019-09-24 767be784dc7fe293bf5c5ee6507df242526be3ed
BezierSurface.java
....@@ -67,7 +67,7 @@
6767 return l;
6868 }
6969
70
- void draw(CameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
70
+ void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
7171 {
7272 // ((BezierSurface)parent.parent).currentHandle = (Sphere)this;
7373 // parent.parent.recalculate();
....@@ -117,39 +117,43 @@
117117 Point prev = new Point(0, 0);
118118 Point curr = new Point(0, 0);
119119 Rectangle dummy = new Rectangle();
120
- calcHotSpot(sample, info, prev, dummy);
120
+ calcHotSpot(sample, //info,
121
+ prev, dummy);
121122 sample = ((Sphere)ctrlPnts.get(i)).getCenter();
122
- calcHotSpot(sample, info, curr, dummy);
123
+ calcHotSpot(sample, //info,
124
+ curr, dummy);
123125 info.g.drawLine(prev.x, prev.y, curr.x, curr.y);
124126 prev.x = curr.x;
125127 prev.y = curr.y;
126128 }
127129 }
128130
129
- void drawEditHandles(ClickInfo info, int level)
131
+ void drawEditHandles(//ClickInfo info,
132
+ int level)
130133 {
131
- info.g.setColor(Color.red);
134
+ clickInfo.g.setColor(Color.red);
132135 int count = ctrlPnts.size();
133136 for (int i=0; i < count; i++)
134137 {
135138 cVector p = ((Sphere)ctrlPnts.elementAt(i)).getCenter();
136
- Rectangle spot = calcHotSpot(p, info);
137
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
139
+ Rectangle spot = calcHotSpot(p); //, info);
140
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
138141 }
139142
140143 }
141144
142
- boolean doEditClick(ClickInfo info, int level)
145
+ boolean doEditClick(//ClickInfo info,
146
+ int level)
143147 {
144
- startX = info.x;
145
- startY = info.y;
148
+ startX = clickInfo.x;
149
+ startY = clickInfo.y;
146150 int nPoints = ctrlPnts.size();
147151 hitSomething = false;
148152 for (int i=0; i < nPoints; i++)
149153 {
150154 cVector p = ((Sphere)ctrlPnts.elementAt(i)).getCenter();
151
- Rectangle r = calcHotSpot(p, info);
152
- if (r.contains(info.x, info.y))
155
+ Rectangle r = calcHotSpot(p); //, info);
156
+ if (r.contains(clickInfo.x, clickInfo.y))
153157 {
154158 hitSomething = true;
155159 hitIndex = i;