Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23780/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
AbstractTool.java SpaceTool.java RotationTool.java
Log Message:
REfactored center to Geometry and made Modellor implement Parametric as well
Index: SpaceTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** SpaceTool.java 24 Jul 2006 13:41:14 -0000 1.23
--- SpaceTool.java 9 Aug 2006 15:15:03 -0000 1.24
***************
*** 309,312 ****
--- 309,323 ----
return;
}
+
+ /** @see net.sourceforge.bprocessor.model.Parametric#setAttributes(List) */
+ public void setAttributes(List attributes) {
+ // TODO Auto-generated method stub
+ }
+
+ /** @see net.sourceforge.bprocessor.model.Parametric#getGeneralName() */
+ public List getAttributes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
Index: AbstractTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** AbstractTool.java 3 Aug 2006 14:29:33 -0000 1.90
--- AbstractTool.java 9 Aug 2006 15:15:03 -0000 1.91
***************
*** 10,14 ****
import net.sourceforge.bprocessor.model.ClippingPlane;
import net.sourceforge.bprocessor.model.Edge;
- import net.sourceforge.bprocessor.model.Entity;
import net.sourceforge.bprocessor.model.Geometry;
import net.sourceforge.bprocessor.model.Geometric;
--- 10,13 ----
***************
*** 187,192 ****
if (it.hasNext()) {
Object o = it.next();
! if (o instanceof Entity) {
! Vertex v = ((Entity)o).center();
center = new double[] {v.getX(), v.getY(), v.getZ()};
}
--- 186,191 ----
if (it.hasNext()) {
Object o = it.next();
! if (o instanceof Geometric) {
! Vertex v = ((Geometric)o).center();
center = new double[] {v.getX(), v.getY(), v.getZ()};
}
Index: RotationTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RotationTool.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** RotationTool.java 3 Aug 2006 14:35:28 -0000 1.15
--- RotationTool.java 9 Aug 2006 15:15:03 -0000 1.16
***************
*** 12,15 ****
--- 12,16 ----
import net.sourceforge.bprocessor.model.Edge;
import net.sourceforge.bprocessor.model.Entity;
+ import net.sourceforge.bprocessor.model.Geometric;
import net.sourceforge.bprocessor.model.Geometry;
import net.sourceforge.bprocessor.model.Plane;
***************
*** 142,146 ****
}
// make selection
! if (target != null && target instanceof Entity) {
if (target instanceof Edge && ((Edge)target).getStrippled()) {
// If it is a constructor it should not be rotateable
--- 143,147 ----
}
// make selection
! if (target != null && target instanceof Geometric) {
if (target instanceof Edge && ((Edge)target).getStrippled()) {
// If it is a constructor it should not be rotateable
***************
*** 151,159 ****
// find the size of the handles
! center = ((Entity)target).center();
dist = 0;
gatherInformation(center, vertices);
! drawCircles(((Entity)target).center(), dist);
} else {
// There were nothing selected
--- 152,160 ----
// find the size of the handles
! center = ((Geometric)target).center();
dist = 0;
gatherInformation(center, vertices);
! drawCircles(((Geometric)target).center(), dist);
} else {
// There were nothing selected
|