• 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

3d objects in java

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to write a program to mimic a 3d architectural representation of a room in java (entities are: windows, walls, ceiling, floor; no furniture or anything inside). Then I will take some input parameters and optimize the spacing of the windows on the building.

I originally made the drawing in google sketchup, exported it as xml, parsed the xml into java classes, so now I java classes (wall, window, etc) containing coordinates for all the vertices of each entity. What I did before was hackish, but adding more functionality might be messy so I want to use existing libraries such as Point and Rectangle that have methods like setLocation, distance.

Are there any java libraries that support 3d geometries? The java.awt.Rectangle and java.awt.Point classes only support 2d shapes. The library should support methods like setLocation, move, etc because I will have to rearrange the windows on each wall after the optimization.

Let me know if my explanation is unclear.
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"calmze", please check your private messages for an important administrative matter.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll need to look at libraries like:

JWJGL
JOGL
Java3D
 
david li
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More specifically, I would like 3d rectangle and 3d point classes that support all the operations of java.awt.Rectangle and java.awt.Point (which is only 2d). I don't necessarily have to draw anything, just perform the optimization and get updated objects. Eventually I will write the optimization back to xml and make a new drawing in google sketchup.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The first of Gregg's list I would look at is Java3D. It supports 3D primitives. It's also somewhat higher-level than JOGL.

You'll find both on dev.java.net.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JOGL is a wrapper around OpenGL, a quite low-level 3D graphics library. It is only interesting if you want to work with 3D graphics.

LWJGL (I guess that's what Gregg meant instead of JWJGL) is a game programming library.

Java3D will probably be more useful to you.
[ June 26, 2008: Message edited by: Jesper Young ]
 
We don't have time to be charming! Quick, read this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic