@@ -0,0 +1,2843 @@
+/*%0D%0A * To change this template, choose Tools %7C Templates%0D%0A * and open the template in the editor.%0D%0A */%0D%0Apackage org.opensim.view;%0D%0A%0D%0Aimport org.opensim.modeling.*;%0D%0Aimport vtk.*;%0D%0A%0D%0A/**%0D%0A *%0D%0A * @author ayman%0D%0A */%0D%0Apublic abstract class ObjectDisplayer extends vtkActor %7B%0D%0A    protected OpenSimObject obj;%0D%0A%0D%0A    public ObjectDisplayer(OpenSimObject object) %7B%0D%0A        obj = object;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Apply user display preference (None, wireframe, shading)%0D%0A     */%0D%0A    protected void applyDisplayPrefs(OpenSimObject object) %7B%0D%0A        AbstractProperty ap = obj.getPropertyByName(%22display_preference%22);%0D%0A        int prefInt = PropertyHelper.getValueInt(ap);%0D%0A        DisplayGeometry.DisplayPreference pref = DisplayGeometry.DisplayPreference.swigToEnum(prefInt);%0D%0A        // Show vs. HideDisplayGeometry%0D%0A        if (pref == DisplayGeometry.DisplayPreference.None) %7B%0D%0A            SetVisibility(0);%0D%0A            return;%0D%0A        %7D%0D%0A        SetVisibility(1);%0D%0A        if (pref == DisplayGeometry.DisplayPreference.WireFrame) %7B%0D%0A            GetProperty().SetRepresentationToWireframe();%0D%0A        %7D else %7B%0D%0A            GetProperty().SetRepresentationToSurface();%0D%0A            if (pref == DisplayGeometry.DisplayPreference.FlatShaded) %7B%0D%0A                GetProperty().SetInterpolationToFlat();%0D%0A            %7D else %7B%0D%0A                GetProperty().SetInterpolationToGouraud();%0D%0A            %7D%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    abstract void updateFromProperties();%0D%0A%0D%0A    protected void updatePropertiesForPolyData(vtkPolyData polyData) %7B%0D%0A        addPolyDataToActorApplyProperties(polyData, obj.getDisplayer());%0D%0A        // Color/shading%0D%0A        if (obj.hasProperty(%22color%22)) %7B%0D%0A            AbstractProperty ap = obj.getPropertyByName(%22color%22);%0D%0A            double%5B%5D dColor = new double%5B%5D%7BPropertyHelper.getValueDouble(ap, 0), PropertyHelper.getValueDouble(ap, 1), PropertyHelper.getValueDouble(ap, 2)%7D;%0D%0A            GetProperty().SetColor(dColor);%0D%0A        %7D else %7B%0D%0A            GetProperty().SetColor(new double%5B%5D%7B0.0, 1.0, 1.0%7D);%0D%0A        %7D%0D%0A        applyDisplayPrefs(obj);%0D%0A        Modified();%0D%0A    %7D%0D%0A%0D%0A    protected void addPolyDataToActorApplyProperties(final vtkPolyData meshPoly, final VisibleObject visibleObject) %7B%0D%0A        // Move rep to proper location%0D%0A        vtkTransformPolyDataFilter mover = new vtkTransformPolyDataFilter();%0D%0A        vtkTransform moverTransform = new vtkTransform();%0D%0A        double%5B%5D matRows = new double%5B16%5D;%0D%0A        visibleObject.getTransformAsDouble16(matRows);%0D%0A        moverTransform.SetMatrix(SingleModelVisuals.convertTransformToVtkMatrix4x4(matRows));%0D%0A        mover.SetInput(meshPoly);%0D%0A        mover.SetTransform(moverTransform);%0D%0A        // Mapper%0D%0A        vtkPolyDataMapper mapper = new vtkPolyDataMapper();%0D%0A        mapper.SetInput(mover.GetOutput());%0D%0A        SetMapper(mapper);%0D%0A    %7D%0D%0A    %0D%0A%7D%0D%0A

Add new file missing from last commit.