Implorer / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Uncaught exception when creating Sphere #561

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What did you intend to do, what was the expected outcome?

int zSamples;
int radialSamples;
float radius;

...

Sphere s = new Sphere( zSamples, radialSamples, radius );

Procedural generation of Sphere objects, expected lower valid range of zSamples 
and radialSamples to be 1, and expected crude/distorted spheres for low values.

Was not expecting an uncaught exception.

What outcome do you experience instead?

radialSamples performs much as expected, with a value of 1 resulting in no 
output (expected a triangle or other simplified shape), higher values produce 
smoother Spheres. No exceptions thrown.

zSamples of 1 or 2 will throw the following exceptions:
http://i.imgur.com/NNdKF.png
Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main] 
IllegalArgumentException: Negative Capacity: -108

http://i.imgur.com/v0SrS.png
Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main] 
BufferOverflowException

What steps will reproduce the problem?

Sphere s;

  s = new Sphere( 1, 10, 1f );
  s = new Sphere( 2, 10, 1f );

What version of the product(s) are you using? Please copy build details from 
jMonkeyEngine's About Screen!

Product Version: jMonkeyEngine SDK 3.0RC2

On what operating system?

System: Windows 7 version 6.1 running on x86; MS949; ko_KR (jmonkeyplatform)

Please provide any additional information. (e.g. your hardware specs and Java 
version).

Java: 1.7.0_01; Java HotSpot(TM) Server VM 21.1-b02

Original issue reported on code.google.com by charles....@gmail.com on 22 Dec 2012 at 9:15

GoogleCodeExporter commented 9 years ago

Original comment by ShadowIs...@gmail.com on 19 Apr 2013 at 6:01