publish
8
Cube_Demo/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Ant-Version: Apache Ant 1.9.7
|
||||||
|
Created-By: 1.8.0_172-b11 (Oracle Corporation)
|
||||||
|
Class-Path: lib/SC_DLL_Wrapper.jar lib/jogamp-fat.jar lib/j3dcore.jar
|
||||||
|
lib/j3dutils.jar lib/vecmath.jar
|
||||||
|
X-COMMENT: Main-Class will be added automatically by build
|
||||||
|
Main-Class: cube_demo.CubeApp
|
||||||
|
|
36
Cube_Demo/cube_demo/Axes.java
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class Axes {
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Axes(double paramDouble1, double paramDouble2, double paramDouble3) {
|
||||||
|
Axis axis1 = new Axis(0);
|
||||||
|
Axis axis2 = new Axis(1);
|
||||||
|
Axis axis3 = new Axis(2);
|
||||||
|
Vector3d vector3d = new Vector3d(paramDouble1, paramDouble2, paramDouble3);
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
TransformGroup transformGroup = new TransformGroup();
|
||||||
|
transformGroup.addChild((Node)axis1.getBrGrp());
|
||||||
|
transformGroup.addChild((Node)axis2.getBrGrp());
|
||||||
|
transformGroup.addChild((Node)axis3.getBrGrp());
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup);
|
||||||
|
transform3D.setTranslation(vector3d);
|
||||||
|
transformGroup.setTransform(transform3D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/Axes.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
99
Cube_Demo/cube_demo/Axis.java
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.geometry.Cone;
|
||||||
|
import com.sun.j3d.utils.geometry.Cylinder;
|
||||||
|
import java.awt.Font;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Font3D;
|
||||||
|
import javax.media.j3d.FontExtrusion;
|
||||||
|
import javax.media.j3d.Geometry;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Shape3D;
|
||||||
|
import javax.media.j3d.Text3D;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class Axis {
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Axis(int paramInt) {
|
||||||
|
float f = 0.05F;
|
||||||
|
Cylinder cylinder = new Cylinder(f, 1.0F);
|
||||||
|
Cone cone = new Cone(f * 2.0F, f * 3.0F);
|
||||||
|
TransformGroup transformGroup1 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup2 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup3 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup4 = new TransformGroup();
|
||||||
|
Vector3d vector3d = new Vector3d();
|
||||||
|
Transform3D transform3D1 = new Transform3D();
|
||||||
|
Transform3D transform3D2 = new Transform3D();
|
||||||
|
Transform3D transform3D3 = new Transform3D();
|
||||||
|
Transform3D transform3D4 = new Transform3D();
|
||||||
|
Transform3D transform3D5 = new Transform3D();
|
||||||
|
Material material1 = new Material();
|
||||||
|
Material material2 = new Material();
|
||||||
|
Appearance appearance1 = new Appearance();
|
||||||
|
Appearance appearance2 = new Appearance();
|
||||||
|
Font3D font3D = new Font3D(new Font("Helvetica", 0, 10), new FontExtrusion());
|
||||||
|
Text3D text3D = new Text3D(font3D);
|
||||||
|
Shape3D shape3D = new Shape3D((Geometry)text3D);
|
||||||
|
transformGroup1.addChild((Node)cylinder);
|
||||||
|
transformGroup2.addChild((Node)cone);
|
||||||
|
transformGroup4.addChild((Node)shape3D);
|
||||||
|
transformGroup3.addChild((Node)transformGroup1);
|
||||||
|
transformGroup3.addChild((Node)transformGroup2);
|
||||||
|
transformGroup3.addChild((Node)transformGroup4);
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup3);
|
||||||
|
vector3d.set(0.0D, 0.5D, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup1.setTransform(transform3D1);
|
||||||
|
vector3d.set(0.0D, 1.0D, 0.0D);
|
||||||
|
transform3D2.setTranslation(vector3d);
|
||||||
|
transformGroup2.setTransform(transform3D2);
|
||||||
|
transform3D5.setIdentity();
|
||||||
|
switch (paramInt) {
|
||||||
|
case 0:
|
||||||
|
transform3D4.rotZ(-1.5707963267948966D);
|
||||||
|
transform3D5.rotZ(1.5707963267948966D);
|
||||||
|
text3D.setString("x");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
text3D.setString("y");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
transform3D4.rotX(1.5707963267948966D);
|
||||||
|
transform3D5.rotX(-1.5707963267948966D);
|
||||||
|
text3D.setString("z");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
transform3D3.mul(transform3D5);
|
||||||
|
transform3D3.setScale(0.05D);
|
||||||
|
vector3d.set(-0.3D, 1.3D, 0.0D);
|
||||||
|
transform3D3.setTranslation(vector3d);
|
||||||
|
transformGroup4.setTransform(transform3D3);
|
||||||
|
transformGroup3.setTransform(transform3D4);
|
||||||
|
material1.setDiffuseColor(1.0F, 1.0F, 0.0F);
|
||||||
|
material1.setShininess(128.0F);
|
||||||
|
appearance1.setMaterial(material1);
|
||||||
|
cylinder.setAppearance(appearance1);
|
||||||
|
material2.setDiffuseColor(1.0F, 1.0F, 0.0F);
|
||||||
|
material2.setShininess(128.0F);
|
||||||
|
appearance2.setMaterial(material1);
|
||||||
|
cone.setAppearance(appearance2);
|
||||||
|
shape3D.setAppearance(appearance1);
|
||||||
|
this.mBrGrp.compile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/Axis.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
104
Cube_Demo/cube_demo/ColoredCube.java
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class ColoredCube {
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ColoredCube(double paramDouble, boolean paramBoolean) {
|
||||||
|
CubeSide cubeSide1 = new CubeSide(1);
|
||||||
|
CubeSide cubeSide2 = new CubeSide(2);
|
||||||
|
CubeSide cubeSide3 = new CubeSide(3);
|
||||||
|
CubeSide cubeSide4 = new CubeSide(4);
|
||||||
|
CubeSide cubeSide5 = new CubeSide(5);
|
||||||
|
CubeSide cubeSide6 = new CubeSide(6);
|
||||||
|
Transform3D transform3D1 = new Transform3D();
|
||||||
|
Transform3D transform3D2 = new Transform3D();
|
||||||
|
TransformGroup transformGroup1 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup2 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup3 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup4 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup5 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup6 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup7 = new TransformGroup();
|
||||||
|
Vector3d vector3d = new Vector3d();
|
||||||
|
transformGroup1.addChild((Node)cubeSide1);
|
||||||
|
transformGroup2.addChild((Node)cubeSide2);
|
||||||
|
transformGroup3.addChild((Node)cubeSide3);
|
||||||
|
transformGroup4.addChild((Node)cubeSide4);
|
||||||
|
transformGroup5.addChild((Node)cubeSide5);
|
||||||
|
transformGroup6.addChild((Node)cubeSide6);
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup1);
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup2);
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup3);
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup4);
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup5);
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup6);
|
||||||
|
vector3d.set(0.0D, 0.0D, paramDouble);
|
||||||
|
transform3D1.setScale(paramDouble);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup1.setTransform(transform3D1);
|
||||||
|
if (paramBoolean) {
|
||||||
|
transform3D2.rotX(1.5707963267948966D);
|
||||||
|
transform3D1.rotY(1.5707963267948966D);
|
||||||
|
transform3D2.mul(transform3D1);
|
||||||
|
transform3D2.setScale(paramDouble);
|
||||||
|
vector3d.set(paramDouble, 0.0D, 0.0D);
|
||||||
|
transform3D2.setTranslation(vector3d);
|
||||||
|
transformGroup2.setTransform(transform3D2);
|
||||||
|
transform3D2.rotY(1.5707963267948966D);
|
||||||
|
transform3D1.rotX(-1.5707963267948966D);
|
||||||
|
transform3D2.mul(transform3D1);
|
||||||
|
transform3D2.setScale(paramDouble);
|
||||||
|
vector3d.set(0.0D, paramDouble, 0.0D);
|
||||||
|
transform3D2.setTranslation(vector3d);
|
||||||
|
transformGroup3.setTransform(transform3D2);
|
||||||
|
transform3D1.rotX(1.5707963267948966D);
|
||||||
|
transform3D1.setScale(paramDouble);
|
||||||
|
vector3d.set(0.0D, -paramDouble, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup4.setTransform(transform3D1);
|
||||||
|
} else {
|
||||||
|
transform3D1.rotY(1.5707963267948966D);
|
||||||
|
transform3D1.setScale(paramDouble);
|
||||||
|
vector3d.set(paramDouble, 0.0D, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup2.setTransform(transform3D1);
|
||||||
|
transform3D1.rotX(1.5707963267948966D);
|
||||||
|
transform3D1.setScale(paramDouble);
|
||||||
|
vector3d.set(0.0D, -paramDouble, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup3.setTransform(transform3D1);
|
||||||
|
transform3D1.rotX(-1.5707963267948966D);
|
||||||
|
transform3D1.setScale(paramDouble);
|
||||||
|
vector3d.set(0.0D, paramDouble, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup4.setTransform(transform3D1);
|
||||||
|
}
|
||||||
|
transform3D1.rotY(-1.5707963267948966D);
|
||||||
|
transform3D1.setScale(paramDouble);
|
||||||
|
vector3d.set(-paramDouble, 0.0D, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup5.setTransform(transform3D1);
|
||||||
|
transform3D1.rotY(Math.PI);
|
||||||
|
transform3D1.setScale(paramDouble);
|
||||||
|
vector3d.set(0.0D, 0.0D, -paramDouble);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup6.setTransform(transform3D1);
|
||||||
|
this.mBrGrp.compile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/ColoredCube.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
465
Cube_Demo/cube_demo/CubeApp.java
Normal file
|
@ -0,0 +1,465 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.behaviors.vp.OrbitBehavior;
|
||||||
|
import com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior;
|
||||||
|
import com.sun.j3d.utils.geometry.Sphere;
|
||||||
|
import com.sun.j3d.utils.image.TextureLoader;
|
||||||
|
import com.sun.j3d.utils.universe.SimpleUniverse;
|
||||||
|
import com.sun.j3d.utils.universe.ViewingPlatform;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScDllWrapper;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScEx;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScStdData;
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Component;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.EventQueue;
|
||||||
|
import java.awt.GraphicsConfiguration;
|
||||||
|
import java.awt.Image;
|
||||||
|
import java.awt.event.FocusAdapter;
|
||||||
|
import java.awt.event.FocusEvent;
|
||||||
|
import java.awt.event.KeyAdapter;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.lang.management.ManagementFactory;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import javax.media.j3d.AmbientLight;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.Background;
|
||||||
|
import javax.media.j3d.BoundingSphere;
|
||||||
|
import javax.media.j3d.Bounds;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Canvas3D;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.TextureAttributes;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.UIManager;
|
||||||
|
import javax.swing.UnsupportedLookAndFeelException;
|
||||||
|
import javax.vecmath.AxisAngle4d;
|
||||||
|
import javax.vecmath.Color4f;
|
||||||
|
import javax.vecmath.Matrix4d;
|
||||||
|
import javax.vecmath.Point3d;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
public class CubeApp extends JFrame {
|
||||||
|
private final int mBoundsRange = 1000;
|
||||||
|
|
||||||
|
private int mSceneNo;
|
||||||
|
|
||||||
|
private double mHandSpan;
|
||||||
|
|
||||||
|
private double mHandAngle;
|
||||||
|
|
||||||
|
private ReadingThread mReadingThread = new ReadingThread(this);
|
||||||
|
|
||||||
|
private int mDevIdx;
|
||||||
|
|
||||||
|
private TransformGroup mCubeTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mMirrCubeTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private Transform3D mCubeTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mCubeInvTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mRotTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mMirrTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mMirrXzTf = new Transform3D();
|
||||||
|
|
||||||
|
private Vector3d mV = new Vector3d();
|
||||||
|
|
||||||
|
private Matrix4d mMatrix4d = new Matrix4d();
|
||||||
|
|
||||||
|
private Vector3d mXAxis = new Vector3d();
|
||||||
|
|
||||||
|
private Vector3d mYAxis = new Vector3d();
|
||||||
|
|
||||||
|
private Vector3d mZAxis = new Vector3d();
|
||||||
|
|
||||||
|
private final Vector3d mUx = new Vector3d(1.0D, 0.0D, 0.0D);
|
||||||
|
|
||||||
|
private final Vector3d mUy = new Vector3d(0.0D, 1.0D, 0.0D);
|
||||||
|
|
||||||
|
private final Vector3d mUz = new Vector3d(0.0D, 0.0D, 1.0D);
|
||||||
|
|
||||||
|
private AxisAngle4d mXAxisAngle = new AxisAngle4d();
|
||||||
|
|
||||||
|
private AxisAngle4d mYAxisAngle = new AxisAngle4d();
|
||||||
|
|
||||||
|
private AxisAngle4d mZAxisAngle = new AxisAngle4d();
|
||||||
|
|
||||||
|
private double mX;
|
||||||
|
|
||||||
|
private double mY;
|
||||||
|
|
||||||
|
private double mZ;
|
||||||
|
|
||||||
|
private ViewingPlatform mVp;
|
||||||
|
|
||||||
|
private JPanel mGraphicPanel;
|
||||||
|
|
||||||
|
public int getDevIdx() {
|
||||||
|
return this.mDevIdx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CubeApp() {
|
||||||
|
GraphicsConfiguration graphicsConfiguration = SimpleUniverse.getPreferredConfiguration();
|
||||||
|
Canvas3D canvas3D = new Canvas3D(graphicsConfiguration);
|
||||||
|
SimpleUniverse simpleUniverse = new SimpleUniverse(canvas3D);
|
||||||
|
BranchGroup branchGroup = null;
|
||||||
|
OrbitBehavior orbitBehavior = new OrbitBehavior(canvas3D);
|
||||||
|
ArrayList<Image> arrayList = new ArrayList();
|
||||||
|
String str1 = System.getProperty("os.name");
|
||||||
|
boolean bool = str1.contains("OS X");
|
||||||
|
this.mVp = simpleUniverse.getViewingPlatform();
|
||||||
|
Image image1 = getToolkit().getImage(getClass().getResource("/pics/cube_16.png"));
|
||||||
|
Image image2 = getToolkit().getImage(getClass().getResource("/pics/cube_32.png"));
|
||||||
|
Image image3 = getToolkit().getImage(getClass().getResource("/pics/cube_64.png"));
|
||||||
|
arrayList.add(image1);
|
||||||
|
arrayList.add(image2);
|
||||||
|
arrayList.add(image3);
|
||||||
|
setIconImages(arrayList);
|
||||||
|
try {
|
||||||
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||||
|
} catch (UnsupportedLookAndFeelException unsupportedLookAndFeelException) {
|
||||||
|
unsupportedLookAndFeelException.printStackTrace();
|
||||||
|
} catch (IllegalAccessException illegalAccessException) {
|
||||||
|
illegalAccessException.printStackTrace();
|
||||||
|
} catch (InstantiationException instantiationException) {
|
||||||
|
instantiationException.printStackTrace();
|
||||||
|
} catch (ClassNotFoundException classNotFoundException) {
|
||||||
|
classNotFoundException.printStackTrace();
|
||||||
|
}
|
||||||
|
initComponents();
|
||||||
|
String str2 = bool ? getClass().getSimpleName() : getTitle();
|
||||||
|
this.mGraphicPanel.add("Center", (Component)canvas3D);
|
||||||
|
simpleUniverse.getViewer().getView().setBackClipDistance(1000.0D);
|
||||||
|
branchGroup = createCubeSceneGraph();
|
||||||
|
setViewPos(this.mVp);
|
||||||
|
orbitBehavior.setSchedulingBounds((Bounds)new BoundingSphere(new Point3d(), 1000.0D));
|
||||||
|
orbitBehavior.setZoomFactor(5.0D);
|
||||||
|
this.mVp.setViewPlatformBehavior((ViewPlatformBehavior)orbitBehavior);
|
||||||
|
this.mMatrix4d.setIdentity();
|
||||||
|
this.mMatrix4d.setM11(-1.0D);
|
||||||
|
this.mMirrXzTf.set(this.mMatrix4d);
|
||||||
|
branchGroup.compile();
|
||||||
|
simpleUniverse.addBranchGraph(branchGroup);
|
||||||
|
this.mGraphicPanel.requestFocus();
|
||||||
|
try {
|
||||||
|
String str3 = ManagementFactory.getRuntimeMXBean().getName();
|
||||||
|
int i = str3.indexOf('@');
|
||||||
|
String str4 = str3.substring(0, i);
|
||||||
|
ScDllWrapper.scConnect2(false, str2);
|
||||||
|
this.mReadingThread.start();
|
||||||
|
} catch (ScEx scEx) {
|
||||||
|
JOptionPane.showMessageDialog(this.mGraphicPanel, "No connection to SpaceControl driver!\nMove the cube with keys 1-6 and shift.", "Connection Error", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setViewPos(ViewingPlatform paramViewingPlatform) {
|
||||||
|
TransformGroup transformGroup = paramViewingPlatform.getViewPlatformTransform();
|
||||||
|
Transform3D transform3D1 = new Transform3D();
|
||||||
|
Transform3D transform3D2 = new Transform3D();
|
||||||
|
transformGroup.getTransform(transform3D2);
|
||||||
|
transform3D2.rotY(Math.toRadians(0.0D));
|
||||||
|
transform3D2.rotX(Math.toRadians(-5.0D));
|
||||||
|
transform3D1.mul(transform3D2);
|
||||||
|
transform3D2.setTranslation(new Vector3d(0.0D, 5.0D, 18.0D));
|
||||||
|
transform3D1.mul(transform3D2);
|
||||||
|
transformGroup.setTransform(transform3D1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BranchGroup createCubeSceneGraph() {
|
||||||
|
BranchGroup branchGroup1 = new BranchGroup();
|
||||||
|
BranchGroup branchGroup2 = new BranchGroup();
|
||||||
|
TransformGroup transformGroup = new TransformGroup();
|
||||||
|
Floor floor = new Floor();
|
||||||
|
FloorShade floorShade1 = new FloorShade(0, 16.0D, 8.0D, this.mGraphicPanel);
|
||||||
|
FloorShade floorShade2 = new FloorShade(1, 16.0D, 8.0D, this.mGraphicPanel);
|
||||||
|
FloorShade floorShade3 = new FloorShade(2, 16.0D, 8.0D, this.mGraphicPanel);
|
||||||
|
FloorShade floorShade4 = new FloorShade(3, 16.0D, 8.0D, this.mGraphicPanel);
|
||||||
|
FloorBack floorBack = new FloorBack(16.0D, 16.0D, -8.0D);
|
||||||
|
AmbientLight ambientLight = new AmbientLight();
|
||||||
|
Appearance appearance1 = new Appearance();
|
||||||
|
Lamp lamp1 = new Lamp(4.5D, 0.0D, 4.5D, 0.25D, 5.0D, false);
|
||||||
|
Lamp lamp2 = new Lamp(-4.5D, 0.0D, -4.5D, 0.25D, 5.0D, false);
|
||||||
|
Lamp lamp3 = new Lamp(-4.5D, 0.0D, -4.5D, 0.25D, 5.0D, true);
|
||||||
|
Lamp lamp4 = new Lamp(4.5D, 0.0D, 4.5D, 0.25D, 5.0D, true);
|
||||||
|
Background background = new Background();
|
||||||
|
ColoredCube coloredCube1 = new ColoredCube(0.4D, false);
|
||||||
|
ColoredCube coloredCube2 = new ColoredCube(0.4D, true);
|
||||||
|
Axes axes = new Axes(-8.0D, 0.2D, -8.0D);
|
||||||
|
TextureLoader textureLoader = new TextureLoader("src/pics/halebop.png", this);
|
||||||
|
Appearance appearance2 = new Appearance();
|
||||||
|
Sphere sphere = new Sphere(1.0F, 6, 50, appearance2);
|
||||||
|
branchGroup2.addChild((Node)background);
|
||||||
|
branchGroup2.addChild((Node)floor);
|
||||||
|
branchGroup2.addChild((Node)floorShade1);
|
||||||
|
branchGroup2.addChild((Node)floorShade2);
|
||||||
|
branchGroup2.addChild((Node)floorShade3);
|
||||||
|
branchGroup2.addChild((Node)floorShade4);
|
||||||
|
branchGroup2.addChild((Node)floorBack);
|
||||||
|
branchGroup2.addChild((Node)lamp1.getBrGrp());
|
||||||
|
branchGroup2.addChild((Node)lamp2.getBrGrp());
|
||||||
|
branchGroup2.addChild((Node)lamp3.getBrGrp());
|
||||||
|
branchGroup2.addChild((Node)lamp4.getBrGrp());
|
||||||
|
branchGroup2.addChild((Node)axes.getBrGrp());
|
||||||
|
branchGroup2.addChild((Node)this.mCubeTfGrp);
|
||||||
|
branchGroup2.addChild((Node)this.mMirrCubeTfGrp);
|
||||||
|
branchGroup2.addChild((Node)ambientLight);
|
||||||
|
appearance2.setTexture(textureLoader.getTexture());
|
||||||
|
appearance2.setTextureAttributes(new TextureAttributes(2, new Transform3D(), new Color4f(), 1));
|
||||||
|
branchGroup1.addChild((Node)new Stars());
|
||||||
|
branchGroup1.addChild((Node)sphere);
|
||||||
|
background.setApplicationBounds((Bounds)new BoundingSphere(new Point3d(), 1000.0D));
|
||||||
|
background.setGeometry(branchGroup1);
|
||||||
|
this.mCubeTfGrp.addChild((Node)coloredCube1.getBrGrp());
|
||||||
|
this.mMirrCubeTfGrp.addChild((Node)coloredCube2.getBrGrp());
|
||||||
|
this.mCubeTfGrp.setCapability(18);
|
||||||
|
this.mMirrCubeTfGrp.setCapability(18);
|
||||||
|
ambientLight.setInfluencingBounds((Bounds)new BoundingSphere(new Point3d(0.0D, 0.0D, 0.0D), 20.0D));
|
||||||
|
return branchGroup2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void repaintDemo(ScStdData paramScStdData) {
|
||||||
|
double d7 = 500.0D;
|
||||||
|
if (!isShowing())
|
||||||
|
return;
|
||||||
|
double d1 = paramScStdData.mA / d7;
|
||||||
|
double d2 = paramScStdData.mB / d7;
|
||||||
|
double d3 = paramScStdData.mC / d7;
|
||||||
|
double d4 = paramScStdData.mX / d7;
|
||||||
|
double d5 = paramScStdData.mY / d7;
|
||||||
|
double d6 = paramScStdData.mZ / d7;
|
||||||
|
this.mX += d4;
|
||||||
|
this.mY += d5;
|
||||||
|
this.mZ += d6;
|
||||||
|
calcScreenRotsRelativeToCube(d1, d2, d3);
|
||||||
|
this.mRotTf.setIdentity();
|
||||||
|
this.mTf.setIdentity();
|
||||||
|
this.mTf.setRotation(this.mXAxisAngle);
|
||||||
|
this.mRotTf.mul(this.mTf);
|
||||||
|
this.mTf.setIdentity();
|
||||||
|
this.mTf.setRotation(this.mYAxisAngle);
|
||||||
|
this.mRotTf.mul(this.mTf);
|
||||||
|
this.mTf.setIdentity();
|
||||||
|
this.mTf.setRotation(this.mZAxisAngle);
|
||||||
|
this.mRotTf.mul(this.mTf);
|
||||||
|
this.mCubeTf.mul(this.mRotTf);
|
||||||
|
if (this.mX > 7.0D)
|
||||||
|
this.mX = 7.0D;
|
||||||
|
if (this.mX < -7.0D)
|
||||||
|
this.mX = -7.0D;
|
||||||
|
if (this.mZ > 7.0D)
|
||||||
|
this.mZ = 7.0D;
|
||||||
|
if (this.mZ < -7.0D)
|
||||||
|
this.mZ = -7.0D;
|
||||||
|
if (this.mY > 7.0D)
|
||||||
|
this.mY = 7.0D;
|
||||||
|
if (this.mY < 0.4D)
|
||||||
|
this.mY = 0.4D;
|
||||||
|
this.mV.set(this.mX, this.mY, this.mZ);
|
||||||
|
this.mCubeTf.setTranslation(this.mV);
|
||||||
|
this.mCubeTfGrp.setTransform(this.mCubeTf);
|
||||||
|
this.mMirrTf.set(this.mMirrXzTf);
|
||||||
|
this.mMirrTf.mul(this.mCubeTf);
|
||||||
|
this.mMirrTf.mul(this.mMirrXzTf);
|
||||||
|
this.mMirrCubeTfGrp.setTransform(this.mMirrTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void calcScreenRotsRelativeToCube(double paramDouble1, double paramDouble2, double paramDouble3) {
|
||||||
|
this.mCubeInvTf.invert(this.mCubeTf);
|
||||||
|
this.mCubeInvTf.transform(this.mUx, this.mXAxis);
|
||||||
|
this.mXAxisAngle.set(this.mXAxis, paramDouble1);
|
||||||
|
this.mCubeInvTf.transform(this.mUy, this.mYAxis);
|
||||||
|
this.mYAxisAngle.set(this.mYAxis, paramDouble2);
|
||||||
|
this.mCubeInvTf.transform(this.mUz, this.mZAxis);
|
||||||
|
this.mZAxisAngle.set(this.mZAxis, paramDouble3);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handleEvent(int paramInt1, int paramInt2) {
|
||||||
|
switch (paramInt2) {
|
||||||
|
case 131081:
|
||||||
|
handleFrontEvent();
|
||||||
|
break;
|
||||||
|
case 131082:
|
||||||
|
handleRightEvent();
|
||||||
|
break;
|
||||||
|
case 131083:
|
||||||
|
handleTopEvent();
|
||||||
|
break;
|
||||||
|
case 131094:
|
||||||
|
handleBackEvent();
|
||||||
|
break;
|
||||||
|
case 131095:
|
||||||
|
handleLeftEvent();
|
||||||
|
break;
|
||||||
|
case 131096:
|
||||||
|
handleBottomEvent();
|
||||||
|
break;
|
||||||
|
case 131084:
|
||||||
|
handleFitEvent();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
System.out.println("*** Event '" + paramInt2 + "' not supported.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleFrontEvent() {
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
rotateToFront();
|
||||||
|
this.mCubeTfGrp.setTransform(this.mCubeTf);
|
||||||
|
repaintDemo(scStdData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rotateToFront() {
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
Vector3d vector3d = new Vector3d();
|
||||||
|
this.mCubeTf.get(vector3d);
|
||||||
|
transform3D.invert(this.mCubeTf);
|
||||||
|
this.mCubeTf.mul(transform3D);
|
||||||
|
this.mCubeTf.setTranslation(vector3d);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleRightEvent() {
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
AxisAngle4d axisAngle4d = new AxisAngle4d(0.0D, 1.0D, 0.0D, -1.5707963267948966D);
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
rotateToFront();
|
||||||
|
transform3D.setRotation(axisAngle4d);
|
||||||
|
this.mCubeTf.mul(transform3D);
|
||||||
|
this.mCubeTfGrp.setTransform(this.mCubeTf);
|
||||||
|
repaintDemo(scStdData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleTopEvent() {
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
AxisAngle4d axisAngle4d = new AxisAngle4d(1.0D, 0.0D, 0.0D, 1.5707963267948966D);
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
rotateToFront();
|
||||||
|
transform3D.setRotation(axisAngle4d);
|
||||||
|
this.mCubeTf.mul(transform3D);
|
||||||
|
this.mCubeTfGrp.setTransform(this.mCubeTf);
|
||||||
|
repaintDemo(scStdData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleBackEvent() {
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
AxisAngle4d axisAngle4d = new AxisAngle4d(0.0D, 1.0D, 0.0D, Math.PI);
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
rotateToFront();
|
||||||
|
transform3D.setRotation(axisAngle4d);
|
||||||
|
this.mCubeTf.mul(transform3D);
|
||||||
|
this.mCubeTfGrp.setTransform(this.mCubeTf);
|
||||||
|
repaintDemo(scStdData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleLeftEvent() {
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
AxisAngle4d axisAngle4d = new AxisAngle4d(0.0D, 1.0D, 0.0D, 1.5707963267948966D);
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
rotateToFront();
|
||||||
|
transform3D.setRotation(axisAngle4d);
|
||||||
|
this.mCubeTf.mul(transform3D);
|
||||||
|
this.mCubeTfGrp.setTransform(this.mCubeTf);
|
||||||
|
repaintDemo(scStdData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleBottomEvent() {
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
AxisAngle4d axisAngle4d = new AxisAngle4d(1.0D, 0.0D, 0.0D, -1.5707963267948966D);
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
rotateToFront();
|
||||||
|
transform3D.setRotation(axisAngle4d);
|
||||||
|
this.mCubeTf.mul(transform3D);
|
||||||
|
this.mCubeTfGrp.setTransform(this.mCubeTf);
|
||||||
|
repaintDemo(scStdData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleFitEvent() {
|
||||||
|
setViewPos(this.mVp);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initComponents() {
|
||||||
|
this.mGraphicPanel = new JPanel();
|
||||||
|
setDefaultCloseOperation(3);
|
||||||
|
setTitle("SC Cube Demo");
|
||||||
|
this.mGraphicPanel.setMinimumSize(new Dimension(640, 480));
|
||||||
|
this.mGraphicPanel.setPreferredSize(new Dimension(640, 480));
|
||||||
|
this.mGraphicPanel.addFocusListener(new FocusAdapter() {
|
||||||
|
public void focusLost(FocusEvent param1FocusEvent) {
|
||||||
|
CubeApp.this.mGraphicPanelFocusLost(param1FocusEvent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.mGraphicPanel.addKeyListener(new KeyAdapter() {
|
||||||
|
public void keyPressed(KeyEvent param1KeyEvent) {
|
||||||
|
CubeApp.this.mGraphicPanelKeyPressed(param1KeyEvent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.mGraphicPanel.setLayout(new BorderLayout());
|
||||||
|
getContentPane().add(this.mGraphicPanel, "Center");
|
||||||
|
pack();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void mGraphicPanelFocusLost(FocusEvent paramFocusEvent) {
|
||||||
|
String str = System.getProperty("os.name");
|
||||||
|
if (str.equals("Linux"))
|
||||||
|
return;
|
||||||
|
this.mGraphicPanel.requestFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void mGraphicPanelKeyPressed(KeyEvent paramKeyEvent) {
|
||||||
|
int i = paramKeyEvent.getKeyCode();
|
||||||
|
char c = paramKeyEvent.getKeyChar();
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
if (c == '1') {
|
||||||
|
scStdData.mX = 1000;
|
||||||
|
} else if (c == '!') {
|
||||||
|
scStdData.mX = -1000;
|
||||||
|
} else if (c == '2') {
|
||||||
|
scStdData.mY = 1000;
|
||||||
|
} else if (c == '"') {
|
||||||
|
scStdData.mY = -1000;
|
||||||
|
} else if (c == '3') {
|
||||||
|
scStdData.mZ = 1000;
|
||||||
|
} else if (c == '<27>') {
|
||||||
|
scStdData.mZ = -1000;
|
||||||
|
} else if (c == '4') {
|
||||||
|
scStdData.mA = 1000;
|
||||||
|
} else if (c == '$') {
|
||||||
|
scStdData.mA = -1000;
|
||||||
|
} else if (c == '5') {
|
||||||
|
scStdData.mB = 1000;
|
||||||
|
} else if (c == '%') {
|
||||||
|
scStdData.mB = -1000;
|
||||||
|
} else if (c == '6') {
|
||||||
|
scStdData.mC = 1000;
|
||||||
|
} else if (c == '&') {
|
||||||
|
scStdData.mC = -1000;
|
||||||
|
}
|
||||||
|
repaintDemo(scStdData);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] paramArrayOfString) {
|
||||||
|
EventQueue.invokeLater(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
CubeApp cubeApp = new CubeApp();
|
||||||
|
cubeApp.setVisible(true);
|
||||||
|
cubeApp.repaintDemo(new ScStdData());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/CubeApp.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
36
Cube_Demo/cube_demo/CubeBehavior.java
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import javax.media.j3d.Behavior;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.media.j3d.WakeupCondition;
|
||||||
|
import javax.media.j3d.WakeupOnTransformChange;
|
||||||
|
|
||||||
|
class CubeBehavior extends Behavior {
|
||||||
|
private TransformGroup mTfGrp;
|
||||||
|
|
||||||
|
private WakeupOnTransformChange mWakeUp;
|
||||||
|
|
||||||
|
public void setTg(TransformGroup paramTransformGroup) {
|
||||||
|
this.mTfGrp = paramTransformGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
CubeBehavior(TransformGroup paramTransformGroup) {
|
||||||
|
this.mTfGrp = paramTransformGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initialize() {
|
||||||
|
this.mWakeUp = new WakeupOnTransformChange(this.mTfGrp);
|
||||||
|
wakeupOn((WakeupCondition)this.mWakeUp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void processStimulus(Enumeration paramEnumeration) {
|
||||||
|
wakeupOn((WakeupCondition)this.mWakeUp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/CubeBehavior.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
129
Cube_Demo/cube_demo/CubeSide.java
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.Geometry;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.QuadArray;
|
||||||
|
import javax.media.j3d.Shape3D;
|
||||||
|
import javax.vecmath.Color3f;
|
||||||
|
import javax.vecmath.Point3d;
|
||||||
|
import javax.vecmath.Vector3f;
|
||||||
|
|
||||||
|
class CubeSide extends Shape3D {
|
||||||
|
private Geometry mGeom;
|
||||||
|
|
||||||
|
private Appearance mApr;
|
||||||
|
|
||||||
|
public CubeSide(int paramInt) {
|
||||||
|
this.mGeom = createGeometry(paramInt);
|
||||||
|
this.mApr = createAppearance(paramInt);
|
||||||
|
setGeometry(this.mGeom);
|
||||||
|
setAppearance(this.mApr);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Geometry createGeometry(int paramInt) {
|
||||||
|
int i = 7;
|
||||||
|
int j = i * i * 4;
|
||||||
|
QuadArray quadArray = new QuadArray(j, 7);
|
||||||
|
int k = 0;
|
||||||
|
int m = 0;
|
||||||
|
Point3d point3d = new Point3d();
|
||||||
|
Color3f color3f1 = new Color3f(1.0F, 1.0F, 0.0F);
|
||||||
|
Color3f color3f2 = new Color3f(0.0F, 0.0F, 0.0F);
|
||||||
|
Vector3f vector3f = new Vector3f(0.0F, 0.0F, 1.0F);
|
||||||
|
int n = 0;
|
||||||
|
double d = 2.0D / i;
|
||||||
|
while (m < i) {
|
||||||
|
double d1 = -1.0D + m * d;
|
||||||
|
while (k < i) {
|
||||||
|
double d2 = -1.0D + k * d;
|
||||||
|
Color3f color3f = isEye(paramInt, k, m) ? color3f2 : color3f1;
|
||||||
|
point3d.set(d2, d1, 0.0D);
|
||||||
|
quadArray.setColor(n, color3f);
|
||||||
|
quadArray.setNormal(n, vector3f);
|
||||||
|
quadArray.setCoordinate(n++, point3d);
|
||||||
|
point3d.set(d2 + d, d1, 0.0D);
|
||||||
|
quadArray.setColor(n, color3f);
|
||||||
|
quadArray.setNormal(n, vector3f);
|
||||||
|
quadArray.setCoordinate(n++, point3d);
|
||||||
|
point3d.set(d2 + d, d1 + d, 0.0D);
|
||||||
|
quadArray.setColor(n, color3f);
|
||||||
|
quadArray.setNormal(n, vector3f);
|
||||||
|
quadArray.setCoordinate(n++, point3d);
|
||||||
|
point3d.set(d2, d1 + d, 0.0D);
|
||||||
|
quadArray.setColor(n, color3f);
|
||||||
|
quadArray.setNormal(n, vector3f);
|
||||||
|
quadArray.setCoordinate(n++, point3d);
|
||||||
|
k++;
|
||||||
|
}
|
||||||
|
k = 0;
|
||||||
|
m++;
|
||||||
|
}
|
||||||
|
return (Geometry)quadArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isEye(int paramInt1, int paramInt2, int paramInt3) {
|
||||||
|
switch (paramInt1) {
|
||||||
|
case 1:
|
||||||
|
if (paramInt2 == 3 && paramInt3 == 3)
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if ((paramInt2 == 1 && paramInt3 == 1) || (paramInt2 == 5 && paramInt3 == 5))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if ((paramInt2 == 1 && paramInt3 == 1) || (paramInt2 == 3 && paramInt3 == 3) || (paramInt2 == 5 && paramInt3 == 5))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
if ((paramInt2 == 1 && paramInt3 == 1) || (paramInt2 == 1 && paramInt3 == 5) || (paramInt2 == 5 && paramInt3 == 1) || (paramInt2 == 5 && paramInt3 == 5))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
if ((paramInt2 == 1 && paramInt3 == 1) || (paramInt2 == 1 && paramInt3 == 5) || (paramInt2 == 3 && paramInt3 == 3) || (paramInt2 == 5 && paramInt3 == 1) || (paramInt2 == 5 && paramInt3 == 5))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
if ((paramInt2 == 1 && paramInt3 == 1) || (paramInt2 == 1 && paramInt3 == 5) || (paramInt2 == 1 && paramInt3 == 3) || (paramInt2 == 5 && paramInt3 == 3) || (paramInt2 == 5 && paramInt3 == 1) || (paramInt2 == 5 && paramInt3 == 5))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Appearance createAppearance(int paramInt) {
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
Material material = new Material();
|
||||||
|
Color3f color3f = new Color3f();
|
||||||
|
switch (paramInt) {
|
||||||
|
case 1:
|
||||||
|
color3f.set(0.3F, 0.0F, 0.0F);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
color3f.set(0.0F, 0.3F, 0.0F);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
color3f.set(0.0F, 0.0F, 0.3F);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
color3f.set(0.3F, 0.3F, 0.0F);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
color3f.set(0.0F, 0.3F, 0.3F);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
color3f.set(0.3F, 0.0F, 0.3F);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
material.setAmbientColor(color3f);
|
||||||
|
appearance.setMaterial(material);
|
||||||
|
return appearance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/CubeSide.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
77
Cube_Demo/cube_demo/Floor.java
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.Geometry;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.QuadArray;
|
||||||
|
import javax.media.j3d.Shape3D;
|
||||||
|
import javax.media.j3d.TransparencyAttributes;
|
||||||
|
import javax.vecmath.Color4f;
|
||||||
|
import javax.vecmath.Point3d;
|
||||||
|
import javax.vecmath.TexCoord2f;
|
||||||
|
|
||||||
|
class Floor extends Shape3D {
|
||||||
|
private final int mGridNum = 8;
|
||||||
|
|
||||||
|
private Geometry mGeom = createGeometry();
|
||||||
|
|
||||||
|
private Appearance mApr = createAppearance();
|
||||||
|
|
||||||
|
public Floor() {
|
||||||
|
setAppearance(this.mApr);
|
||||||
|
setGeometry(this.mGeom);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Geometry createGeometry() {
|
||||||
|
QuadArray quadArray = new QuadArray(1040, 15);
|
||||||
|
Point3d point3d = new Point3d();
|
||||||
|
TexCoord2f texCoord2f = new TexCoord2f();
|
||||||
|
Color4f color4f1 = new Color4f(1.0F, 0.0F, 0.0F, 1.0F);
|
||||||
|
Color4f color4f2 = new Color4f(0.157F, 0.5F, 1.0F, 0.8F);
|
||||||
|
Color4f color4f3 = new Color4f(1.0F, 1.0F, 1.0F, 0.8F);
|
||||||
|
Color4f color4f4 = color4f2;
|
||||||
|
int i = 0;
|
||||||
|
float[] arrayOfFloat = new float[3];
|
||||||
|
arrayOfFloat[0] = 0.0F;
|
||||||
|
arrayOfFloat[1] = 1.0F;
|
||||||
|
arrayOfFloat[2] = 0.0F;
|
||||||
|
for (int j = -8; j < 8; j++) {
|
||||||
|
for (int k = -8; k < 8; k++) {
|
||||||
|
point3d.set(k, 0.0D, j);
|
||||||
|
quadArray.setCoordinate(i, point3d);
|
||||||
|
quadArray.setColor(i, color4f4);
|
||||||
|
quadArray.setNormal(i++, arrayOfFloat);
|
||||||
|
point3d.set(k, 0.0D, (j + 1));
|
||||||
|
quadArray.setCoordinate(i, point3d);
|
||||||
|
quadArray.setColor(i, color4f4);
|
||||||
|
quadArray.setNormal(i++, arrayOfFloat);
|
||||||
|
point3d.set((k + 1), 0.0D, (j + 1));
|
||||||
|
quadArray.setCoordinate(i, point3d);
|
||||||
|
quadArray.setColor(i, color4f4);
|
||||||
|
quadArray.setNormal(i++, arrayOfFloat);
|
||||||
|
point3d.set((k + 1), 0.0D, j);
|
||||||
|
quadArray.setCoordinate(i, point3d);
|
||||||
|
quadArray.setColor(i, color4f4);
|
||||||
|
quadArray.setNormal(i++, arrayOfFloat);
|
||||||
|
color4f4 = (color4f4 == color4f2) ? color4f3 : color4f2;
|
||||||
|
}
|
||||||
|
color4f4 = (color4f4 == color4f2) ? color4f3 : color4f2;
|
||||||
|
}
|
||||||
|
return (Geometry)quadArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Appearance createAppearance() {
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
Material material = new Material();
|
||||||
|
TransparencyAttributes transparencyAttributes = new TransparencyAttributes(1, 0.0F);
|
||||||
|
appearance.setMaterial(material);
|
||||||
|
appearance.setTransparencyAttributes(transparencyAttributes);
|
||||||
|
return appearance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/Floor.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
51
Cube_Demo/cube_demo/FloorBack.java
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.Geometry;
|
||||||
|
import javax.media.j3d.QuadArray;
|
||||||
|
import javax.media.j3d.Shape3D;
|
||||||
|
import javax.vecmath.Color3f;
|
||||||
|
import javax.vecmath.Point3d;
|
||||||
|
|
||||||
|
class FloorBack extends Shape3D {
|
||||||
|
private Geometry mGeom;
|
||||||
|
|
||||||
|
private Appearance mApr;
|
||||||
|
|
||||||
|
public FloorBack(double paramDouble1, double paramDouble2, double paramDouble3) {
|
||||||
|
this.mGeom = createGeometry(paramDouble1, paramDouble2, paramDouble3);
|
||||||
|
this.mApr = createAppearance();
|
||||||
|
setAppearance(this.mApr);
|
||||||
|
setGeometry(this.mGeom);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Geometry createGeometry(double paramDouble1, double paramDouble2, double paramDouble3) {
|
||||||
|
QuadArray quadArray = new QuadArray(4, 5);
|
||||||
|
Point3d point3d = new Point3d();
|
||||||
|
Color3f color3f = new Color3f(0.0F, 0.0F, 0.3F);
|
||||||
|
int i = 0;
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, paramDouble3, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setColor(i, color3f);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, paramDouble3, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setColor(i, color3f);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(paramDouble1 / 2.0D, paramDouble3, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setColor(i, color3f);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(paramDouble1 / 2.0D, paramDouble3, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setColor(i, color3f);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
return (Geometry)quadArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Appearance createAppearance() {
|
||||||
|
return new Appearance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/FloorBack.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
100
Cube_Demo/cube_demo/FloorShade.java
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.image.TextureLoader;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.Geometry;
|
||||||
|
import javax.media.j3d.ImageComponent2D;
|
||||||
|
import javax.media.j3d.QuadArray;
|
||||||
|
import javax.media.j3d.Shape3D;
|
||||||
|
import javax.media.j3d.Texture;
|
||||||
|
import javax.media.j3d.Texture2D;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.vecmath.Point3d;
|
||||||
|
import javax.vecmath.TexCoord2f;
|
||||||
|
|
||||||
|
class FloorShade extends Shape3D {
|
||||||
|
private Geometry mGeom;
|
||||||
|
|
||||||
|
private Appearance mApr;
|
||||||
|
|
||||||
|
public FloorShade(int paramInt, double paramDouble1, double paramDouble2, JPanel paramJPanel) {
|
||||||
|
this.mGeom = createGeometry(paramInt, paramDouble1, paramDouble2);
|
||||||
|
this.mApr = createAppearance(paramJPanel);
|
||||||
|
setAppearance(this.mApr);
|
||||||
|
setGeometry(this.mGeom);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Geometry createGeometry(int paramInt, double paramDouble1, double paramDouble2) {
|
||||||
|
QuadArray quadArray = new QuadArray(4, 33);
|
||||||
|
Point3d point3d = new Point3d();
|
||||||
|
int i = 0;
|
||||||
|
TexCoord2f texCoord2f = new TexCoord2f();
|
||||||
|
switch (paramInt) {
|
||||||
|
case 0:
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, 0.0D, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, -paramDouble2, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(paramDouble1 / 2.0D, -paramDouble2, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(paramDouble1 / 2.0D, 0.0D, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
point3d.set(paramDouble1 / 2.0D, 0.0D, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(paramDouble1 / 2.0D, -paramDouble2, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(paramDouble1 / 2.0D, -paramDouble2, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(paramDouble1 / 2.0D, 0.0D, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
point3d.set(paramDouble1 / 2.0D, 0.0D, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(paramDouble1 / 2.0D, -paramDouble2, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, -paramDouble2, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, 0.0D, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, 0.0D, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, -paramDouble2, -paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, -paramDouble2, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
point3d.set(-paramDouble1 / 2.0D, 0.0D, paramDouble1 / 2.0D);
|
||||||
|
quadArray.setCoordinate(i++, point3d);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i = 0;
|
||||||
|
texCoord2f.set(0.0F, 1.0F);
|
||||||
|
quadArray.setTextureCoordinate(0, i++, texCoord2f);
|
||||||
|
texCoord2f.set(0.0F, 0.0F);
|
||||||
|
quadArray.setTextureCoordinate(0, i++, texCoord2f);
|
||||||
|
texCoord2f.set(1.0F, 0.0F);
|
||||||
|
quadArray.setTextureCoordinate(0, i++, texCoord2f);
|
||||||
|
texCoord2f.set(1.0F, 1.0F);
|
||||||
|
quadArray.setTextureCoordinate(0, i++, texCoord2f);
|
||||||
|
return (Geometry)quadArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Appearance createAppearance(JPanel paramJPanel) {
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
TextureLoader textureLoader = new TextureLoader("src/pics/logo_big.png", paramJPanel);
|
||||||
|
ImageComponent2D imageComponent2D = textureLoader.getImage();
|
||||||
|
Texture2D texture2D = (Texture2D)textureLoader.getTexture();
|
||||||
|
appearance.setTexture((Texture)texture2D);
|
||||||
|
return appearance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/FloorShade.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
112
Cube_Demo/cube_demo/Lamp.java
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.geometry.Cone;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.BoundingSphere;
|
||||||
|
import javax.media.j3d.Bounds;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.ColoringAttributes;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.SpotLight;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Matrix4d;
|
||||||
|
import javax.vecmath.Point3d;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class Lamp {
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Lamp(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, boolean paramBoolean) {
|
||||||
|
Cone cone1 = new Cone((float)paramDouble4, (float)paramDouble5, 1, null);
|
||||||
|
Cone cone2 = new Cone((float)paramDouble4 * 2.0F, (float)paramDouble4, 1, null);
|
||||||
|
Cone cone3 = new Cone((float)paramDouble4 * 2.0F, 0.0F, 1, null);
|
||||||
|
Cone cone4 = new Cone((float)paramDouble4, (float)paramDouble4 / 2.0F, 1, null);
|
||||||
|
Vector3d vector3d = new Vector3d(paramDouble1, paramDouble2, paramDouble3);
|
||||||
|
Transform3D transform3D1 = new Transform3D();
|
||||||
|
Transform3D transform3D2 = new Transform3D();
|
||||||
|
TransformGroup transformGroup1 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup2 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup3 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup4 = new TransformGroup();
|
||||||
|
TransformGroup transformGroup5 = new TransformGroup();
|
||||||
|
ColoringAttributes coloringAttributes = new ColoringAttributes();
|
||||||
|
Appearance appearance1 = new Appearance();
|
||||||
|
Appearance appearance2 = new Appearance();
|
||||||
|
Appearance appearance3 = new Appearance();
|
||||||
|
Appearance appearance4 = new Appearance();
|
||||||
|
Material material1 = new Material();
|
||||||
|
Material material2 = new Material();
|
||||||
|
Material material3 = new Material();
|
||||||
|
transformGroup1.addChild((Node)cone1);
|
||||||
|
transformGroup2.addChild((Node)cone2);
|
||||||
|
transformGroup3.addChild((Node)cone3);
|
||||||
|
transformGroup4.addChild((Node)cone4);
|
||||||
|
transformGroup5.addChild((Node)transformGroup1);
|
||||||
|
transformGroup5.addChild((Node)transformGroup2);
|
||||||
|
transformGroup5.addChild((Node)transformGroup3);
|
||||||
|
transformGroup5.addChild((Node)transformGroup4);
|
||||||
|
this.mBrGrp.addChild((Node)transformGroup5);
|
||||||
|
vector3d.set(0.0D, paramDouble5 / 2.0D, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup1.setTransform(transform3D1);
|
||||||
|
vector3d.set(0.0D, paramDouble5, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup2.setTransform(transform3D1);
|
||||||
|
vector3d.set(0.0D, paramDouble5 - paramDouble4 / 2.0D - 0.01D, 0.0D);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup3.setTransform(transform3D1);
|
||||||
|
vector3d.set(0.0D, paramDouble5 - paramDouble5 / 20.0D, 0.0D);
|
||||||
|
transform3D1.rotX(Math.PI);
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
transformGroup4.setTransform(transform3D1);
|
||||||
|
if (!paramBoolean) {
|
||||||
|
SpotLight spotLight = new SpotLight();
|
||||||
|
Point3d point3d = new Point3d(0.0D, (float)(paramDouble5 + paramDouble5 / 10.0D), 0.0D);
|
||||||
|
spotLight.setPosition((float)point3d.getX(), (float)point3d.getY(), (float)point3d.getZ());
|
||||||
|
spotLight.setInfluencingBounds((Bounds)new BoundingSphere(point3d, 20.0D));
|
||||||
|
spotLight.setSpreadAngle(1.5707964F);
|
||||||
|
spotLight.setDirection(0.0F, -1.0F, 0.0F);
|
||||||
|
spotLight.setConcentration(2.0F);
|
||||||
|
transformGroup5.addChild((Node)spotLight);
|
||||||
|
}
|
||||||
|
vector3d.set(paramDouble1, paramDouble2, paramDouble3);
|
||||||
|
transform3D1.setIdentity();
|
||||||
|
transform3D1.setTranslation(vector3d);
|
||||||
|
if (paramBoolean) {
|
||||||
|
Matrix4d matrix4d = new Matrix4d();
|
||||||
|
transform3D1.get(matrix4d);
|
||||||
|
matrix4d.setM11(-matrix4d.getM11());
|
||||||
|
transform3D1.set(matrix4d);
|
||||||
|
}
|
||||||
|
transformGroup5.setTransform(transform3D1);
|
||||||
|
material1.setAmbientColor(0.0F, 0.2F, 0.0F);
|
||||||
|
material1.setDiffuseColor(0.0F, 1.0F, 0.0F);
|
||||||
|
material1.setShininess(128.0F);
|
||||||
|
appearance1.setMaterial(material1);
|
||||||
|
cone1.setAppearance(appearance1);
|
||||||
|
material2.setAmbientColor(0.2F, 0.0F, 0.0F);
|
||||||
|
material2.setDiffuseColor(1.0F, 0.0F, 0.0F);
|
||||||
|
material2.setShininess(128.0F);
|
||||||
|
appearance2.setMaterial(material2);
|
||||||
|
cone2.setAppearance(appearance2);
|
||||||
|
coloringAttributes.setColor(0.8F, 0.0F, 0.0F);
|
||||||
|
appearance3.setColoringAttributes(coloringAttributes);
|
||||||
|
cone3.setAppearance(appearance3);
|
||||||
|
material3.setEmissiveColor(1.0F, 1.0F, 1.0F);
|
||||||
|
appearance4.setMaterial(material3);
|
||||||
|
cone4.setAppearance(appearance4);
|
||||||
|
this.mBrGrp.compile();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/Lamp.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
62
Cube_Demo/cube_demo/ReadingThread.java
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScDllWrapper;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScEx;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScStdData;
|
||||||
|
|
||||||
|
public class ReadingThread extends Thread {
|
||||||
|
private CubeApp mApp;
|
||||||
|
|
||||||
|
private int mDevIdx;
|
||||||
|
|
||||||
|
private boolean mIsReading;
|
||||||
|
|
||||||
|
public void setDevIdx(int paramInt) {
|
||||||
|
this.mDevIdx = paramInt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopReadingThread() {
|
||||||
|
this.mIsReading = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReadingThread(CubeApp paramCubeApp) {
|
||||||
|
this.mApp = paramCubeApp;
|
||||||
|
this.mDevIdx = paramCubeApp.getDevIdx();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
boolean bool = true;
|
||||||
|
int i = 0;
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
this.mIsReading = true;
|
||||||
|
while (this.mIsReading) {
|
||||||
|
try {
|
||||||
|
ScDllWrapper.scFetchStdData(this.mDevIdx, scStdData);
|
||||||
|
if (scStdData.mEvent > -1) {
|
||||||
|
this.mApp.handleEvent(this.mDevIdx, scStdData.mEvent);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
this.mApp.repaintDemo(scStdData);
|
||||||
|
} catch (ScEx scEx) {
|
||||||
|
if (bool) {
|
||||||
|
this.mApp.repaintDemo(scStdData);
|
||||||
|
if (i++ > 3) {
|
||||||
|
i = 0;
|
||||||
|
bool = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("*** Reading thread stopped.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopp() {
|
||||||
|
this.mIsReading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/ReadingThread.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
51
Cube_Demo/cube_demo/Stars.java
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
package cube_demo;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.Geometry;
|
||||||
|
import javax.media.j3d.PointArray;
|
||||||
|
import javax.media.j3d.PointAttributes;
|
||||||
|
import javax.media.j3d.Shape3D;
|
||||||
|
|
||||||
|
class Stars extends Shape3D {
|
||||||
|
private Geometry mGeom = createGeometry();
|
||||||
|
|
||||||
|
private Appearance mApr = createAppearance();
|
||||||
|
|
||||||
|
public Stars() {
|
||||||
|
setGeometry(this.mGeom);
|
||||||
|
setAppearance(this.mApr);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Geometry createGeometry() {
|
||||||
|
int i = 1000;
|
||||||
|
PointArray pointArray = new PointArray(i, 5);
|
||||||
|
float[] arrayOfFloat1 = new float[3];
|
||||||
|
float[] arrayOfFloat2 = new float[3];
|
||||||
|
Random random = new Random();
|
||||||
|
for (int j = 0; j < i; j++) {
|
||||||
|
arrayOfFloat1[0] = random.nextFloat() - 0.5F;
|
||||||
|
arrayOfFloat1[1] = random.nextFloat() - 0.5F;
|
||||||
|
arrayOfFloat1[2] = random.nextFloat() - 0.5F;
|
||||||
|
pointArray.setCoordinates(j, arrayOfFloat1);
|
||||||
|
arrayOfFloat2[2] = random.nextFloat() * 0.8F + 0.2F;
|
||||||
|
arrayOfFloat2[1] = random.nextFloat() * 0.8F + 0.2F;
|
||||||
|
arrayOfFloat2[0] = random.nextFloat() * 0.8F + 0.2F;
|
||||||
|
pointArray.setColor(j, arrayOfFloat2);
|
||||||
|
}
|
||||||
|
return (Geometry)pointArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Appearance createAppearance() {
|
||||||
|
PointAttributes pointAttributes = new PointAttributes(2.0F, true);
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
appearance.setPointAttributes(pointAttributes);
|
||||||
|
return appearance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Cube_Demo.jar!/cube_demo/Stars.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
BIN
Cube_Demo/pics/cube.ico
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
Cube_Demo/pics/cube_16.png
Normal file
After Width: | Height: | Size: 691 B |
BIN
Cube_Demo/pics/cube_32.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
Cube_Demo/pics/cube_64.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
Cube_Demo/pics/halebop.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
Cube_Demo/pics/logo_big.png
Normal file
After Width: | Height: | Size: 25 KiB |
8
Roboter_Demo/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Ant-Version: Apache Ant 1.9.7
|
||||||
|
Created-By: 1.8.0_172-b11 (Oracle Corporation)
|
||||||
|
Class-Path: lib/SC_DLL_Wrapper.jar lib/jogamp-fat.jar lib/j3dcore.jar
|
||||||
|
lib/j3dutils.jar lib/vecmath.jar
|
||||||
|
X-COMMENT: Main-Class will be added automatically by build
|
||||||
|
Main-Class: roboter_demo.RoboterApp
|
||||||
|
|
BIN
Roboter_Demo/pics/roboter.ico
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
Roboter_Demo/pics/roboter_16.png
Normal file
After Width: | Height: | Size: 519 B |
BIN
Roboter_Demo/pics/roboter_32.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
Roboter_Demo/pics/roboter_64.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
143
Roboter_Demo/roboter_demo/Base.java
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.geometry.Box;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class Base {
|
||||||
|
private final float mWidth = 1.0F;
|
||||||
|
|
||||||
|
private final float mScale = 1.0F;
|
||||||
|
|
||||||
|
private final Vector3d mNullVec = new Vector3d(0.0D, 0.5D, 0.0D);
|
||||||
|
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
private TransformGroup mBaseTfGrp;
|
||||||
|
|
||||||
|
private TransformGroup mUpperArmTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private UpperArm mUpperArm = new UpperArm();
|
||||||
|
|
||||||
|
private double mAngle;
|
||||||
|
|
||||||
|
private Transform3D mRotTf = new Transform3D();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incUpperArmAngle() {
|
||||||
|
this.mUpperArm.incAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decUpperArmAngle() {
|
||||||
|
this.mUpperArm.decAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incForeArmAngle() {
|
||||||
|
this.mUpperArm.incForeArmAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decForeArmAngle() {
|
||||||
|
this.mUpperArm.decForeArmAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incWristAngle() {
|
||||||
|
this.mUpperArm.incWristAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decWristAngle() {
|
||||||
|
this.mUpperArm.decWristAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle() {
|
||||||
|
this.mUpperArm.incHandAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandAngle() {
|
||||||
|
this.mUpperArm.decHandAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan() {
|
||||||
|
this.mUpperArm.incHandSpan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandSpan() {
|
||||||
|
this.mUpperArm.decHandSpan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incUpperArmAngle(double paramDouble) {
|
||||||
|
this.mUpperArm.incAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incForeArmAngle(double paramDouble) {
|
||||||
|
this.mUpperArm.incForeArmAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incWristAngle(double paramDouble) {
|
||||||
|
this.mUpperArm.incWristAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle(double paramDouble) {
|
||||||
|
this.mUpperArm.incHandAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan(double paramDouble) {
|
||||||
|
this.mUpperArm.incHandSpan(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Base(TransformGroup paramTransformGroup) {
|
||||||
|
Box box = new Box(0.5F, 0.5F, 0.25F, 1, null);
|
||||||
|
Material material = new Material();
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
Vector3d vector3d = new Vector3d();
|
||||||
|
this.mBaseTfGrp = paramTransformGroup;
|
||||||
|
this.mBaseTfGrp.addChild((Node)box);
|
||||||
|
this.mUpperArmTfGrp.addChild((Node)this.mUpperArm.getBrGrp());
|
||||||
|
this.mBaseTfGrp.addChild((Node)this.mUpperArmTfGrp);
|
||||||
|
this.mBrGrp.addChild((Node)this.mBaseTfGrp);
|
||||||
|
vector3d.set(0.0D, 0.5D, 0.0D);
|
||||||
|
transform3D.setTranslation(vector3d);
|
||||||
|
this.mBaseTfGrp.setTransform(transform3D);
|
||||||
|
vector3d.set(0.5D, 0.875D, 0.25D);
|
||||||
|
transform3D.setTranslation(vector3d);
|
||||||
|
this.mUpperArmTfGrp.setTransform(transform3D);
|
||||||
|
material.setDiffuseColor(1.0F, 0.0F, 0.0F);
|
||||||
|
material.setAmbientColor(0.4F, 0.0F, 0.0F);
|
||||||
|
appearance.setMaterial(material);
|
||||||
|
box.setAppearance(appearance);
|
||||||
|
this.mBaseTfGrp.setCapability(18);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incBaseAngle() {
|
||||||
|
rotateBase(0.02D);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rotateBase(double paramDouble) {
|
||||||
|
this.mAngle += paramDouble;
|
||||||
|
this.mRotTf.rotY(this.mAngle);
|
||||||
|
this.mRotTf.setTranslation(this.mNullVec);
|
||||||
|
this.mBaseTfGrp.setTransform(this.mRotTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incBaseAngle(double paramDouble) {
|
||||||
|
rotateBase(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decBaseAngle() {
|
||||||
|
rotateBase(-0.02D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/Base.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
77
Roboter_Demo/roboter_demo/Floor.java
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.Geometry;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.QuadArray;
|
||||||
|
import javax.media.j3d.Shape3D;
|
||||||
|
import javax.media.j3d.TransparencyAttributes;
|
||||||
|
import javax.vecmath.Color4f;
|
||||||
|
import javax.vecmath.Point3d;
|
||||||
|
import javax.vecmath.TexCoord2f;
|
||||||
|
|
||||||
|
class Floor extends Shape3D {
|
||||||
|
private final int mGridNum = 8;
|
||||||
|
|
||||||
|
private Geometry mGeom = createGeometry();
|
||||||
|
|
||||||
|
private Appearance mApr = createAppearance();
|
||||||
|
|
||||||
|
public Floor() {
|
||||||
|
setAppearance(this.mApr);
|
||||||
|
setGeometry(this.mGeom);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Geometry createGeometry() {
|
||||||
|
QuadArray quadArray = new QuadArray(1040, 15);
|
||||||
|
Point3d point3d = new Point3d();
|
||||||
|
TexCoord2f texCoord2f = new TexCoord2f();
|
||||||
|
Color4f color4f1 = new Color4f(1.0F, 0.0F, 0.0F, 1.0F);
|
||||||
|
Color4f color4f2 = new Color4f(0.157F, 0.5F, 1.0F, 0.8F);
|
||||||
|
Color4f color4f3 = new Color4f(1.0F, 1.0F, 1.0F, 0.8F);
|
||||||
|
Color4f color4f4 = color4f2;
|
||||||
|
int i = 0;
|
||||||
|
float[] arrayOfFloat = new float[3];
|
||||||
|
arrayOfFloat[0] = 0.0F;
|
||||||
|
arrayOfFloat[1] = 1.0F;
|
||||||
|
arrayOfFloat[2] = 0.0F;
|
||||||
|
for (int j = -8; j < 8; j++) {
|
||||||
|
for (int k = -8; k < 8; k++) {
|
||||||
|
point3d.set(k, 0.0D, j);
|
||||||
|
quadArray.setCoordinate(i, point3d);
|
||||||
|
quadArray.setColor(i, color4f4);
|
||||||
|
quadArray.setNormal(i++, arrayOfFloat);
|
||||||
|
point3d.set(k, 0.0D, (j + 1));
|
||||||
|
quadArray.setCoordinate(i, point3d);
|
||||||
|
quadArray.setColor(i, color4f4);
|
||||||
|
quadArray.setNormal(i++, arrayOfFloat);
|
||||||
|
point3d.set((k + 1), 0.0D, (j + 1));
|
||||||
|
quadArray.setCoordinate(i, point3d);
|
||||||
|
quadArray.setColor(i, color4f4);
|
||||||
|
quadArray.setNormal(i++, arrayOfFloat);
|
||||||
|
point3d.set((k + 1), 0.0D, j);
|
||||||
|
quadArray.setCoordinate(i, point3d);
|
||||||
|
quadArray.setColor(i, color4f4);
|
||||||
|
quadArray.setNormal(i++, arrayOfFloat);
|
||||||
|
color4f4 = (color4f4 == color4f2) ? color4f3 : color4f2;
|
||||||
|
}
|
||||||
|
color4f4 = (color4f4 == color4f2) ? color4f3 : color4f2;
|
||||||
|
}
|
||||||
|
return (Geometry)quadArray;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Appearance createAppearance() {
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
Material material = new Material();
|
||||||
|
TransparencyAttributes transparencyAttributes = new TransparencyAttributes(1, 0.0F);
|
||||||
|
appearance.setMaterial(material);
|
||||||
|
appearance.setTransparencyAttributes(transparencyAttributes);
|
||||||
|
return appearance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/Floor.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
129
Roboter_Demo/roboter_demo/ForeArm.java
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.geometry.Box;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class ForeArm {
|
||||||
|
private final float mWidth = 0.25F;
|
||||||
|
|
||||||
|
private final float mLength = 1.0F;
|
||||||
|
|
||||||
|
private final float mScale = 1.0F;
|
||||||
|
|
||||||
|
private final Vector3d mTransTo = new Vector3d(0.0D, 0.375D, 0.0D);
|
||||||
|
|
||||||
|
private final Vector3d mTransFro = new Vector3d(0.0D, -0.375D, 0.0D);
|
||||||
|
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
private TransformGroup mTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mWristTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private Wrist mWrist = new Wrist();
|
||||||
|
|
||||||
|
private double mAngle;
|
||||||
|
|
||||||
|
private Transform3D mRotTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mTrnTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mResTf = new Transform3D();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incWristAngle() {
|
||||||
|
this.mWrist.incAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decWristAngle() {
|
||||||
|
this.mWrist.decAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle() {
|
||||||
|
this.mWrist.incHandAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandAngle() {
|
||||||
|
this.mWrist.decHandAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan() {
|
||||||
|
this.mWrist.incHandSpan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandSpan() {
|
||||||
|
this.mWrist.decHandSpan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incWristAngle(double paramDouble) {
|
||||||
|
this.mWrist.incAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle(double paramDouble) {
|
||||||
|
this.mWrist.incHandAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan(double paramDouble) {
|
||||||
|
this.mWrist.incHandSpan(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ForeArm() {
|
||||||
|
Box box = new Box(0.125F, 0.5F, 0.125F, 1, null);
|
||||||
|
Material material = new Material();
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
Vector3d vector3d = new Vector3d();
|
||||||
|
this.mTfGrp.addChild((Node)box);
|
||||||
|
this.mWristTfGrp.addChild((Node)this.mWrist.getBrGrp());
|
||||||
|
this.mTfGrp.addChild((Node)this.mWristTfGrp);
|
||||||
|
this.mBrGrp.addChild((Node)this.mTfGrp);
|
||||||
|
vector3d.set(0.0D, 0.75D, 0.0D);
|
||||||
|
transform3D.setTranslation(vector3d);
|
||||||
|
this.mWristTfGrp.setTransform(transform3D);
|
||||||
|
material.setDiffuseColor(0.0F, 1.0F, 0.0F);
|
||||||
|
material.setAmbientColor(0.0F, 0.4F, 0.0F);
|
||||||
|
appearance.setMaterial(material);
|
||||||
|
box.setAppearance(appearance);
|
||||||
|
this.mTfGrp.setCapability(18);
|
||||||
|
rotate(0.0D);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incAngle() {
|
||||||
|
rotate(0.02D);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rotate(double paramDouble) {
|
||||||
|
this.mAngle += paramDouble;
|
||||||
|
this.mRotTf.rotZ(this.mAngle);
|
||||||
|
this.mResTf.setIdentity();
|
||||||
|
this.mTrnTf.setTranslation(this.mTransFro);
|
||||||
|
this.mResTf.mul(this.mTrnTf);
|
||||||
|
this.mResTf.mul(this.mRotTf);
|
||||||
|
this.mTrnTf.setTranslation(this.mTransTo);
|
||||||
|
this.mResTf.mul(this.mTrnTf);
|
||||||
|
this.mTfGrp.setTransform(this.mResTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incAngle(double paramDouble) {
|
||||||
|
rotate(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decAngle() {
|
||||||
|
rotate(-0.02D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/ForeArm.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
133
Roboter_Demo/roboter_demo/Hand.java
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.geometry.Box;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class Hand {
|
||||||
|
private final float mWidth = 0.25F;
|
||||||
|
|
||||||
|
private final float mScale = 1.0F;
|
||||||
|
|
||||||
|
private final float mThumbWitdh = 0.025F;
|
||||||
|
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
private TransformGroup mTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mThumbTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mFingersTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private double mSpan;
|
||||||
|
|
||||||
|
private double mAngle;
|
||||||
|
|
||||||
|
private Vector3d mVec = new Vector3d();
|
||||||
|
|
||||||
|
private Transform3D mTrnTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mRotTf = new Transform3D();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Hand() {
|
||||||
|
Box box1 = new Box(0.125F, 0.125F, 0.125F, 1, null);
|
||||||
|
Box box2 = new Box(0.0125F, 0.125F, 0.125F, 1, null);
|
||||||
|
Box box3 = new Box(0.0125F, 0.125F, 0.125F, 1, null);
|
||||||
|
TransformGroup transformGroup = new TransformGroup();
|
||||||
|
Vector3d vector3d = new Vector3d();
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
Material material1 = new Material();
|
||||||
|
Material material2 = new Material();
|
||||||
|
Appearance appearance1 = new Appearance();
|
||||||
|
Appearance appearance2 = new Appearance();
|
||||||
|
this.mSpan = 0.25D;
|
||||||
|
this.mAngle = 0.0D;
|
||||||
|
transformGroup.addChild((Node)box1);
|
||||||
|
this.mThumbTfGrp.addChild((Node)box2);
|
||||||
|
this.mFingersTfGrp.addChild((Node)box3);
|
||||||
|
this.mTfGrp.addChild((Node)transformGroup);
|
||||||
|
this.mTfGrp.addChild((Node)this.mThumbTfGrp);
|
||||||
|
this.mTfGrp.addChild((Node)this.mFingersTfGrp);
|
||||||
|
this.mBrGrp.addChild((Node)this.mTfGrp);
|
||||||
|
moveThumbAndFingers(this.mSpan);
|
||||||
|
rotateHand(0.0D);
|
||||||
|
material1.setDiffuseColor(0.0F, 1.0F, 1.0F);
|
||||||
|
material1.setAmbientColor(0.0F, 0.4F, 0.4F);
|
||||||
|
appearance1.setMaterial(material1);
|
||||||
|
box1.setAppearance(appearance1);
|
||||||
|
material2.setDiffuseColor(1.0F, 1.0F, 0.0F);
|
||||||
|
material2.setAmbientColor(0.4F, 0.4F, 0.0F);
|
||||||
|
appearance2.setMaterial(material2);
|
||||||
|
box2.setAppearance(appearance2);
|
||||||
|
box3.setAppearance(appearance2);
|
||||||
|
this.mTfGrp.setCapability(18);
|
||||||
|
this.mThumbTfGrp.setCapability(18);
|
||||||
|
this.mFingersTfGrp.setCapability(18);
|
||||||
|
this.mBrGrp.compile();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void moveThumbAndFingers(double paramDouble) {
|
||||||
|
this.mVec.set(-paramDouble / 2.0D, 0.25D, 0.0D);
|
||||||
|
this.mTrnTf.set(this.mVec);
|
||||||
|
this.mThumbTfGrp.setTransform(this.mTrnTf);
|
||||||
|
this.mVec.set(paramDouble / 2.0D, 0.25D, 0.0D);
|
||||||
|
this.mTrnTf.set(this.mVec);
|
||||||
|
this.mFingersTfGrp.setTransform(this.mTrnTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan() {
|
||||||
|
if (this.mSpan < 0.25D)
|
||||||
|
this.mSpan += 0.01D;
|
||||||
|
moveThumbAndFingers(this.mSpan);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan(double paramDouble) {
|
||||||
|
this.mSpan += paramDouble;
|
||||||
|
if (this.mSpan <= 0.02500000037252903D)
|
||||||
|
this.mSpan = 0.02500000037252903D;
|
||||||
|
if (this.mSpan >= 0.25D)
|
||||||
|
this.mSpan = 0.25D;
|
||||||
|
moveThumbAndFingers(this.mSpan);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandSpan() {
|
||||||
|
if (this.mSpan > 0.02500000037252903D)
|
||||||
|
this.mSpan -= 0.01D;
|
||||||
|
moveThumbAndFingers(this.mSpan);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void rotateHand(double paramDouble) {
|
||||||
|
this.mRotTf.rotX(paramDouble);
|
||||||
|
this.mTfGrp.setTransform(this.mRotTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle() {
|
||||||
|
this.mAngle += 0.02D;
|
||||||
|
rotateHand(this.mAngle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle(double paramDouble) {
|
||||||
|
this.mAngle += paramDouble;
|
||||||
|
rotateHand(this.mAngle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandAngle() {
|
||||||
|
this.mAngle -= 0.02D;
|
||||||
|
rotateHand(this.mAngle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/Hand.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
36
Roboter_Demo/roboter_demo/HandBehavior.java
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import javax.media.j3d.Behavior;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.media.j3d.WakeupCondition;
|
||||||
|
import javax.media.j3d.WakeupOnTransformChange;
|
||||||
|
|
||||||
|
class HandBehavior extends Behavior {
|
||||||
|
private TransformGroup mTfGrp;
|
||||||
|
|
||||||
|
private WakeupOnTransformChange mWakeUp;
|
||||||
|
|
||||||
|
public void setTg(TransformGroup paramTransformGroup) {
|
||||||
|
this.mTfGrp = paramTransformGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
HandBehavior(TransformGroup paramTransformGroup) {
|
||||||
|
this.mTfGrp = paramTransformGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initialize() {
|
||||||
|
this.mWakeUp = new WakeupOnTransformChange(this.mTfGrp);
|
||||||
|
wakeupOn((WakeupCondition)this.mWakeUp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void processStimulus(Enumeration paramEnumeration) {
|
||||||
|
wakeupOn((WakeupCondition)this.mWakeUp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/HandBehavior.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
62
Roboter_Demo/roboter_demo/ReadingThread.java
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScDllWrapper;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScEx;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScStdData;
|
||||||
|
|
||||||
|
public class ReadingThread extends Thread {
|
||||||
|
private RoboterApp mApp;
|
||||||
|
|
||||||
|
private int mDevIdx;
|
||||||
|
|
||||||
|
private boolean mIsReading;
|
||||||
|
|
||||||
|
public void setDevIdx(int paramInt) {
|
||||||
|
this.mDevIdx = paramInt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopReadingThread() {
|
||||||
|
this.mIsReading = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReadingThread(RoboterApp paramRoboterApp) {
|
||||||
|
this.mApp = paramRoboterApp;
|
||||||
|
this.mDevIdx = paramRoboterApp.getDevIdx();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
boolean bool = true;
|
||||||
|
int i = 0;
|
||||||
|
ScStdData scStdData = new ScStdData();
|
||||||
|
this.mIsReading = true;
|
||||||
|
while (this.mIsReading) {
|
||||||
|
try {
|
||||||
|
ScDllWrapper.scFetchStdData(this.mDevIdx, scStdData);
|
||||||
|
if (scStdData.mEvent > -1) {
|
||||||
|
this.mApp.handleEvent(this.mDevIdx, scStdData.mEvent);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
this.mApp.repaintDemo(scStdData);
|
||||||
|
} catch (ScEx scEx) {
|
||||||
|
if (bool) {
|
||||||
|
this.mApp.repaintDemo(scStdData);
|
||||||
|
if (i++ > 3) {
|
||||||
|
i = 0;
|
||||||
|
bool = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("*** Reading thread stopped.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void stopp() {
|
||||||
|
this.mIsReading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/ReadingThread.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
281
Roboter_Demo/roboter_demo/RoboterApp.java
Normal file
|
@ -0,0 +1,281 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.behaviors.vp.OrbitBehavior;
|
||||||
|
import com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior;
|
||||||
|
import com.sun.j3d.utils.geometry.ColorCube;
|
||||||
|
import com.sun.j3d.utils.universe.SimpleUniverse;
|
||||||
|
import com.sun.j3d.utils.universe.ViewingPlatform;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScDllWrapper;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScEx;
|
||||||
|
import de.spacecontrol.sc.dllwrapper.ScStdData;
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Component;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.EventQueue;
|
||||||
|
import java.awt.GraphicsConfiguration;
|
||||||
|
import java.awt.Image;
|
||||||
|
import java.awt.event.FocusAdapter;
|
||||||
|
import java.awt.event.FocusEvent;
|
||||||
|
import java.awt.event.KeyAdapter;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.lang.management.ManagementFactory;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import javax.media.j3d.AmbientLight;
|
||||||
|
import javax.media.j3d.BoundingSphere;
|
||||||
|
import javax.media.j3d.Bounds;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Canvas3D;
|
||||||
|
import javax.media.j3d.DirectionalLight;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.UIManager;
|
||||||
|
import javax.swing.UnsupportedLookAndFeelException;
|
||||||
|
import javax.vecmath.Color3f;
|
||||||
|
import javax.vecmath.Point3d;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
import javax.vecmath.Vector3f;
|
||||||
|
|
||||||
|
public class RoboterApp extends JFrame {
|
||||||
|
private final int mBoundsRange = 1000;
|
||||||
|
|
||||||
|
private int mSceneNo;
|
||||||
|
|
||||||
|
private double mHandSpan;
|
||||||
|
|
||||||
|
private double mHandAngle;
|
||||||
|
|
||||||
|
private ReadingThread mReadingThread = new ReadingThread(this);
|
||||||
|
|
||||||
|
private int mDevIdx;
|
||||||
|
|
||||||
|
private TransformGroup mCubeTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mThumbTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mFingersTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mHandTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mForeArmTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mBaseTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private Base mBase = new Base(this.mBaseTfGrp);
|
||||||
|
|
||||||
|
private ViewingPlatform mVp;
|
||||||
|
|
||||||
|
private JPanel mGraphicPanel;
|
||||||
|
|
||||||
|
public int getDevIdx() {
|
||||||
|
return this.mDevIdx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoboterApp() {
|
||||||
|
GraphicsConfiguration graphicsConfiguration = SimpleUniverse.getPreferredConfiguration();
|
||||||
|
Canvas3D canvas3D = new Canvas3D(graphicsConfiguration);
|
||||||
|
SimpleUniverse simpleUniverse = new SimpleUniverse(canvas3D);
|
||||||
|
BranchGroup branchGroup = null;
|
||||||
|
OrbitBehavior orbitBehavior = new OrbitBehavior(canvas3D);
|
||||||
|
ArrayList<Image> arrayList = new ArrayList();
|
||||||
|
String str1 = System.getProperty("os.name");
|
||||||
|
boolean bool = str1.contains("OS X");
|
||||||
|
this.mVp = simpleUniverse.getViewingPlatform();
|
||||||
|
Image image1 = getToolkit().getImage(getClass().getResource("/pics/roboter_16.png"));
|
||||||
|
Image image2 = getToolkit().getImage(getClass().getResource("/pics/roboter_32.png"));
|
||||||
|
Image image3 = getToolkit().getImage(getClass().getResource("/pics/roboter_64.png"));
|
||||||
|
arrayList.add(image1);
|
||||||
|
arrayList.add(image2);
|
||||||
|
arrayList.add(image3);
|
||||||
|
setIconImages(arrayList);
|
||||||
|
try {
|
||||||
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||||
|
} catch (UnsupportedLookAndFeelException unsupportedLookAndFeelException) {
|
||||||
|
|
||||||
|
} catch (IllegalAccessException illegalAccessException) {
|
||||||
|
|
||||||
|
} catch (InstantiationException instantiationException) {
|
||||||
|
|
||||||
|
} catch (ClassNotFoundException classNotFoundException) {}
|
||||||
|
initComponents();
|
||||||
|
String str2 = bool ? getClass().getSimpleName() : getTitle();
|
||||||
|
this.mGraphicPanel.add("Center", (Component)canvas3D);
|
||||||
|
simpleUniverse.getViewer().getView().setBackClipDistance(1000.0D);
|
||||||
|
this.mSceneNo = 1;
|
||||||
|
switch (this.mSceneNo) {
|
||||||
|
case 0:
|
||||||
|
branchGroup = createRoboterSceneGraph();
|
||||||
|
this.mVp.setNominalViewingTransform();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
branchGroup = createRoboterSceneGraph();
|
||||||
|
setViewPos(this.mVp);
|
||||||
|
orbitBehavior.setSchedulingBounds((Bounds)new BoundingSphere(new Point3d(), 1000.0D));
|
||||||
|
orbitBehavior.setZoomFactor(5.0D);
|
||||||
|
this.mVp.setViewPlatformBehavior((ViewPlatformBehavior)orbitBehavior);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
System.out.println("Unknown sceneNo: " + this.mSceneNo);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
branchGroup.compile();
|
||||||
|
simpleUniverse.addBranchGraph(branchGroup);
|
||||||
|
this.mGraphicPanel.requestFocus();
|
||||||
|
try {
|
||||||
|
String str3 = ManagementFactory.getRuntimeMXBean().getName();
|
||||||
|
int i = str3.indexOf('@');
|
||||||
|
String str4 = str3.substring(0, i);
|
||||||
|
ScDllWrapper.scConnect2(false, str2);
|
||||||
|
this.mReadingThread.start();
|
||||||
|
} catch (ScEx scEx) {
|
||||||
|
System.out.println(scEx);
|
||||||
|
JOptionPane.showMessageDialog(this.mGraphicPanel, "No connection to SpaceControl driver!\nMove the roboter with keys 1-6 and shift.", "Connection Error", 0);
|
||||||
|
}
|
||||||
|
this.mBase.incUpperArmAngle(1.5707963267948966D);
|
||||||
|
this.mBase.incForeArmAngle(Math.PI);
|
||||||
|
this.mBase.incWristAngle(1.5707963267948966D);
|
||||||
|
this.mBase.incHandSpan(-1.0D);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BranchGroup createSimpleCubeSceneGraph() {
|
||||||
|
BranchGroup branchGroup = new BranchGroup();
|
||||||
|
branchGroup.addChild((Node)this.mCubeTfGrp);
|
||||||
|
this.mCubeTfGrp.addChild((Node)new ColorCube(0.4D));
|
||||||
|
this.mCubeTfGrp.setCapability(18);
|
||||||
|
return branchGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setViewPos(ViewingPlatform paramViewingPlatform) {
|
||||||
|
TransformGroup transformGroup = paramViewingPlatform.getViewPlatformTransform();
|
||||||
|
Transform3D transform3D1 = new Transform3D();
|
||||||
|
Transform3D transform3D2 = new Transform3D();
|
||||||
|
transformGroup.getTransform(transform3D2);
|
||||||
|
transform3D2.rotY(Math.toRadians(0.0D));
|
||||||
|
transform3D2.rotX(Math.toRadians(-10.0D));
|
||||||
|
transform3D1.mul(transform3D2);
|
||||||
|
transform3D2.setTranslation(new Vector3d(0.0D, 4.0D, 10.0D));
|
||||||
|
transform3D1.mul(transform3D2);
|
||||||
|
transformGroup.setTransform(transform3D1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BranchGroup createRoboterSceneGraph() {
|
||||||
|
BranchGroup branchGroup = new BranchGroup();
|
||||||
|
AmbientLight ambientLight = new AmbientLight(new Color3f(1.0F, 1.0F, 1.0F));
|
||||||
|
DirectionalLight directionalLight = new DirectionalLight(new Color3f(1.0F, 1.0F, 1.0F), new Vector3f(-1.0F, -0.7F, -0.5F));
|
||||||
|
BoundingSphere boundingSphere = new BoundingSphere(new Point3d(), 20.0D);
|
||||||
|
Floor floor = new Floor();
|
||||||
|
branchGroup.addChild((Node)directionalLight);
|
||||||
|
branchGroup.addChild((Node)ambientLight);
|
||||||
|
branchGroup.addChild((Node)floor);
|
||||||
|
branchGroup.addChild((Node)this.mBase.getBrGrp());
|
||||||
|
directionalLight.setInfluencingBounds((Bounds)boundingSphere);
|
||||||
|
ambientLight.setInfluencingBounds((Bounds)boundingSphere);
|
||||||
|
return branchGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void repaintDemo(ScStdData paramScStdData) {
|
||||||
|
int i = 2000;
|
||||||
|
if (paramScStdData.mB != 0)
|
||||||
|
this.mBase.incBaseAngle(paramScStdData.mB / i);
|
||||||
|
if (paramScStdData.mA != 0)
|
||||||
|
this.mBase.incUpperArmAngle(paramScStdData.mA / i);
|
||||||
|
if (paramScStdData.mC != 0)
|
||||||
|
this.mBase.incWristAngle(-(paramScStdData.mC) / i);
|
||||||
|
if (paramScStdData.mX != 0)
|
||||||
|
this.mBase.incHandAngle(-(paramScStdData.mX) / i);
|
||||||
|
if (paramScStdData.mY != 0)
|
||||||
|
this.mBase.incHandSpan(paramScStdData.mY / i);
|
||||||
|
if (paramScStdData.mZ != 0)
|
||||||
|
this.mBase.incForeArmAngle(paramScStdData.mZ / i);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handleEvent(int paramInt1, int paramInt2) {
|
||||||
|
switch (paramInt2) {
|
||||||
|
case 131084:
|
||||||
|
handleFitEvent();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
System.out.println("*** Event '" + paramInt2 + "' not supported.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleFitEvent() {
|
||||||
|
setViewPos(this.mVp);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initComponents() {
|
||||||
|
this.mGraphicPanel = new JPanel();
|
||||||
|
setDefaultCloseOperation(3);
|
||||||
|
setTitle("SC Roboter Demo");
|
||||||
|
this.mGraphicPanel.setMinimumSize(new Dimension(640, 480));
|
||||||
|
this.mGraphicPanel.setPreferredSize(new Dimension(640, 480));
|
||||||
|
this.mGraphicPanel.addFocusListener(new FocusAdapter() {
|
||||||
|
public void focusLost(FocusEvent param1FocusEvent) {
|
||||||
|
RoboterApp.this.mGraphicPanelFocusLost(param1FocusEvent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.mGraphicPanel.addKeyListener(new KeyAdapter() {
|
||||||
|
public void keyPressed(KeyEvent param1KeyEvent) {
|
||||||
|
RoboterApp.this.mGraphicPanelKeyPressed(param1KeyEvent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.mGraphicPanel.setLayout(new BorderLayout());
|
||||||
|
getContentPane().add(this.mGraphicPanel, "Center");
|
||||||
|
pack();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void mGraphicPanelFocusLost(FocusEvent paramFocusEvent) {
|
||||||
|
String str = System.getProperty("os.name");
|
||||||
|
if (str.equals("Linux"))
|
||||||
|
return;
|
||||||
|
this.mGraphicPanel.requestFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void mGraphicPanelKeyPressed(KeyEvent paramKeyEvent) {
|
||||||
|
int i = paramKeyEvent.getKeyCode();
|
||||||
|
char c = paramKeyEvent.getKeyChar();
|
||||||
|
if (c == '1') {
|
||||||
|
this.mBase.incBaseAngle();
|
||||||
|
} else if (c == '!') {
|
||||||
|
this.mBase.decBaseAngle();
|
||||||
|
} else if (c == '2') {
|
||||||
|
this.mBase.incUpperArmAngle();
|
||||||
|
} else if (c == '"') {
|
||||||
|
this.mBase.decUpperArmAngle();
|
||||||
|
} else if (c == '3') {
|
||||||
|
this.mBase.incForeArmAngle();
|
||||||
|
} else if (c == '<27>') {
|
||||||
|
this.mBase.decForeArmAngle();
|
||||||
|
} else if (c == '4') {
|
||||||
|
this.mBase.incWristAngle();
|
||||||
|
} else if (c == '$') {
|
||||||
|
this.mBase.decWristAngle();
|
||||||
|
} else if (c == '5') {
|
||||||
|
this.mBase.incHandAngle();
|
||||||
|
} else if (c == '%') {
|
||||||
|
this.mBase.decHandAngle();
|
||||||
|
} else if (c == '6') {
|
||||||
|
this.mBase.incHandSpan();
|
||||||
|
} else if (c == '&') {
|
||||||
|
this.mBase.decHandSpan();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] paramArrayOfString) {
|
||||||
|
EventQueue.invokeLater(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
new RoboterApp().setVisible(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/RoboterApp.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
141
Roboter_Demo/roboter_demo/UpperArm.java
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.geometry.Box;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class UpperArm {
|
||||||
|
private final float mWidth = 0.25F;
|
||||||
|
|
||||||
|
private final float mLength = 1.0F;
|
||||||
|
|
||||||
|
private final float mScale = 1.0F;
|
||||||
|
|
||||||
|
private final Vector3d mTransTo = new Vector3d(0.0D, 0.375D, 0.0D);
|
||||||
|
|
||||||
|
private final Vector3d mTransFro = new Vector3d(0.0D, -0.375D, 0.0D);
|
||||||
|
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
private TransformGroup mTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mForeArmTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private ForeArm mForeArm = new ForeArm();
|
||||||
|
|
||||||
|
private double mAngle;
|
||||||
|
|
||||||
|
private Transform3D mRotTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mTrnTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mResTf = new Transform3D();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incForeArmAngle() {
|
||||||
|
this.mForeArm.incAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decForeArmAngle() {
|
||||||
|
this.mForeArm.decAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incWristAngle() {
|
||||||
|
this.mForeArm.incWristAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decWristAngle() {
|
||||||
|
this.mForeArm.decWristAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle() {
|
||||||
|
this.mForeArm.incHandAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandAngle() {
|
||||||
|
this.mForeArm.decHandAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan() {
|
||||||
|
this.mForeArm.incHandSpan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandSpan() {
|
||||||
|
this.mForeArm.decHandSpan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incForeArmAngle(double paramDouble) {
|
||||||
|
this.mForeArm.incAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incWristAngle(double paramDouble) {
|
||||||
|
this.mForeArm.incWristAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle(double paramDouble) {
|
||||||
|
this.mForeArm.incHandAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan(double paramDouble) {
|
||||||
|
this.mForeArm.incHandSpan(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpperArm() {
|
||||||
|
Box box = new Box(0.125F, 0.5F, 0.125F, 1, null);
|
||||||
|
Material material = new Material();
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
Vector3d vector3d = new Vector3d();
|
||||||
|
this.mTfGrp.addChild((Node)box);
|
||||||
|
this.mForeArmTfGrp.addChild((Node)this.mForeArm.getBrGrp());
|
||||||
|
this.mTfGrp.addChild((Node)this.mForeArmTfGrp);
|
||||||
|
this.mBrGrp.addChild((Node)this.mTfGrp);
|
||||||
|
vector3d.set(0.0D, 0.75D, -0.25D);
|
||||||
|
transform3D.setTranslation(vector3d);
|
||||||
|
this.mForeArmTfGrp.setTransform(transform3D);
|
||||||
|
material.setDiffuseColor(1.0F, 0.0F, 1.0F);
|
||||||
|
material.setAmbientColor(0.4F, 0.0F, 0.4F);
|
||||||
|
appearance.setMaterial(material);
|
||||||
|
box.setAppearance(appearance);
|
||||||
|
this.mTfGrp.setCapability(18);
|
||||||
|
rotate(0.0D);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incAngle() {
|
||||||
|
rotate(0.02D);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rotate(double paramDouble) {
|
||||||
|
this.mAngle += paramDouble;
|
||||||
|
this.mRotTf.rotZ(this.mAngle);
|
||||||
|
this.mResTf.setIdentity();
|
||||||
|
this.mTrnTf.setTranslation(this.mTransFro);
|
||||||
|
this.mResTf.mul(this.mTrnTf);
|
||||||
|
this.mResTf.mul(this.mRotTf);
|
||||||
|
this.mTrnTf.setTranslation(this.mTransTo);
|
||||||
|
this.mResTf.mul(this.mTrnTf);
|
||||||
|
this.mTfGrp.setTransform(this.mResTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incAngle(double paramDouble) {
|
||||||
|
rotate(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decAngle() {
|
||||||
|
rotate(-0.02D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/UpperArm.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
110
Roboter_Demo/roboter_demo/Wrist.java
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
package roboter_demo;
|
||||||
|
|
||||||
|
import com.sun.j3d.utils.geometry.Box;
|
||||||
|
import javax.media.j3d.Appearance;
|
||||||
|
import javax.media.j3d.BranchGroup;
|
||||||
|
import javax.media.j3d.Material;
|
||||||
|
import javax.media.j3d.Node;
|
||||||
|
import javax.media.j3d.Transform3D;
|
||||||
|
import javax.media.j3d.TransformGroup;
|
||||||
|
import javax.vecmath.Vector3d;
|
||||||
|
|
||||||
|
class Wrist {
|
||||||
|
private final float mWidth = 0.25F;
|
||||||
|
|
||||||
|
private final float mLength = 0.5F;
|
||||||
|
|
||||||
|
private final float mScale = 1.0F;
|
||||||
|
|
||||||
|
private BranchGroup mBrGrp = new BranchGroup();
|
||||||
|
|
||||||
|
private TransformGroup mTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private TransformGroup mHandTfGrp = new TransformGroup();
|
||||||
|
|
||||||
|
private Hand mHand = new Hand();
|
||||||
|
|
||||||
|
private double mAngle;
|
||||||
|
|
||||||
|
private Transform3D mRotTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mTrnTf = new Transform3D();
|
||||||
|
|
||||||
|
private Transform3D mResTf = new Transform3D();
|
||||||
|
|
||||||
|
public BranchGroup getBrGrp() {
|
||||||
|
return this.mBrGrp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle() {
|
||||||
|
this.mHand.incHandAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandAngle() {
|
||||||
|
this.mHand.decHandAngle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan() {
|
||||||
|
this.mHand.incHandSpan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decHandSpan() {
|
||||||
|
this.mHand.decHandSpan();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandAngle(double paramDouble) {
|
||||||
|
this.mHand.incHandAngle(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incHandSpan(double paramDouble) {
|
||||||
|
this.mHand.incHandSpan(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Wrist() {
|
||||||
|
Box box = new Box(0.125F, 0.25F, 0.125F, 1, null);
|
||||||
|
Material material = new Material();
|
||||||
|
Appearance appearance = new Appearance();
|
||||||
|
Transform3D transform3D = new Transform3D();
|
||||||
|
Vector3d vector3d = new Vector3d();
|
||||||
|
this.mTfGrp.addChild((Node)box);
|
||||||
|
this.mHandTfGrp.addChild((Node)this.mHand.getBrGrp());
|
||||||
|
this.mTfGrp.addChild((Node)this.mHandTfGrp);
|
||||||
|
this.mBrGrp.addChild((Node)this.mTfGrp);
|
||||||
|
vector3d.set(0.0D, 0.125D, -0.25D);
|
||||||
|
transform3D.rotY(1.5707963267948966D);
|
||||||
|
transform3D.setTranslation(vector3d);
|
||||||
|
this.mHandTfGrp.setTransform(transform3D);
|
||||||
|
material.setDiffuseColor(0.0F, 0.0F, 1.0F);
|
||||||
|
material.setAmbientColor(0.0F, 0.0F, 0.4F);
|
||||||
|
appearance.setMaterial(material);
|
||||||
|
box.setAppearance(appearance);
|
||||||
|
this.mTfGrp.setCapability(18);
|
||||||
|
rotate(0.0D);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incAngle() {
|
||||||
|
rotate(0.02D);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void rotate(double paramDouble) {
|
||||||
|
this.mAngle += paramDouble;
|
||||||
|
this.mRotTf.rotY(this.mAngle);
|
||||||
|
this.mResTf.setIdentity();
|
||||||
|
this.mResTf.mul(this.mRotTf);
|
||||||
|
this.mTfGrp.setTransform(this.mResTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void incAngle(double paramDouble) {
|
||||||
|
rotate(paramDouble);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void decAngle() {
|
||||||
|
rotate(-0.02D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/Wrist.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
6
SC_DLL_Wrapper/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Ant-Version: Apache Ant 1.9.7
|
||||||
|
Created-By: 1.8.0_172-b11 (Oracle Corporation)
|
||||||
|
Class-Path:
|
||||||
|
Main-Class: de.spacecontrol.sc.dllwrapper.ScDllWrapper
|
||||||
|
|
43
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScAdvSens.java
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScAdvSens implements Cloneable {
|
||||||
|
public int mXSens;
|
||||||
|
|
||||||
|
public int mYSens;
|
||||||
|
|
||||||
|
public int mZSens;
|
||||||
|
|
||||||
|
public int mASens;
|
||||||
|
|
||||||
|
public int mBSens;
|
||||||
|
|
||||||
|
public int mCSens;
|
||||||
|
|
||||||
|
public ScAdvSens clone() {
|
||||||
|
try {
|
||||||
|
return (ScAdvSens)super.clone();
|
||||||
|
} catch (CloneNotSupportedException cloneNotSupportedException) {
|
||||||
|
cloneNotSupportedException.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToDefaults() {
|
||||||
|
this.mXSens = 7;
|
||||||
|
this.mYSens = 7;
|
||||||
|
this.mZSens = 7;
|
||||||
|
this.mASens = 7;
|
||||||
|
this.mBSens = 7;
|
||||||
|
this.mCSens = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String convToString() {
|
||||||
|
return "ScAdvSens:\n" + Util.convToString(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScAdvSens.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,147 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScAdvancedSettings implements Cloneable {
|
||||||
|
public ScAdvSens mSens = new ScAdvSens();
|
||||||
|
|
||||||
|
public boolean mIsX;
|
||||||
|
|
||||||
|
public boolean mIsY;
|
||||||
|
|
||||||
|
public boolean mIsZ;
|
||||||
|
|
||||||
|
public boolean mIsXRev;
|
||||||
|
|
||||||
|
public boolean mIsYRev;
|
||||||
|
|
||||||
|
public boolean mIsZRev;
|
||||||
|
|
||||||
|
public int mXRemap;
|
||||||
|
|
||||||
|
public int mYRemap;
|
||||||
|
|
||||||
|
public int mZRemap;
|
||||||
|
|
||||||
|
public boolean mIsA;
|
||||||
|
|
||||||
|
public boolean mIsB;
|
||||||
|
|
||||||
|
public boolean mIsC;
|
||||||
|
|
||||||
|
public boolean mIsARev;
|
||||||
|
|
||||||
|
public boolean mIsBRev;
|
||||||
|
|
||||||
|
public boolean mIsCRev;
|
||||||
|
|
||||||
|
public int mARemap;
|
||||||
|
|
||||||
|
public int mBRemap;
|
||||||
|
|
||||||
|
public int mCRemap;
|
||||||
|
|
||||||
|
public int mMouseDirX;
|
||||||
|
|
||||||
|
public int mMouseDirY;
|
||||||
|
|
||||||
|
public int mMouseDirZ;
|
||||||
|
|
||||||
|
public int mMouseDirA;
|
||||||
|
|
||||||
|
public int mMouseDirB;
|
||||||
|
|
||||||
|
public int mMouseDirC;
|
||||||
|
|
||||||
|
public boolean mIsMouseMove;
|
||||||
|
|
||||||
|
public boolean mIsMouseToRestore;
|
||||||
|
|
||||||
|
public boolean mIsMouseAbs;
|
||||||
|
|
||||||
|
public int mSendDelay;
|
||||||
|
|
||||||
|
public int mAverageNum;
|
||||||
|
|
||||||
|
public boolean mIsRemap;
|
||||||
|
|
||||||
|
public short mTraLmBnd;
|
||||||
|
|
||||||
|
public short mTraMhBnd;
|
||||||
|
|
||||||
|
public short mRotLmBnd;
|
||||||
|
|
||||||
|
public short mRotMhBnd;
|
||||||
|
|
||||||
|
public boolean mIsToSendToFgWin;
|
||||||
|
|
||||||
|
public boolean mIsSpcFuncToSend;
|
||||||
|
|
||||||
|
public boolean mIsWheelAssShown;
|
||||||
|
|
||||||
|
public boolean mIsWsFuncToSend;
|
||||||
|
|
||||||
|
public boolean mIsCapFuncToSend;
|
||||||
|
|
||||||
|
public boolean mAreChangesToSend;
|
||||||
|
|
||||||
|
public int mBrightnessRed;
|
||||||
|
|
||||||
|
public int mBrightnessGreen;
|
||||||
|
|
||||||
|
public boolean mAreDevLights;
|
||||||
|
|
||||||
|
public int mRotCenterMode;
|
||||||
|
|
||||||
|
public int mMoveMode;
|
||||||
|
|
||||||
|
public boolean mIsRightHandMode;
|
||||||
|
|
||||||
|
public boolean mIsClock;
|
||||||
|
|
||||||
|
public boolean mIsAutoFit;
|
||||||
|
|
||||||
|
public int mLanguage;
|
||||||
|
|
||||||
|
public int mPicture;
|
||||||
|
|
||||||
|
public static final int OBJ_SCREEN = 0;
|
||||||
|
|
||||||
|
public static final int OBJ_ORIGIN = 1;
|
||||||
|
|
||||||
|
public static final int CAM_STANDARD = 2;
|
||||||
|
|
||||||
|
public static final int CAM_TARGET = 3;
|
||||||
|
|
||||||
|
public static final int CAM_HOVER = 4;
|
||||||
|
|
||||||
|
public static final int DF = 0;
|
||||||
|
|
||||||
|
public static final int EN = 1;
|
||||||
|
|
||||||
|
public static final int DE = 2;
|
||||||
|
|
||||||
|
public static final int FR = 3;
|
||||||
|
|
||||||
|
public ScAdvancedSettings clone() {
|
||||||
|
try {
|
||||||
|
ScAdvancedSettings scAdvancedSettings = (ScAdvancedSettings)super.clone();
|
||||||
|
scAdvancedSettings.mSens = this.mSens.clone();
|
||||||
|
return scAdvancedSettings;
|
||||||
|
} catch (CloneNotSupportedException cloneNotSupportedException) {
|
||||||
|
cloneNotSupportedException.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String convToString() {
|
||||||
|
StringBuffer stringBuffer = new StringBuffer("ScAdvancedSettings:\n");
|
||||||
|
stringBuffer.append(this.mSens.convToString());
|
||||||
|
stringBuffer.append(Util.convToString(this));
|
||||||
|
return stringBuffer.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScAdvancedSettings.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScApplNotFoundEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScApplNotFoundEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,34 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScBasicSettings implements Cloneable {
|
||||||
|
public boolean mIsDom;
|
||||||
|
|
||||||
|
public int mTraSens;
|
||||||
|
|
||||||
|
public int mRotSens;
|
||||||
|
|
||||||
|
public int mNullRadius;
|
||||||
|
|
||||||
|
public int mBrightnessBlue;
|
||||||
|
|
||||||
|
public int mBrightnessDspl;
|
||||||
|
|
||||||
|
public ScBasicSettings clone() {
|
||||||
|
try {
|
||||||
|
return (ScBasicSettings)super.clone();
|
||||||
|
} catch (CloneNotSupportedException cloneNotSupportedException) {
|
||||||
|
cloneNotSupportedException.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String convToString() {
|
||||||
|
return "ScBasicSettings:\n" + Util.convToString(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScBasicSettings.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScComErrEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScComErrEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
26
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScDevInfo.java
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class ScDevInfo implements Cloneable, Serializable {
|
||||||
|
public int mId;
|
||||||
|
|
||||||
|
public String mSerialNo;
|
||||||
|
|
||||||
|
public String mDescrptn;
|
||||||
|
|
||||||
|
public ScDevInfo clone() {
|
||||||
|
try {
|
||||||
|
return (ScDevInfo)super.clone();
|
||||||
|
} catch (CloneNotSupportedException cloneNotSupportedException) {
|
||||||
|
cloneNotSupportedException.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScDevInfo.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
164
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScDevPars.java
Normal file
|
@ -0,0 +1,164 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class ScDevPars implements Cloneable, Serializable {
|
||||||
|
public static final short INACTIVE = 0;
|
||||||
|
|
||||||
|
public static final short SAVE_SETTINGS = 3;
|
||||||
|
|
||||||
|
public static final short TOGGLE_HOVER = 7;
|
||||||
|
|
||||||
|
public static final short TOGGLE_DEV_LIGHTS = 11;
|
||||||
|
|
||||||
|
public static final short TOGGLE_RIGHT_HAND_MODE = 12;
|
||||||
|
|
||||||
|
public static final short INCR_SENS = 13;
|
||||||
|
|
||||||
|
public static final short DECR_SENS = 14;
|
||||||
|
|
||||||
|
public static final short INCR_THRESH = 15;
|
||||||
|
|
||||||
|
public static final short DECR_THRESH = 16;
|
||||||
|
|
||||||
|
public static final short INCR_LCD = 17;
|
||||||
|
|
||||||
|
public static final short DECR_LCD = 18;
|
||||||
|
|
||||||
|
public static final short INCR_LEDS = 19;
|
||||||
|
|
||||||
|
public static final short DECR_LEDS = 20;
|
||||||
|
|
||||||
|
public static final short WHEEL_TO_SENS = 21;
|
||||||
|
|
||||||
|
public static final short WHEEL_TO_THRESH = 22;
|
||||||
|
|
||||||
|
public static final short WHEEL_TO_LCD = 23;
|
||||||
|
|
||||||
|
public static final short WHEEL_TO_LEDS = 24;
|
||||||
|
|
||||||
|
public static final short WHEEL_TO_WFL = 25;
|
||||||
|
|
||||||
|
public static final short WHEEL_TO_GESTURES = 26;
|
||||||
|
|
||||||
|
public static final short WHEEL_TO_FNC_KEYS = 27;
|
||||||
|
|
||||||
|
public static final short HNDL_SENS_DLG = 28;
|
||||||
|
|
||||||
|
public static final short HNDL_THRESH_DLG = 29;
|
||||||
|
|
||||||
|
public static final short HNDL_LCD_DLG = 30;
|
||||||
|
|
||||||
|
public static final short HNDL_LEDS_DLG = 31;
|
||||||
|
|
||||||
|
public static final short HNDL_WFL_DLG = 32;
|
||||||
|
|
||||||
|
public static final short HNDL_WHEEL_GESTURES = 33;
|
||||||
|
|
||||||
|
public static final short HNDL_FNC_KEYS = 34;
|
||||||
|
|
||||||
|
public static final short CTRL = 35;
|
||||||
|
|
||||||
|
public static final short ALT = 36;
|
||||||
|
|
||||||
|
public static final short SHIFT = 37;
|
||||||
|
|
||||||
|
public static final short ESC = 38;
|
||||||
|
|
||||||
|
public static final short PANEL = 44;
|
||||||
|
|
||||||
|
public static final short HNDL_CALC_DLG = 45;
|
||||||
|
|
||||||
|
public static final short SWITCH_KEY_SHIFT_LEVEL = 46;
|
||||||
|
|
||||||
|
public static final short BACK = 47;
|
||||||
|
|
||||||
|
public static final short LEFT = 48;
|
||||||
|
|
||||||
|
public static final short BOTTOM = 49;
|
||||||
|
|
||||||
|
public static final short RESERVED_9 = 55;
|
||||||
|
|
||||||
|
public static final short MOUSE_BUT_LEFT = 56;
|
||||||
|
|
||||||
|
public static final short MOUSE_BUT_MID = 57;
|
||||||
|
|
||||||
|
public static final short MOUSE_BUT_RIGHT = 58;
|
||||||
|
|
||||||
|
public static final short MOUSE_WHEEL_UP = 59;
|
||||||
|
|
||||||
|
public static final short MOUSE_WHEEL_DOWN = 60;
|
||||||
|
|
||||||
|
public static final short JOY_BUT = 68;
|
||||||
|
|
||||||
|
public static final short LOAD_CFG_1 = 72;
|
||||||
|
|
||||||
|
public static final short LOAD_CFG_3 = 74;
|
||||||
|
|
||||||
|
public static final int MAX_FUNC_NUM = 140;
|
||||||
|
|
||||||
|
public static final int MAX_FILE_NAME_LEN = 256;
|
||||||
|
|
||||||
|
public int mSysFuncNum;
|
||||||
|
|
||||||
|
public int mExecApplLoadCfgNum;
|
||||||
|
|
||||||
|
public String mName;
|
||||||
|
|
||||||
|
public String mFileName;
|
||||||
|
|
||||||
|
public ScBasicSettings mBs = new ScBasicSettings();
|
||||||
|
|
||||||
|
public ScAdvancedSettings mAs = new ScAdvancedSettings();
|
||||||
|
|
||||||
|
public ScKeyAssignment mKa = new ScKeyAssignment();
|
||||||
|
|
||||||
|
public ScFunc[] mFuncList = new ScFunc[140];
|
||||||
|
|
||||||
|
public ScDevPars() {
|
||||||
|
for (int i = 0; i < 140; i++)
|
||||||
|
this.mFuncList[i] = new ScFunc("", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScDevPars clone() {
|
||||||
|
try {
|
||||||
|
ScDevPars scDevPars = (ScDevPars)super.clone();
|
||||||
|
scDevPars.mBs = this.mBs.clone();
|
||||||
|
scDevPars.mAs = this.mAs.clone();
|
||||||
|
scDevPars.mKa = this.mKa.clone();
|
||||||
|
scDevPars.mFuncList = (ScFunc[])this.mFuncList.clone();
|
||||||
|
for (int i = 0; i < 140; i++)
|
||||||
|
scDevPars.mFuncList[i] = this.mFuncList[i].clone();
|
||||||
|
return scDevPars;
|
||||||
|
} catch (CloneNotSupportedException cloneNotSupportedException) {
|
||||||
|
cloneNotSupportedException.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String convToString() {
|
||||||
|
StringBuffer stringBuffer = new StringBuffer(Util.convToString(this));
|
||||||
|
stringBuffer.append(this.mBs.convToString());
|
||||||
|
stringBuffer.append(this.mAs.convToString());
|
||||||
|
stringBuffer.append(this.mKa.convToString());
|
||||||
|
for (int i = 0; i < 140; i++)
|
||||||
|
stringBuffer.append(this.mFuncList[i].convToString());
|
||||||
|
return stringBuffer.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean areWheelGesturesActive() {
|
||||||
|
short s1 = this.mKa.mWheelLeft;
|
||||||
|
short s2 = this.mKa.mWheelRight;
|
||||||
|
return areWheelGesturesActive(s1, s2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean areWheelGesturesActive(int paramInt1, int paramInt2) {
|
||||||
|
return (paramInt1 == 33 && paramInt2 == 33);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScDevPars.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
1028
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScDllWrapper.java
Normal file
9
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScEx.java
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScEx extends Exception {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScExecCmdErrEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScExecCmdErrEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScFileIoEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScFileIoEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
37
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScFunc.java
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScFunc implements Cloneable {
|
||||||
|
public static final int MAX_FUNC_NAME_LEN = 32;
|
||||||
|
|
||||||
|
public static final int MAX_FUNC_LEN = 256;
|
||||||
|
|
||||||
|
public int mIdx;
|
||||||
|
|
||||||
|
public String mName;
|
||||||
|
|
||||||
|
public String mFunc;
|
||||||
|
|
||||||
|
public ScFunc(String paramString1, String paramString2) {
|
||||||
|
this.mName = paramString1;
|
||||||
|
this.mFunc = paramString2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ScFunc clone() {
|
||||||
|
try {
|
||||||
|
return (ScFunc)super.clone();
|
||||||
|
} catch (CloneNotSupportedException cloneNotSupportedException) {
|
||||||
|
cloneNotSupportedException.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String convToString() {
|
||||||
|
return this.mName + ": " + this.mFunc + "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScFunc.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,208 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScKeyAssignment implements Cloneable {
|
||||||
|
public static final int MAX_WHEEL_SLOTS_NUM = 28;
|
||||||
|
|
||||||
|
public short m1;
|
||||||
|
|
||||||
|
public short m2;
|
||||||
|
|
||||||
|
public short m3;
|
||||||
|
|
||||||
|
public short m4;
|
||||||
|
|
||||||
|
public short m5;
|
||||||
|
|
||||||
|
public short m6;
|
||||||
|
|
||||||
|
public short mCtrl;
|
||||||
|
|
||||||
|
public short mAlt;
|
||||||
|
|
||||||
|
public short mShift;
|
||||||
|
|
||||||
|
public short mEsc;
|
||||||
|
|
||||||
|
public short mFront;
|
||||||
|
|
||||||
|
public short mRight;
|
||||||
|
|
||||||
|
public short mTop;
|
||||||
|
|
||||||
|
public short mFit;
|
||||||
|
|
||||||
|
public short m2D3D;
|
||||||
|
|
||||||
|
public short mPanel;
|
||||||
|
|
||||||
|
public short mMenue;
|
||||||
|
|
||||||
|
public short m1B;
|
||||||
|
|
||||||
|
public short m2B;
|
||||||
|
|
||||||
|
public short m3B;
|
||||||
|
|
||||||
|
public short m4B;
|
||||||
|
|
||||||
|
public short m5B;
|
||||||
|
|
||||||
|
public short m6B;
|
||||||
|
|
||||||
|
public short mCtrlB;
|
||||||
|
|
||||||
|
public short mAltB;
|
||||||
|
|
||||||
|
public short mShiftB;
|
||||||
|
|
||||||
|
public short mEscB;
|
||||||
|
|
||||||
|
public short mFrontB;
|
||||||
|
|
||||||
|
public short mRightB;
|
||||||
|
|
||||||
|
public short mTopB;
|
||||||
|
|
||||||
|
public short mFitB;
|
||||||
|
|
||||||
|
public short m2D3DB;
|
||||||
|
|
||||||
|
public short mPanelB;
|
||||||
|
|
||||||
|
public short mMenueB;
|
||||||
|
|
||||||
|
public short mWheelLeft;
|
||||||
|
|
||||||
|
public short mWheelRight;
|
||||||
|
|
||||||
|
public short mWheelL;
|
||||||
|
|
||||||
|
public short mWheelR;
|
||||||
|
|
||||||
|
public short mWheelLr;
|
||||||
|
|
||||||
|
public short mWheelRl;
|
||||||
|
|
||||||
|
public short mWheelLrl;
|
||||||
|
|
||||||
|
public short mWheelRlr;
|
||||||
|
|
||||||
|
public short mWheelLl;
|
||||||
|
|
||||||
|
public short mWheelRr;
|
||||||
|
|
||||||
|
public short[] mWheelSlot = new short[28];
|
||||||
|
|
||||||
|
public short mXll;
|
||||||
|
|
||||||
|
public short mXlm;
|
||||||
|
|
||||||
|
public short mXlh;
|
||||||
|
|
||||||
|
public short mXrl;
|
||||||
|
|
||||||
|
public short mXrm;
|
||||||
|
|
||||||
|
public short mXrh;
|
||||||
|
|
||||||
|
public short mYdl;
|
||||||
|
|
||||||
|
public short mYdm;
|
||||||
|
|
||||||
|
public short mYdh;
|
||||||
|
|
||||||
|
public short mYul;
|
||||||
|
|
||||||
|
public short mYum;
|
||||||
|
|
||||||
|
public short mYuh;
|
||||||
|
|
||||||
|
public short mZfl;
|
||||||
|
|
||||||
|
public short mZfm;
|
||||||
|
|
||||||
|
public short mZfh;
|
||||||
|
|
||||||
|
public short mZbl;
|
||||||
|
|
||||||
|
public short mZbm;
|
||||||
|
|
||||||
|
public short mZbh;
|
||||||
|
|
||||||
|
public short mAnyTraL;
|
||||||
|
|
||||||
|
public short mAnyTraM;
|
||||||
|
|
||||||
|
public short mAnyTraH;
|
||||||
|
|
||||||
|
public short mArl;
|
||||||
|
|
||||||
|
public short mArm;
|
||||||
|
|
||||||
|
public short mArh;
|
||||||
|
|
||||||
|
public short mAll;
|
||||||
|
|
||||||
|
public short mAlm;
|
||||||
|
|
||||||
|
public short mAlh;
|
||||||
|
|
||||||
|
public short mBrl;
|
||||||
|
|
||||||
|
public short mBrm;
|
||||||
|
|
||||||
|
public short mBrh;
|
||||||
|
|
||||||
|
public short mBll;
|
||||||
|
|
||||||
|
public short mBlm;
|
||||||
|
|
||||||
|
public short mBlh;
|
||||||
|
|
||||||
|
public short mCrl;
|
||||||
|
|
||||||
|
public short mCrm;
|
||||||
|
|
||||||
|
public short mCrh;
|
||||||
|
|
||||||
|
public short mCll;
|
||||||
|
|
||||||
|
public short mClm;
|
||||||
|
|
||||||
|
public short mClh;
|
||||||
|
|
||||||
|
public short mAnyRotL;
|
||||||
|
|
||||||
|
public short mAnyRotM;
|
||||||
|
|
||||||
|
public short mAnyRotH;
|
||||||
|
|
||||||
|
public short mAnyL;
|
||||||
|
|
||||||
|
public short mAnyM;
|
||||||
|
|
||||||
|
public short mAnyH;
|
||||||
|
|
||||||
|
public short mAnyStarted;
|
||||||
|
|
||||||
|
public short mAnyStopped;
|
||||||
|
|
||||||
|
public ScKeyAssignment clone() {
|
||||||
|
try {
|
||||||
|
return (ScKeyAssignment)super.clone();
|
||||||
|
} catch (CloneNotSupportedException cloneNotSupportedException) {
|
||||||
|
cloneNotSupportedException.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String convToString() {
|
||||||
|
return "ScKeyAssignment:\n" + Util.convToString(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScKeyAssignment.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScKeystrokeEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScKeystrokeEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
35
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScLogPars.java
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScLogPars {
|
||||||
|
public String mLogFile = "default_log.txt";
|
||||||
|
|
||||||
|
public int mMaxSize = 500;
|
||||||
|
|
||||||
|
public boolean mIsLogToFile = false;
|
||||||
|
|
||||||
|
public boolean mIsLogToCnsl = false;
|
||||||
|
|
||||||
|
public boolean mIsWrn = false;
|
||||||
|
|
||||||
|
public boolean mIsCrt = false;
|
||||||
|
|
||||||
|
public boolean mIsTrc = false;
|
||||||
|
|
||||||
|
public boolean mIsDcm = false;
|
||||||
|
|
||||||
|
public boolean mIsIcm = false;
|
||||||
|
|
||||||
|
public boolean mIsInf = false;
|
||||||
|
|
||||||
|
public boolean mIsDbg = false;
|
||||||
|
|
||||||
|
public boolean mIsTmp = false;
|
||||||
|
|
||||||
|
public String mExclFileToLog = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScLogPars.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScNotSupportedEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScNotSupportedEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,17 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScOneBoolean {
|
||||||
|
public boolean mVal;
|
||||||
|
|
||||||
|
public ScOneBoolean() {}
|
||||||
|
|
||||||
|
public ScOneBoolean(boolean paramBoolean) {
|
||||||
|
this.mVal = paramBoolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScOneBoolean.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
15
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScOneByte.java
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScOneByte {
|
||||||
|
public byte mVal = 0;
|
||||||
|
|
||||||
|
public ScOneByte() {}
|
||||||
|
|
||||||
|
public ScOneByte(byte paramByte) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScOneByte.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
15
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScOneInt.java
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScOneInt {
|
||||||
|
public int mVal = 0;
|
||||||
|
|
||||||
|
public ScOneInt() {}
|
||||||
|
|
||||||
|
public ScOneInt(int paramInt) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScOneInt.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,17 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScOneString {
|
||||||
|
public String mVal;
|
||||||
|
|
||||||
|
public ScOneString() {}
|
||||||
|
|
||||||
|
public ScOneString(String paramString) {
|
||||||
|
this.mVal = paramString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScOneString.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScParOutOfRangeEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScParOutOfRangeEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScRegistryEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScRegistryEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
11
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScStatus.java
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public enum ScStatus {
|
||||||
|
SC_OK, SC_COMMUNICATION_ERROR, SC_WRONG_DEVICE_INDEX, SC_PARAMETER_OUT_OF_RANGE, SC_FILE_IO_ERROR, SC_KEYSTROKE_ERROR, SC_APPL_NOT_FOUND, SC_REGISTRY_ERROR, SC_NOT_SUPPORTED, SC_EXEC_CMD_ERROR, SC_THREAD_ERROR, SC_WRONG_USER, SC_ERR_END;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScStatus.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
31
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScStdData.java
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScStdData {
|
||||||
|
public short mX;
|
||||||
|
|
||||||
|
public short mY;
|
||||||
|
|
||||||
|
public short mZ;
|
||||||
|
|
||||||
|
public short mA;
|
||||||
|
|
||||||
|
public short mB;
|
||||||
|
|
||||||
|
public short mC;
|
||||||
|
|
||||||
|
public int mTraLmh;
|
||||||
|
|
||||||
|
public int mRotLmh;
|
||||||
|
|
||||||
|
public int mEvent;
|
||||||
|
|
||||||
|
public int mTvSec;
|
||||||
|
|
||||||
|
public int mTvUsec;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScStdData.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScThreadErrEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScThreadErrEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,19 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScThreeInts {
|
||||||
|
public int mVal1 = 0;
|
||||||
|
|
||||||
|
public int mVal2 = 0;
|
||||||
|
|
||||||
|
public int mVal3 = 0;
|
||||||
|
|
||||||
|
public ScThreeInts() {}
|
||||||
|
|
||||||
|
public ScThreeInts(int paramInt1, int paramInt2, int paramInt3) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScThreeInts.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,23 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScThreeStrings {
|
||||||
|
public String mVal1;
|
||||||
|
|
||||||
|
public String mVal2;
|
||||||
|
|
||||||
|
public String mVal3;
|
||||||
|
|
||||||
|
public ScThreeStrings() {}
|
||||||
|
|
||||||
|
public ScThreeStrings(String paramString1, String paramString2, String paramString3) {
|
||||||
|
this.mVal1 = paramString1;
|
||||||
|
this.mVal2 = paramString2;
|
||||||
|
this.mVal3 = paramString3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScThreeStrings.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
17
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/ScTwoInts.java
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScTwoInts {
|
||||||
|
public int mVal1 = 0;
|
||||||
|
|
||||||
|
public int mVal2 = 0;
|
||||||
|
|
||||||
|
public ScTwoInts() {}
|
||||||
|
|
||||||
|
public ScTwoInts(int paramInt1, int paramInt2) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScTwoInts.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,20 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScTwoStrings {
|
||||||
|
public String mVal1;
|
||||||
|
|
||||||
|
public String mVal2;
|
||||||
|
|
||||||
|
public ScTwoStrings() {}
|
||||||
|
|
||||||
|
public ScTwoStrings(String paramString1, String paramString2) {
|
||||||
|
this.mVal1 = paramString1;
|
||||||
|
this.mVal2 = paramString2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScTwoStrings.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScWrongDevIdxEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScWrongDevIdxEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
public class ScWrongUserEx extends ScEx {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/ScWrongUserEx.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
65
SC_DLL_Wrapper/de/spacecontrol/sc/dllwrapper/Util.java
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
public class Util {
|
||||||
|
public static void copy(Object paramObject1, Object paramObject2) {
|
||||||
|
Class<?> clazz1 = paramObject1.getClass();
|
||||||
|
Class<?> clazz2 = paramObject2.getClass();
|
||||||
|
String str1 = clazz1.getName();
|
||||||
|
String str2 = clazz2.getName();
|
||||||
|
Field[] arrayOfField = clazz1.getDeclaredFields();
|
||||||
|
if (!str1.equals(str2))
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
for (int i = 0; i < arrayOfField.length; i++) {
|
||||||
|
Field field = arrayOfField[i];
|
||||||
|
Class<?> clazz = field.getType();
|
||||||
|
String str = clazz.toString();
|
||||||
|
try {
|
||||||
|
if (str.equals("boolean")) {
|
||||||
|
field.setBoolean(paramObject2, field.getBoolean(paramObject1));
|
||||||
|
} else if (str.equals("int")) {
|
||||||
|
field.setInt(paramObject2, field.getInt(paramObject1));
|
||||||
|
} else {
|
||||||
|
System.out.println("unknown type");
|
||||||
|
}
|
||||||
|
} catch (IllegalArgumentException illegalArgumentException) {
|
||||||
|
illegalArgumentException.printStackTrace();
|
||||||
|
} catch (IllegalAccessException illegalAccessException) {
|
||||||
|
illegalAccessException.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String convToString(Object paramObject) {
|
||||||
|
StringBuffer stringBuffer = new StringBuffer("");
|
||||||
|
Class<?> clazz = paramObject.getClass();
|
||||||
|
Field[] arrayOfField = clazz.getDeclaredFields();
|
||||||
|
for (int i = 0; i < arrayOfField.length; i++) {
|
||||||
|
Field field = arrayOfField[i];
|
||||||
|
Class<?> clazz1 = field.getType();
|
||||||
|
String str1 = clazz1.toString();
|
||||||
|
int j = str1.lastIndexOf('.');
|
||||||
|
str1 = str1.substring(j + 1);
|
||||||
|
String str2 = String.format("%20s", new Object[] { str1 });
|
||||||
|
stringBuffer.append(str2);
|
||||||
|
stringBuffer.append(' ');
|
||||||
|
stringBuffer.append(String.format("%16s", new Object[] { field.getName() }));
|
||||||
|
stringBuffer.append(" = ");
|
||||||
|
try {
|
||||||
|
stringBuffer.append(field.get(paramObject).toString() + "\n");
|
||||||
|
} catch (IllegalArgumentException illegalArgumentException) {
|
||||||
|
illegalArgumentException.printStackTrace();
|
||||||
|
} catch (IllegalAccessException illegalAccessException) {
|
||||||
|
illegalAccessException.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return stringBuffer.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/Util.class
|
||||||
|
* Java compiler version: 8 (52.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.spacecontrol.sc.dllwrapper;
|
||||||
|
|
||||||
|
interface package-info {}
|
||||||
|
|
||||||
|
|
||||||
|
/* Location: /opt/SpaceControl/lib/SC_DLL_Wrapper.jar!/de/spacecontrol/sc/dllwrapper/package-info.class
|
||||||
|
* Java compiler version: 5 (49.0)
|
||||||
|
* JD-Core Version: 1.2.1
|
||||||
|
*/
|