最近要用java控制一个Cult3d的摄相机,用javac -classpath "D:\tools\c3d\Cycore\Cult3D Designer 5.3\Cult3DDevelop.jar;" solarsys.java 编译总通不过,提示有下面的错误 solarsys.java:11: solarsys is not abstract and does not override abstract method cult3dDestroy() in com.cult3d.Cult3DScript public class solarsys extends Thread implements Cult3DScript ^ 1 error 请高手指教!
我的类 import com.cult3d.Cult.*; import com.cult3d.Cult3DScript; import com.cult3d.world.*; import com.cult3d.math.*; import java.awt.*; import java.awt.Point; import java.lang.*; import java.io.*;
public class solarsys extends Thread implements Cult3DScript { private CultObject Camera; private String szoveg; private float twopi=(float)(2*Math.PI); private Matrix4x4 matrix; private Vector3 Vector; private Vector3 planet_pos,difference=new Vector3(); public solarsys() { Camera=new CultObject("Camera01"); }
public void cult3dDestroy(String arg) {Camera.translate(0,0,100,100,true); } }
Cult3DScript的内容 package com.cult3d;
/** * This interface must be implemented by the startup Java class. * The startup class must follow the following rules: * <P> * <UL> * <LI> It must implement the Cult3DScript interface. * <LI> It must be in the default package.<br> * <LI> It must have a public constructor with no arguments. <br> * <LI> All methods that will be used as java actions in the Designer must belong to this class, take a String * as their only argument, and return void.<br> * <LI> The method cult3dDestroy() must contain code that terminates all running threads and cleans up all other * resources that must be destroyed manually. <br> * </UL> * @author Johan Johansson * @version 1.00 02/16/99 * @since Cult3D 4.0 */ public interface Cult3DScript {
/** * Called on destruction of the plugin instance. * This method provides a way for Cult3D to tell Java classes * that the plugin is closing. * @since Cult3D 4.0 */ public void cult3dDestroy();
}