Basic steps needed to display 3D objects : 3D Basics « 3D « Java

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Collections Data Structure
8. Database SQL JDBC
9. Design Pattern
10. Development Class
11. Email
12. Event
13. File Input Output
14. Game
15. Hibernate
16. J2EE
17. J2ME
18. JDK 6
19. JSP
20. JSTL
21. Language Basics
22. Network Protocol
23. PDF RTF
24. Regular Expressions
25. Security
26. Servlets
27. Spring
28. Swing Components
29. Swing JFC
30. SWT JFace Eclipse
31. Threads
32. Tiny Application
33. Velocity
34. Web Services SOA
35. XML
Microsoft Office Word 2007 Tutorial
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java » 3D » 3D BasicsScreenshots 
Basic steps needed to display 3D objects
Basic steps needed to display 3D objects

/*
The Joy of Java 3D

by Greg Hopkins

Copyright Copyright 2001


*/


/*
The following program shows you the basic steps needed to display 3D objects.

1.  Create a virtual universe to contain your scene.
2.  Create a data structure to contain a group of objects.
3.  Add an object to the group
4.  Position the viewer so that they are looking at the object
5.  Add the group of objects to the universe


*/




import javax.media.j3d.BranchGroup;

import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.universe.SimpleUniverse;

public class Hello3d {

  public Hello3d() {
    SimpleUniverse universe = new SimpleUniverse();
    BranchGroup group = new BranchGroup();
    group.addChild(new ColorCube(0.3));
    universe.getViewingPlatform().setNominalViewingTransform();
    universe.addBranchGraph(group);
  }

  public static void main(String[] args) {
    new Hello3d();
  }
// end of class Hello3d



           
       
Related examples in the same category
1. Simple 3D DemoSimple 3D Demo
2. Positioning the ObjectsPositioning the Objects
3. Basic ConstructBasic Construct
4. Appearance Scope
5. AppearanceAppearance
6. Appearance Mixed
7. Getting Started with the Java 3D API written in Java 3DGetting Started with the Java 3D API written in Java 3D
8. Simple RotationSimple Rotation
9. HelloJava3Db renders a single, rotated cubeHelloJava3Db renders a single, rotated cube
10. User Interfaces with Java
w_ww___.j___a__v___a___2_s___._c_om_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.