# Methode:setPointAntialiasingEnable(true)



## andy0566 (30. Nov 2004)

Wieso funktioniert die Methode "setPointAntialiasingEnable(true)" nicht?

```
import java.applet.Applet;
import java.awt.*;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.behaviors.vp.*;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;

public class PointSample extends Applet{
    public BranchGroup createSceneGraph(){
        BranchGroup objRoot=new BranchGroup();
        Background bg=new Background(new Color3f(1.0f,1.0f,1.0f));
        bg.setApplicationBounds(new BoundingSphere());
        objRoot.addChild(bg);
        
        float vert[ ]={.5f,0.5f,0.0f,		-0.5f,0.5f,0.0f,
                			 0.3f,0.0f,0.0f,		-0.3f,0.0f,0.0f,
                			 -0.5f,-0.5f,0.0f,	0.5f,-0.5f,0.0f};
        float color[ ]={0.0f,0.5f,0.0f,			0.0f,0.5f,0.0f,
  			  				   0.0f,0.3f,2.0f,			0.0f,0.0f,0.3f,
  			  				   0.0f,0.0f,0.3f,			0.3f,0.3f,0.0f,};
        
        PointArray point =new PointArray(6,PointArray.COORDINATES|PointArray.COLOR_3);
        point.setCoordinates(0,vert);
        point.setColors(0,color);
        PointAttributes pa=new PointAttributes();
        pa.setPointSize(12f);
        pa.setPointAntialiasingEnable(true);
        Appearance app=new Appearance();
        app.setPointAttributes(pa);
        
        Shape3D s3d=new Shape3D();
        s3d.setAppearance(app);
        s3d.setGeometry(point);
        
        objRoot.addChild(s3d);
        objRoot.compile();
        return objRoot;
    }
    public PointSample(){
        setLayout(new BorderLayout());
        Canvas3D c=new Canvas3D(null);
        add("Center",c);
        BranchGroup scene=createSceneGraph();
        SimpleUniverse u=new SimpleUniverse(c);
        u.getViewingPlatform().setNominalViewingTransform();
        OrbitBehavior orbit=new OrbitBehavior(c,OrbitBehavior.REVERSE_ALL);
        orbit.setSchedulingBounds(new BoundingSphere());
        u.getViewingPlatform().setViewPlatformBehavior(orbit);
        u.addBranchGraph(scene);
    }
    public static void main(String[]args){
        new MainFrame(new PointSample(),400,400);
    }
}
```


----------



## Sky (30. Nov 2004)

Was heißt funktioniert nicht? Schildere doch mal dein genaues Problem und vor allem: deine Erwartung an die Methode!


----------



## Oxygenic (1. Dez 2004)

Lass mich raten: Du verwendest Windows und die DirectMurx-Variante? Damit geht es nicht.


----------

