• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in adding view to Cube in java 3d

 
Neeba Rebbaca
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tired to add multiple cubes of size 25. I have translated the view.But still i can able to see only one cube not the others. I went wrong somewhere.But don't know where. Please help me...


>
 
Neeba Rebbaca
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help me with some idea...I'm badly in need of that...
 
Neeba Rebbaca
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to draw a cubes of size 25 and in many number at different co-ordinates.These are the steps i followed.

1. Declared and initialised Virtual Universe.
2. Declared and set x,y,z for HiResCoord.
3. Declaring and passing hirescoord and virtualuniverse obj to Locale.
4. Declaring and BranchGroup(scenegraph) and adding an array of ColorCube to the branchgroup.
5. Declaring another BranchGroup(View graph).
6. Declaring an array of TransformGroup and Transform3D.
7. Inside the loop, translating to new position. The x,y values are incremented by loop.(-250,250,-1000 and -215,215,-1000). and transform3d object is added to transformgroup object. And transform3d object is inverted.
8. Declared and initialised ViewPlatform and added view graph.
9. Declared , initialised view class and add PhysicalEnvironment and PhysicalBody to it.
10. set backClipDistance for 200 and and frontClipDistance for 2.
11. And added canvas3d .
12. And added canvas3d to applet.

I tried to add two cubes at different coordinates.But they are getting overlapped.I couldn't able to trace out.Please help me solving the issue.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic