Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3824/src/net/sourceforge/bprocessor/model
Modified Files:
ClippingPlane.java Camera.java
Log Message:
Now the clipplanes are really copied, when cameras are copied
Index: Camera.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Camera.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** Camera.java 20 Jan 2007 21:24:44 -0000 1.35
--- Camera.java 31 Jan 2007 21:27:30 -0000 1.36
***************
*** 115,119 ****
while (clips.hasNext()) {
ClippingPlane clip = (ClippingPlane)clips.next();
! this.addClipplane(clip);
}
}
--- 115,119 ----
while (clips.hasNext()) {
ClippingPlane clip = (ClippingPlane)clips.next();
! this.addClipplane(clip.copy());
}
}
***************
*** 134,138 ****
while (clips.hasNext()) {
ClippingPlane clip = (ClippingPlane)clips.next();
! this.addClipplane(clip);
}
}
--- 134,138 ----
while (clips.hasNext()) {
ClippingPlane clip = (ClippingPlane)clips.next();
! this.addClipplane(clip.copy());
}
}
Index: ClippingPlane.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClippingPlane.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** ClippingPlane.java 2 Jan 2007 17:48:58 -0000 1.16
--- ClippingPlane.java 31 Jan 2007 21:27:30 -0000 1.17
***************
*** 69,72 ****
--- 69,82 ----
/**
+ * Copy the clippingplane
+ * @return The copy of the this
+ */
+ public ClippingPlane copy() {
+ ClippingPlane copy = new ClippingPlane(this.cs.copy());
+ copy.isActive = isActive();
+ return copy;
+ }
+
+ /**
* Getter for plan representing the clippingplane
* @return The plane
***************
*** 298,301 ****
--- 308,312 ----
public void setActive(boolean isActive) {
this.isActive = isActive;
+ update();
}
***************
*** 329,332 ****
--- 340,349 ----
/** {@inheritDoc} */
+ public String getName() {
+ String s = "CP-" + number;
+ return s;
+ }
+
+ /** {@inheritDoc} */
public String getGeneralName() {
String s = "Clippingplane";
|