| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1459 人关注过本帖
标题:最近要用java控制一个Cult3d的摄相机
只看楼主 加入收藏
zyfdjava
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-2-2
收藏
 问题点数:0 回复次数:2 
最近要用java控制一个Cult3d的摄相机

最近要用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();

}

搜索更多相关主题的帖子: java 相机 
2005-02-02 15:03
神vLinux飘飘
Rank: 13Rank: 13Rank: 13Rank: 13
来 自:浙江杭州
等 级:贵宾
威 望:91
帖 子:6140
专家分:217
注 册:2004-7-17
收藏
得分:0 

恩,我猜想,随便说说,错了别怪我啊。

是在com.cult3d.Cult3DScript这个接口中出了点问题。

solarsys类implements了Cult3DScript接口,但是我想问题是出在这里:

在solarsys类中的cult3dDestroy方法是这样定义参数的: public void cult3dDestroy(String arg)

而在接口中却是没有参数的: public interface Cult3DScript { public void cult3dDestroy(); //没有参数!

}

问题是不是出在了这里?!我刚刚学,错了别怪我哈!


淘宝杜琨
2005-02-02 17:37
DongZhe007
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2005-3-4
收藏
得分:0 
你好,你的摄象机的功能是怎么样用java实现的呀?
          我想把用3d max制作的数码照相机导入到culd 3d中,使它具有照相的功能,我不会用  java 编程,你可以帮我吗?谢谢!
2005-03-04 12:27
快速回复:最近要用java控制一个Cult3d的摄相机
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.035111 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved