*******************************************************************************/\r
package org.simantics.g3d.scenegraph;\r
\r
+import java.util.Objects;\r
+\r
import javax.vecmath.Quat4d;\r
import javax.vecmath.Vector3d;\r
\r
@SetPropertyValue(G3D.URIs.hasOrientation)\r
public void setOrientation(Quat4d orientation) {\r
assert(orientation != null);\r
+ if (Objects.equals(this.orientation, orientation))\r
+ return;\r
+\r
this.orientation = orientation;\r
- \r
+ \r
firePropertyChanged(G3D.URIs.hasOrientation);\r
}\r
\r
@SetPropertyValue(G3D.URIs.hasPosition)\r
public void setPosition(Vector3d position) {\r
assert(position != null);\r
+ if (Objects.equals(this.position, position))\r
+ return;\r
+ \r
this.position = position;\r
\r
firePropertyChanged(G3D.URIs.hasPosition);\r
setPosition(new Vector3d(arr));\r
}\r
\r
+ public void _setPosition(Vector3d position) {\r
+ assert(position != null);\r
+ this.position = position;\r
+ }\r
+ \r
@Override\r
@GetPropertyValue(value = G3D.URIs.hasWorldPosition, tabId = "Transform", name = "World Position")\r
public Vector3d getWorldPosition() {\r