This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Rubik's Cube switch between branches  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone!

Could you help me a little?

I try to build a Rubik's Cube. Now I have 2 branches 1 for horizontal and 1 for vertical rotation. Is it possible to switch between them? I tried it but I get a nullpointerexception..

Please somebody help me!

the code is the following:


Thank you in advance!

Best wishes!
 
Rancher
Posts: 42975
76
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Post the full exception stack trace. Also tell us in which line of code it happens, and which object is null.
 
Zoltan Molnar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Welcome to JavaRanch.

Post the full exception stack trace. Also tell us in which line of code it happens, and which object is null.



Hi! I appreciate your greeting!

So, could you tell me what is exception track trace?

I tried to modify like this:



And it has a problem with this method:


But then it throws an exception:

Exception in thread "main" java.lang.NullPointerException
at elte.java2_utikalauz5.java3d.RasterDemo.enablePicking(RasterDemo.java:539)
at elte.java2_utikalauz5.java3d.RasterDemo.enablePicking(RasterDemo.java:549)
at elte.java2_utikalauz5.java3d.RasterDemo.enablePicking(RasterDemo.java:549)
at elte.java2_utikalauz5.java3d.RasterDemo.enablePicking(RasterDemo.java:549)
at elte.java2_utikalauz5.java3d.RasterDemo.createSceneGraphVertical(RasterDemo.java:531)
at elte.java2_utikalauz5.java3d.RasterDemo.<init>(RasterDemo.java:76)
at elte.java2_utikalauz5.java3d.RasterDemo.main(RasterDemo.java:60)

Or am I think it too complicated? Is there easier method?

Thank you for your help in advance!

Best wishes!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!