We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Deep
Pages: 1 2 
Deep (Read 6120 times)
Re: Deep
Reply #15 - Aug 18th, 2009, 2:24am
 
sourcecode was just recently made public
http://www.pixelnerve.com/v/2009/08/18/deep-source-code/

have fun.
Re: Deep
Reply #16 - Aug 18th, 2009, 5:15am
 
thank you for sharing this,however i got this error message when i run the application
“Exception in thread "Timer-0" javax.media.opengl.GLException: java.lang.ClassCastException: Deep$GrassLine cannot be cast to vitamin.math.Vector3”

any ideas? thank you in advanced!
Re: Deep
Reply #17 - Aug 18th, 2009, 5:44am
 
hmm thats weird. have you changed the code? seems like you're casting a class GrassLine, which is part of the demo itself with the vitamin.math.Vector3 class.

what line claims the error?
Re: Deep
Reply #18 - Aug 18th, 2009, 7:34am
 
thank you for the reply,i didn't change anything. the output error is:

Code:
javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
at com.sun.opengl.util.Animator.display(Animator.java:144)
at com.sun.opengl.util.FPSAnimator$1.run(FPSAnimator.java:95)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.ClassCastException: Deep$GrassLine cannot be cast to vitamin.math.Vector3


btw,i'm using 1.0.6 with jdk1.6_update16
Re: Deep
Reply #19 - Aug 18th, 2009, 7:55am
 
yes, but what is the line in the code where it breaks? if it breaks on any specific line of the code..
Re: Deep
Reply #20 - Aug 18th, 2009, 8:34am
 
sorry,can't tracing which line is,i mean it didn't jump or highlight to any breaks code. the sound still plays. really weird.

here's the full error message:

Exception in thread "Timer-0" javax.media.opengl.GLException: java.lang.ClassCastException: Deep$GrassLine cannot be cast to vitamin.math.Vector3
     at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
     at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
     at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
     at com.sun.opengl.util.Animator.display(Animator.java:144)
     at com.sun.opengl.util.FPSAnimator$1.run(FPSAnimator.java:95)
     at java.util.TimerThread.mainLoop(Timer.java:512)
     at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.ClassCastException: Deep$GrassLine cannot be cast to vitamin.math.Vector3
     at Deep$GrassComparator.compare(Deep.java:2529)
     at java.util.Arrays.mergeSort(Arrays.java:1270)
     at java.util.Arrays.mergeSort(Arrays.java:1281)
     at java.util.Arrays.mergeSort(Arrays.java:1281)
     at java.util.Arrays.mergeSort(Arrays.java:1281)
     at java.util.Arrays.mergeSort(Arrays.java:1281)
     at java.util.Arrays.mergeSort(Arrays.java:1281)
     at java.util.Arrays.mergeSort(Arrays.java:1281)
     at java.util.Arrays.sort(Arrays.java:1210)
     at java.util.Collections.sort(Collections.java:159)
     at Deep$GrassScene.draw(Deep.java:2633)
     at Deep.renderDeep(Deep.java:848)
     at Deep.drawJOGL(Deep.java:676)
     at Deep$GLRenderer.display(Deep.java:1142)
     at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
     at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435)
     at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
     at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java
:452)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269
)
     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174
)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

thank you for the help!
Re: Deep
Reply #21 - Aug 18th, 2009, 10:39am
 
yes but it seems to be something with the sort method in the grassscene.
it works on all pcs ive tested..

what is your machine and OS ? ill dig into it when i get home
Re: Deep
Reply #22 - Aug 20th, 2009, 5:13am
 
under windows xpSp2,thank you.
Re: Deep
Reply #23 - Aug 20th, 2009, 6:04am
 
hi liquid.. try this:

in the file GrassScene.pde change the 9th and 10th lines

   float z1 = ((Vector3)a).z;
   float z2 = ((Vector3)b).z;

to

   float z1 = ((GrassLine)a).origin.z;
   float z2 = ((GrassLine)b).origin.z;


see if that solves the casting problem
Re: Deep
Reply #24 - Aug 21st, 2009, 10:20am
 
hey,thank you for the help. that works,however,another error just happend,sorry,here its:

//==========================================

Exception in thread "Timer-0" javax.media.opengl.GLException: java.lang.ClassCastException: Deep$ParticleJelly cannot be cast to vitamin.math.Vector3
     at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
     at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:410)
     at javax.media.opengl.GLCanvas.display(GLCanvas.java:244)
     at com.sun.opengl.util.Animator.display(Animator.java:144)
     at com.sun.opengl.util.FPSAnimator$1.run(FPSAnimator.java:95)
     at java.util.TimerThread.mainLoop(Timer.java:512)
     at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.ClassCastException: Deep$ParticleJelly cannot be cast to vitamin.math.Vector3
     at Deep$JellyComparator.compare(Deep.java:7043)
     at java.util.Arrays.mergeSort(Arrays.java:1270)
     at java.util.Arrays.sort(Arrays.java:1210)
     at java.util.Collections.sort(Collections.java:159)
     at Deep$EmitterJelly.draw(Deep.java:7167)
     at Deep$JellyScene.drawJelly(Deep.java:2838)
     at Deep.renderDeep(Deep.java:932)
     at Deep.drawJOGL(Deep.java:676)
     at Deep$GLRenderer.display(Deep.java:1142)
     at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
     at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435)
     at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
     at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java
:452)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269
)
     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174
)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

//============================================

should i change something in the ParticleJelly.pde? Is this related to my OS or something,btw,i'm using non-english system. really strange. again,much thank you for the help!
Re: Deep
Reply #25 - Aug 21st, 2009, 11:02am
 
i never had the problem but i dont find the problem weird. what i really find to be weird is why processing doesn't complain about the casting problem on the machines i've tested it on.
i tried on xp sp2, xp 64bit, macosx tiger, leopard.. no complains..


anyway, that problem is the same thing as the last one, but in different file.. so if you keep haiving problems look for the Comparator classes and you might find some more casting errors..

so,

goto the emitter_jelly.pde file and change lines 6,7

     float z1 = ((Vector3)a).z;
     float z2 = ((Vector3)b).z;

to

     float z1 = ((ParticleJelly)a).pos.z;
     float z2 = ((ParticleJelly)b).pos.z;


let me know if you find any other errors.

have fun.
Re: Deep
Reply #26 - Aug 21st, 2009, 11:05pm
 
Winktotally working now after changing those lines,really appreciate your help! Smiley
Re: Deep
Reply #27 - Aug 22nd, 2009, 6:57am
 
great!

i have updated the code with the new changes and uploaded it to the same place.

have fun.
Pages: 1 2