home *** CD-ROM | disk | FTP | other *** search
- package l3d;
-
- import netscape.plugin.Plugin;
-
- public class L3DScene extends Plugin {
- public static final int BOOL_TRUE = 1;
- public static final int BOOL_FALSE = 0;
- public static final int NAVIGATE_WALK = 0;
- public static final int NAVIGATE_SPIN = 1;
- public static final int NAVIGATE_LOOK = 2;
- public static final int NAVIGATE_SLIDE = 3;
- public static final int NAVIGATE_FLY = 4;
- public static final int NAVIGATE_POINT = 5;
- public static final int DRAW_SOLID = 0;
- public static final int DRAW_WIREFRAME = 0;
- public static final int DRAW_POINTCLOUD = 0;
- public static final int SHADE_FLAT = 0;
- public static final int SHADE_SMOOTH = 0;
- public static final int SEARCHCRITERIA_ALLOBJECTS = 0;
- public static final int SEARCHCRITERIA_PARENTOBJECT = 1;
- public static final int SEARCHCRITERIA_CHILDOBJECTS = 2;
- public static final int SEARCHCRITERIA_SHAPEOBJECTS = 3;
- public static final int SEARCHCRITERIA_SELECTEDOBJECTS = 4;
- public static final int CONTINUEPROCESSING_OFF = 0;
- public static final int CONTINUEPROCESSING_ON = 1;
-
- public native int advise(L3DObserver var1, L3DObject var2, String var3);
-
- public native int setBackgroundColor(float var1, float var2, float var3);
-
- public native int getBackgroundColor(float[] var1);
-
- public native int setBackdropImage(String var1);
-
- public native int getBackdropImage(String var1);
-
- public native int render();
-
- public native int requestRender();
-
- public native L3DObject loadSceneURL(String var1);
-
- public native L3DObject loadSceneVRML(String var1);
-
- public native int getSceneURL(String var1);
-
- public native int loadAmbientSound(String var1);
-
- public native int playAmbientSound(int var1);
-
- public native int stopAmbientSound();
-
- public native int getFrameRate();
-
- public native int getNumShape();
-
- public native int getNumLights();
-
- public native int setFogDistance(float var1);
-
- public native int setFogState(int var1);
-
- public native int setFogColor(float var1, float var2, float var3);
-
- public native float getFogDistance();
-
- public native int getFogState();
-
- public native float[] getFogColor();
-
- public native int getNavigationMode();
-
- public native int setNavigationMode(int var1);
-
- public native int getToolbarState();
-
- public native int setToolbarState(int var1);
-
- public native int setCollisionDetectionMode(int var1);
-
- public native int getCollisionDetectionMode();
-
- public native int setBankingMode(int var1);
-
- public native int getBankingMode();
-
- public native int setStayOnGroundMode(int var1);
-
- public native int getStayOnGroundMode();
-
- public native int setHeadlightState(int var1);
-
- public native int getHeadlightState();
-
- public native int increaseLightIntensity();
-
- public native int decreaseLightIntensity();
-
- public native int setLightIntensity(float var1);
-
- public native float getLightIntensity();
-
- public native int setFastrenderMode(int var1);
-
- public native int getFastrenderMode();
-
- public native int setSceneTextureLightingMode(int var1);
-
- public native int getSceneTextureLightingMode();
-
- public native int setGravityMode(int var1);
-
- public native int getGravityMode();
-
- public native int setWireframeMode(int var1);
-
- public native int getWireframeMode();
-
- public native int setMotionBlurMode(int var1);
-
- public native int getMotionBlurMode();
-
- public native int setStereoMode(int var1);
-
- public native int getStereoMode();
-
- public native int setAnimationMode(int var1);
-
- public native int getAnimationMode();
-
- public native int addLight(int var1, float[] var2, float[] var3, float[] var4, float var5, float var6, float var7, float var8);
-
- public native L3DObject addURL(String var1, String var2, float var3, float var4, float var5, float var6, float var7, float var8);
-
- public native L3DObject addVRML(String var1, String var2, float var3, float var4, float var5, float var6, float var7, float var8);
-
- public native L3DObject getObject(String var1);
-
- public native L3DObject getRoot();
-
- public native int reParent(L3DObject var1, L3DObject var2);
-
- public native int deleteObject(L3DObject var1);
-
- public L3DObject addCone(float var1, float var2, int var3) {
- Object var4 = null;
- StringBuffer var5 = new StringBuffer("#VRML V1.0 ascii\nSeparator {\nCone {\n");
- var5.append("height ");
- var5.append(var1);
- var5.append("\n");
- var5.append("bottomRadius ");
- var5.append(var2);
- var5.append("\n");
- var5.append("}\n}\n");
- L3DObject var6 = this.addVRML(var5.toString(), (String)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
- return var6;
- }
-
- public L3DObject addCube(float var1, float var2, float var3) {
- Object var4 = null;
- StringBuffer var5 = new StringBuffer("#VRML V1.0 ascii\nSeparator {\nCube {\n");
- var5.append("width ");
- var5.append(var1);
- var5.append("\n");
- var5.append("height ");
- var5.append(var2);
- var5.append("\n");
- var5.append("depth ");
- var5.append(var3);
- var5.append("\n");
- var5.append("}\n}\n");
- L3DObject var6 = this.addVRML(var5.toString(), (String)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
- return var6;
- }
-
- public L3DObject addCylinder(float var1, float var2, float var3, int var4) {
- Object var5 = null;
- StringBuffer var6 = new StringBuffer("#VRML V1.0 ascii\nSeparator {\nCylinder {\n");
- var6.append("height ");
- var6.append(var1);
- var6.append("\n");
- var6.append("radius ");
- var6.append(var2);
- var6.append("\n");
- var6.append("}\n}\n");
- L3DObject var7 = this.addVRML(var6.toString(), (String)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
- return var7;
- }
-
- public L3DObject addDisc(float var1, float var2, int var3) {
- Object var4 = null;
- StringBuffer var5 = new StringBuffer("#VRML V1.0 ascii\nSeparator {\nCylinder {\n");
- var5.append("height ");
- var5.append(var1);
- var5.append("\n");
- var5.append("radius ");
- var5.append(var2);
- var5.append("\n");
- var5.append("}\n}\n");
- L3DObject var6 = this.addVRML(var5.toString(), (String)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
- return var6;
- }
-
- public L3DObject addSphere(float var1, int var2) {
- Object var3 = null;
- StringBuffer var4 = new StringBuffer("#VRML V1.0 ascii\nSeparator {\nSphere {\n");
- var4.append("radius ");
- var4.append(var1);
- var4.append("\n");
- var4.append("}\n}\n");
- L3DObject var5 = this.addVRML(var4.toString(), (String)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
- return var5;
- }
-
- public L3DObject addSprite(String var1) {
- Object var2 = null;
- StringBuffer var3 = new StringBuffer("#VRML V1.0 ascii\nSeparator {\nSprite {\n");
- var3.append("fields [SFString texture] ");
- var3.append("\n");
- var3.append("texture \"");
- var3.append(var1);
- var3.append("\"\n");
- var3.append("}\n}\n");
- L3DObject var4 = this.addVRML(var3.toString(), (String)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
- return var4;
- }
-
- public L3DObject addAsciiText(String var1, int var2, float var3, float var4) {
- Object var5 = null;
- StringBuffer var6 = new StringBuffer("#VRML V1.0 ascii\nSeparator {\nAsciiText {\n");
- var6.append("string \"");
- var6.append(var1);
- var6.append("\"\n");
- var6.append("justification ");
- if (var2 == 1) {
- var6.append("CENTER");
- } else if (var2 == 2) {
- var6.append("RIGHT");
- } else {
- var6.append("LEFT");
- }
-
- var6.append("\n");
- var6.append("width ");
- var6.append(var3);
- var6.append("\n");
- var6.append("spacing ");
- var6.append(var4);
- var6.append("\n");
- var6.append("}\n}\n");
- L3DObject var7 = this.addVRML(var6.toString(), (String)null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
- return var7;
- }
-
- public native L3DObject pick(int var1, int var2);
-
- public native int addViewpoint(int var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, float var9, float var10, float var11, float var12, float var13, float var14, float var15, float var16, float var17);
-
- public native int gotoViewpoint(String var1, int var2);
-
- public native int gotoCurrentViewpoint();
-
- public native int gotoPreviousViewpoint();
-
- public native int gotoNextViewpoint();
-
- public native int animateToViewpoint(float var1, float var2, float var3);
-
- public native int setCameraPosition(float var1, float var2, float var3);
-
- public native int setCameraOrientation(float var1, float var2, float var3);
-
- public native int getCameraPosition(float[] var1);
-
- public native int getCameraOrientation(float[] var1);
-
- public native int setCameraView(float var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, float var9);
-
- public native int getCameraView(float[] var1);
-
- public native int getCameraImage(int[] var1);
-
- public native int setCameraNearClipping(float var1);
-
- public native float getCameraNearClipping();
-
- public native int setCameraFarClipping(float var1);
-
- public native float getCameraFarClipping();
-
- public native int setCameraTransform(float[] var1);
-
- public native int getCameraTransform(float[] var1);
-
- public native int panCamera(float var1);
-
- public native int tiltCamera(float var1);
-
- public native int revolveCamera(float var1);
-
- public native int moveCamera(float var1, float var2, float var3);
-
- public native L3DObject findObject(L3DObject var1, int var2);
-
- public native int save(String var1);
- }
-