java-3d

Simbad requires Java 3D

柔情痞子 提交于 2019-12-25 07:27:38
问题 Context: MS Windows 8, jre7 preinstalled by MS Windows setup, MS Windows PATH environment variable has set to JRE7 bin folder - C:\Program Files (x86)\Java\jre7\bin, simbad-1.4.jar is downloaded into a local folder. Use cases: simbad-1.4.jar is run by command line java -jar simbad-1.4.jar or by just double-clicking on simbad-1.4.jar In both cases Simbad requires Java 3D error message box appears. Yes, I know, setting-up Java 3D should probably fix the issue but I'd like to just deliver/setup

Why does the Java3D canvas flicker when I call Canvas3D.repaint()

大兔子大兔子 提交于 2019-12-24 14:22:54
问题 I have 2D elements I draw with postRender() on a Java3D canvas and want to animate these elements. In a loop I call Canvas3D.repaint(): while(animationIsRunning){ // I update positions of 2D elements here... // ... canvas3D.repaint(); Thread.sleep((long)(1.0/30.0 * 1000)); } For every short animation, this causes the whole 3D canvas to flicker once or twice. 回答1: I think I found a solution in my case: Instead of canvas3d.repaint(); I invoke canvas3d.getView().repaint(); This way I can update

Help debugging GL_VERSION error in a Java3d application

倾然丶 夕夏残阳落幕 提交于 2019-12-24 02:09:31
问题 I'm working on a 3d globe application written in java using java3d for the rendering. I've got a windows installer that basically copies files from a development snapshot to the program files directory. It runs fine from the devel snapshot, but when running after an install it does this: Java 3D ERROR : OpenGL 1.2 or better is required (GL_VERSION=1.1) javax.media.j3d.IllegalRenderingStateException: GL_VERSION at javax.media.j3d.NativePipeline.createNewContext(Native Method) at javax.media

How to know if a point is inside a complex 3D shape (.ply file)

假装没事ソ 提交于 2019-12-23 14:24:07
问题 I'm working on a Java project witch is really killing me. After several days of researching on different forums, looking for what I really need, I come to ask your help. My data : A .ply file (containing a 3D shape made of a lot of triangles) A point (3D coordinates) I would like to know if this point is contained inside the complex 3D shape. I have split this problem in 2 smaller problems : How can I represent the complex 3D shape in memory? (I found several libraries, but it seems really

jMonkey optimization similar to Java3D's

冷暖自知 提交于 2019-12-20 09:48:02
问题 Edit: For having real-time drawing, started using lwjgl which is base of jmonkeyengine and jocl in an "interoperability" between opengl and opencl, now can calculate and draw 100k particles real-time. Maybe mantle version of jmonkey engine can cure this drawcall overhead problem. For several days, I have been learning jMonkey engine(ver:3.0) in Eclipse(java 64 bit) and trying how to optimize a scene with using GeometryBatchFactory.optimize(rootNode); command. Without optimization(with

Cannot use installed java 3d

无人久伴 提交于 2019-12-13 16:42:26
问题 hi i'm trying to use java 3d in both command prompt and in netbeans. I have a win8 64 bit computor. I installed j3d-1_5_2-windows-amd64.exe. and it got installed inside java folder in a folder called Java3D. then I added an environmental variable as CLASSPATH and the values are C:\Program Files\Java\Java3D\1.5.2\lib\ext\j3dcore.jar;C:\Program Files\Java\Java3D\1.5.2\lib\ext\j3dutils.jar;C:\Program Files\Java\Java3D\1.5.2\lib\ext\vecmath.jar. my file get compilled without errors when I try to

Java3d: Texture is not applied to OBJ model properly

久未见 提交于 2019-12-13 14:14:25
问题 I load a 3d model of a torus (obj file) into my program, using these lines: Shape3D torus=null; Scene t1 = getSceneFromFile("Some local path\torus.obj"); Then I grab the model from the scene using this code: BranchGroup branchGroup = t1.getSceneGroup(); torus = (Shape3D) branchGroup.getChild(0); The following piece of code set an image as texture and then apply that texture to an Appearance object. TextureLoader textureLoader=new TextureLoader("Another local path\myImage.jpg",null);

Add a Object to a BranchGroup after the group is added to a Locale or a SimpleUniverse

ぃ、小莉子 提交于 2019-12-13 08:38:45
问题 Consider a simple code: import java.awt.*; import javax.media.j3d.*; import javax.vecmath.Color3f; import javax.vecmath.*; import com.sun.j3d.utils.universe.*; import com.sun.j3d.utils.geometry.*; public class Main { public static void main(final String[] args) { final SimpleUniverse universe = new SimpleUniverse(); final BranchGroup group = new BranchGroup(); TriangleArray triangle = new TriangleArray(3, TriangleArray.COORDINATES); triangle.setCoordinates(0, new Point3f[]{ new Point3f(-0.3f,

Recommended format to export 3D models for WebGL from a Java web app

时光毁灭记忆、已成空白 提交于 2019-12-13 07:02:04
问题 I have a web application that manipulates a 3D model on the server and allows the user to view the model. Using Java is a hard requirement for the web application, but the way the WebGL viewer interfaces with the application is still to be implemented. What is the recommended format/method to export 3D models from Java to something easily usable in WebGL? You can assume I use the Java 3D library on the server side and Three.js on the client side. 回答1: My preferred pipeline is export to JSON

Java3d read each polygon of an 3d-object

假装没事ソ 提交于 2019-12-12 10:19:15
问题 I'm using Java3d ( VERSION 1.6 ) and am trying to read all polygons from any object. I loaded one object using following code: private BranchGroup loadObj(String p) { BranchGroup objRoot = new BranchGroup(); TransformGroup tg = new TransformGroup(); Transform3D t3d = new Transform3D(); t3d.setScale(0.3); Matrix4d matrix = new Matrix4d(); t3d.get(matrix); try { Scene s = null; ObjectFile f = new ObjectFile (); String basepath = new File(p).getAbsolutePath(); System.out.println(basepath); f