• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Displaying an X3D image within a subpanel

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm writing code for a Java project that displays X3D models and I'm using an XML parser to import the X3D files into the project. I've used some Subpanels to show where the X3D models would go when they're selected. The code that I have so far in the main class is:



The XML parser that I have so far is:





As you can see the XML parsers have a different layout as I used it to show a file called employees.xml and I haven't changed it round yet. The question that I'm asking is, how do I display the X3D models in the subpanels that I have in the main class at the top.
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem, I suspect, is that, like me, most of us here don't know much about X3D except the first summary that google shows, nor what those 30 or so subpanels are meant to display.
You have not explained either, and you have not replied to the suggestions made in the previous post.

In general the logic is:
1. Read the file and create a set of model objects. This is called your application's domain model
2. Convert the information in the domain model - things like 3d coordinates, materials or whatever - into renderable graphics objects like points, lines, triangles or textures.
3. Modify the graphics objects according to environmental conditions like camera angle, perspective, lighting and nature of material.
4. Render these graphics objects, either using the GUI framework's methods or something more specialized towards graphics, like JOGL. In Swing, you would write code in
JPanel or JComponent's paintComponent(). JOGL can integrate into a Swing application, such that the windows and controls are provided by Swing but the drawing area is rendered by JOGL.

I'm quite sure there are existing x3d capable java frameworks that can help you with all 4 steps, so that you just have to write the user interface code. Knute has already suggested one; perhaps you should
research on that.

I'll add this post to our Graphics forum too. Perhaps somebody who has subscribed to that forum will see it and give some helpful info.
 
Die Fledermaus does not fear such a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic