Tengo el siguiente codigo y al compilarlo saca este mensaje
¿Cual es el error?
--------------------Configuration: j2sdk1.4.1_02 <Default>--------------------
\\Waserver\Usuarios KMS\Carlos.Posada\Java\Java 3D\ejemplos\HelloJava3D\HelloJava3Dc.java:83: cannot resolve symbol
symbol : constructor RotationPathInterpolator (javax.media.j3d.Alpha,javax.media.j3d.TransformGr oup,javax.media.j3d.Transform3D,float[],javax.vecmath.Quat4f)
location: class javax.media.j3d.RotationPathInterpolator
RotationPathInterpolator rotator = new RotationPathInterpolator(rotationAlpha, objSpin, rotacion, knots, quat);
^
Note: \\Waserver\Usuarios KMS\Carlos.Posada\Java\Java 3D\ejemplos\HelloJava3D\HelloJava3Dc.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
1 error
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.event.*;
import java.awt.GraphicsConfiguration;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;
// HelloJava3Dc renders a single, rotating cube.
public class HelloJava3Dc extends Applet {
public BranchGroup createSceneGraph() {
float[] knots = new float[30];
for(int i = 0; i < 30; i++)
{
knots[i] = i*2;
}
Quat4f quat = new Quat4f(5, 10, 15, 20);
// Create the root of the branch graph
BranchGroup objRoot = new BranchGroup();
// Create the transform group node and initialize it to the
// identity. Add it to the root of the subgraph.
TransformGroup objSpin = new TransformGroup();
objSpin.setCapability(TransformGroup.ALLOW_TRANSFO RM_WRITE);
objRoot.addChild(objSpin);
// Create a simple shape leaf node, add it to the scene graph.
// ColorCube is a Convenience Utility class
objSpin.addChild(new ColorCube(0.4));
// Create a new Behavior object that will perform the desired
// operation on the specified transform object and add it into
// the scene graph.
Alpha rotationAlpha = new Alpha(-1, 4000);
Transform3D rotacion = new Transform3D();
//Transform3D rotacion2 = new Transform3D();
rotacion.rotX(10);
//rotacion.mul(rotacion2);
// Create a new Behavior object that performs the desired
// operation on the specified transform object and add it into
// the scene graph.
//RotationInterpolator rotator = new RotationInterpolator(rotationAlpha, objSpin);
RotationPathInterpolator rotator = new RotationPathInterpolator(rotationAlpha, objSpin, rotacion, knots, quat);
rotator.setAxisOfRotation(rotacion);
// a bounding sphere specifies a region a behavior is active
BoundingSphere bounds = new BoundingSphere();
rotator.setSchedulingBounds(bounds);
objSpin.addChild(rotator);
return objRoot;
} // end of CreateSceneGraph method
public HelloJava3Dc() {
setLayout(new BorderLayout());
GraphicsConfiguration config =
SimpleUniverse.getPreferredConfiguration();
Canvas3D canvas3D = new Canvas3D(config);
add("Center", canvas3D);
BranchGroup scene = createSceneGraph();
// SimpleUniverse is a Convenience Utility class
SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
// This will move the ViewPlatform back a bit so the
// objects in the scene can be viewed.
simpleU.getViewingPlatform().setNominalViewingTran sform();
simpleU.addBranchGraph(scene);
} // end of HelloJava3D (constructor)
// The following allows this to be run as an application
// as well as an applet
public static void main(String[] args) {
Frame frame = new MainFrame(new HelloJava3Dc(), 256, 256);
} // end of main (method of HelloJava3D)
} // end of class HelloJava3Dc