import org.simantics.g3d.scenegraph.NodeHighlighter.HighlightEventType;
import org.simantics.g3d.scenegraph.ParametricGeometryProvider;
import org.simantics.g3d.shape.Mesh;
+import org.simantics.g3d.vtk.common.VtkView;
import org.simantics.g3d.vtk.shape.MeshActor;
import org.simantics.g3d.vtk.shape.vtkMeshObject;
import org.simantics.opencascade.OccTriangulator;
import org.simantics.opencascade.vtk.vtkSolidObject;
import vtk.vtkActor;
-import vtk.vtkPanel;
import vtk.vtkProp3D;
import vtk.vtkProperty;
private GeometryProvider geometryProvider;
public GeometryComponent() {
- currentParameters = new HashMap<String, Object>();
- calculatedParameters = new HashMap<String, Object>();
+ currentParameters = new HashMap<>();
+ calculatedParameters = new HashMap<>();
}
- public void visualize(vtkPanel panel) {
+ public void visualize(VtkView panel) {
if (geometryProvider != null) {
updateParameters();
return calculatedParameters;
}
+ public Map<String, Object> getTotalParameters() {
+ Map<String,Object> params = new HashMap<>();
+ params.putAll(currentParameters);
+ params.putAll(calculatedParameters);
+ return params;
+ }
+
public void setParametersUpdated(boolean parametersUpdated) {
this.parametersUpdated = parametersUpdated;
}
Object newValue = parameters.get(id);
if (currentValue == newValue)
continue;
+ if (newValue == null) {
+ continue;
+ }
if (currentValue instanceof Double) {
if (Math.abs((Double)currentValue-(Double)newValue) < MathTools.NEAR_ZERO)
continue;
public void stopVisualize() {
if (solidObject != null) {
- solidObject.clearActorsAWT();
+ solidObject.clearActorsVTK();
solidObject = null;
}
if (solidModel != null) {
solidModel = null;
}
if (meshObject != null) {
- meshObject.clearActorsAWT();
+ meshObject.clearActorsVTK();
meshObject = null;
}
if (mesh != null)