Re: [JAVA3D] Function of normalise()

2003-02-12 Thread Kevin Glass
Normalise is used for quite good for a few things. Its useful when comparing any two vectors, means that sometimes you can do comparisons between the components as opposed to the vector itself. Also, isn't it used in conjuction with the dot product (or is that the cross product) to work out the cos

[JAVA3D] Creating a Background with a color gradient

2003-02-12 Thread Ashwini Chougule
Hi All, I am trying to create a background with a color gradient. I am working with HelloUniverse example for this. I am trying to use Background geometry. The problem is that when I give the branchgroup , to which the geometry is added as an argument  to setGeometry method of Background c

[JAVA3D] Alarming amounts of garbage generated by picking routines

2003-02-12 Thread Rob Nugent
Hello, I've recently started adding substantial quantities of extra geometry to my application, and I'm starting to see horrible garbage collection pauses, typically around *2 seconds* and sometimes more. (I'm ataching a screen shot to illustrate the complexity of my scene). I've tried to be car

[JAVA3D] Question on views & viewingPlatforms

2003-02-12 Thread Philip J Colbert
Hi all I have got an appliation that I import VRML shapes and add them to the scene at run time. One of the issues I have is that when the user moves the starting shape it is tricky for them just to manipluate the shape back to the starting position. What I want to do is place a button on the sw

Re: [JAVA3D] Creating a Background with a color gradient

2003-02-12 Thread Kevin Glass
Have you tried it with a single color? Does that work? I was under the impression that the background geometry needed to fit in a 1 unit cube centered around (0,0,0). Unless I read it wrong, your background is outside of this cube (it being a 2 unit cube). Kev > Hi All, > I am trying to create a

Re: [JAVA3D] Question on views & viewingPlatforms

2003-02-12 Thread Kevin Glass
Phil, Its probably easier if you don't construct your own view nodes. Best to just use: TransformGroup viewGroup = canvas.getView().getViewingPlatform().getViewPlatformTransform(); Then just use setTransform() and getTransform() on the "viewGroup". This should update your view happily without a

Re: [JAVA3D] Question on views & viewingPlatforms

2003-02-12 Thread Philip J Colbert
Small problem with that line: I am using in my app an class called LHS_Canvas_Test that extends Canvas3D. In my constructor I use the "this" key word to refer to the canvas i.e. simpleUniverse = new SimpleUniverse(this); instead of simpleUniverse = new SimpleUniverse(canvas); when I put your

Re: [JAVA3D] Question on views & viewingPlatforms

2003-02-12 Thread greg baboolal
Hi, unless I'm missing something here the line should be u.getViewingPlatform().setNominalViewingTransform(); where u is the simple universe. Out of interest what happens when you pass or set the viewPlatforms or equivalent with a new Transform3D which for example is what I do when wanting to re

[JAVA3D] AW: [JAVA3D] Question on views & viewingPlatforms

2003-02-12 Thread Florin Herinean
There is something wrong in your program. I am able to use "this" without any problems. You should check the following: 1) are you using "this" keyword from a static context ? (a static method) 2) are you sure that the object referred by "this" is really an instance of Canvas3D ? (you might be ins

Re: [JAVA3D] AW: [JAVA3D] Question on views & viewingPlatforms

2003-02-12 Thread Philip J Colbert
Thaks Florin I have been through my code and found I needed to put this line in: view = simpleUniverse.getView(); when I put this in the transform3d would then set the view location. so a combination of advice from the last two replys solved it just needed a kick up the backside! C YA Phil Col

[JAVA3D] After rendering for about 30 seconds, my app stops rendering

2003-02-12 Thread Andy Gombos
My little terrain rendering test displays the objects fine - using KeyNavigatorBehavior I can fly around the object and examine it. However, on the latest stable and beta J3D releases, after about 30 seconds rendering hangs. The AWT threads are still running, since I can close the app normally.

Re: [JAVA3D] Alarming amounts of garbage generated by picking routines

2003-02-12 Thread Justin Couch
Rob Nugent wrote: I've recently started adding substantial quantities of extra geometry to my application, and I'm starting to see horrible garbage collection pauses, typically around *2 seconds* and sometimes more. Yup. Known issue. I have an outstanding bug report about this problem. In Xj3D,

Re: [JAVA3D] Alarming amounts of garbage generated by picking routines

2003-02-12 Thread Rob Nugent
Justin, Thanks for the feedback - I too am seeing 1 to 2MBytes garbage a second, and I consider it very serious. It's frustrating precisely because the rendering and picking performance I'm getting is quite good, which implies lots of frames/second which implies lots of garbage. Was there a bug n

Re: [JAVA3D] Alarming amounts of garbage generated by picking routines

2003-02-12 Thread N. Vaidya
I do recall that I ran into similar memory overheads sometime last year. PickTool.INTERSECT_TEST produces probably (much ???) less garbage than PickTool_INTERSECT_FULL. Haven't examined this issue in recent times. Vaidya >On Wed, 12 Feb 2003 11:43:40 +, Rob Nugent <[EMAIL PROTECTED]> wrote:

Re: [JAVA3D] Alarming amounts of garbage generated by picking routines

2003-02-12 Thread Justin Couch
picking performance I'm getting is quite good, which implies lots of frames/second which implies lots of garbage. Exactly. I've only noticed it using pickCone/pickConeRay and none of the other picking objects, but at the time Kelvin said it a more general issue. Was there a bug number for this,

Re: [JAVA3D] Function of normalise()

2003-02-12 Thread Gary L. Graf
In addition to what has already been said, it is important to remember that a vector is a means of specifying a direction. In many cases you may want to manipulate them mathematically (e.g., What direction is halfway between the two thugs, left and right, that I am trying to escape?). It is

Re: [JAVA3D] Ordered Group?

2003-02-12 Thread N. Vaidya
Well, you may also want to seek better counsel, but here's my $0.02 worth. If you don't use the OrderedGroup, then my guess would be that the spiral should be visible behind the sphere. If you use the OrderedGroup, then the behavior you see is as expected. The reason I believe is that the View fl

[JAVA3D] MIPmap again

2003-02-12 Thread Lan Wu-Cavener
Hi, everyone: Could any one tell me what does Texture.MULTI_LEVEL_MIPMAP do differently from a Texture.BASE_LEVEL in checking the rexture size? I tried to use the Texture.MULTI_LEVEL_MIPMAP mode but defining the texture.setMaximumLevel(0). And I used the same image as I did in BASE_Level mode whic

Re: [JAVA3D] Creating a Background with a color gradient

2003-02-12 Thread Frederic Barachant
I"ve done that, here is the code. Mainly i create a bufferedimage that i fill with a gradient, and then assign this image to a Background node. Nevertheless, i've submitted a weird thing to Kelvin, and i'm still waiting for his response. Sometimes, the background is white, and mapping does not ap

[JAVA3D] orient from normal

2003-02-12 Thread Frederic Barachant
hello. i'm looking for a way to orient an object based on the normal returned from a pick. In fact, i've tried around eight methods, and get (what seems to be) correct results for the two rotational angles to get the vector (polar coordinates, no Yup vector). the method is basically to get the an

Re: [JAVA3D] Alarming amounts of garbage generated by picking routines

2003-02-12 Thread Kelvin Chung
Justin Couch wrote: picking performance I'm getting is quite good, which implies lots of frames/second which implies lots of garbage. Exactly. I've only noticed it using pickCone/pickConeRay and none of the other picking objects, but at the time Kelvin said it a more general issue. Was there

Re: [JAVA3D] u RE: [JAVA3D] Primitive sizes seem incorrect

2003-02-12 Thread Sean Sylvis
Right. It does not follow any convention I'm familiar with and does not seem intuitive to me. It is also not all that well explained in the documentation. So, if you look at the docs for the constructor Box() it says it creates a Box with 1.0 in all dimensions. However, in the main class summary

[JAVA3D] Question about Texture

2003-02-12 Thread Yu Wang
Hi All, I have some textured objects in a scene. Meanwhile I have some colorful polygons and lines too. But surprisingly I found when I show the textured objects, all the other polygons and lines became black. This happens after I rotate the scene(the first time all the scene redraws, that means i

[JAVA3D] y-up and cube env map issues

2003-02-12 Thread Justin Couch
I'm coming across a number of different problems surrounding the Y-UP flag on textures and the rendering not correctly supporting it. Following are the two most glaring issues that I've come across. Firstly, the util TextureLoader just seems to completely ignore the request. So, putting in my own

Re: [JAVA3D] Alarming amounts of garbage generated by picking routines

2003-02-12 Thread Richard Smith - Systems Engineer - Melbourne
Generating garbage at a slower rate might be good, but having a 2 second GC surprises me, and suggests that the default heap parameters are inappropriate. "Improving Java[tm] Application Performance and Scalability by Reducing Garbage Collection Times and Sizing Memory Using JDK 1.4.1" runs through

[JAVA3D] Mouse Zoom does not work with PARALLEL_PROJECTION?

2003-02-12 Thread Jasmine Kwok
Dear all,   does anybody knows if View.PARALLEL_PROJECTION works with MouseZoom?   I have a program which uses MouseZoom, MouseTranslate and MouseRotate. They work fine with both parallel and perspective projection. However, when I change the projection policy to PARALLEL_PROJECTION, only t

Re: [JAVA3D] Mouse Zoom does not work with PARALLEL_PROJECTION?

2003-02-12 Thread Jasmine Kwok
Hi all!   I'm sorry. There's a slight mistake in my email previously. what I meant simply was that Mouse Zoom couldn't work Parallel projection but was fine with perspective projection. In fact, translate and rotate were fine with both perspective and parallel projection. Zoom is the main c

Re: [JAVA3D] Mouse Zoom does not work with PARALLEL_PROJECTION?

2003-02-12 Thread Patrick-Emmanuel Boulanger-Nadeau
Try putting two object on the side of each other then zoom one in and out. You'll notice that they actually change position in the Z axis. You just can't perseive (how is it spelled ?) it since the projection is parallel, meaning however far it is it will look the same. It's also refered as

Re: [JAVA3D] Mouse Zoom does not work with PARALLEL_PROJECTION?

2003-02-12 Thread Jasmine Kwok
Thanks. I get your point. So is there no way we can zoom an object using other methods if we use the parallel projection.     Regards, Jasmine Kwok - Original Message - From: Patrick-Emmanuel Boulanger-Nadeau To: [EMAIL PROTECTED] Sent: Thursday, February 13, 2003

Re: [JAVA3D] Mouse Zoom does not work with PARALLEL_PROJECTION?

2003-02-12 Thread Justin Couch
Jasmine Kwok wrote: Hi all! I'm sorry. There's a slight mistake in my email previously. what I meant simply was that Mouse Zoom couldn't work Parallel projection but was fine with perspective projection. In fact, translate and rotate were fine with both perspective and parallel projection. Zoom i

Re: [JAVA3D] Creating a Background with a color gradient

2003-02-12 Thread Ashwini Chougule
Single color->U mean setting a color to the background and then adding the background node to objRoot.Yes ,I tried that and it works . Also,about the geometry I have tried changing the coordinates of the QuadArray. Note: vertices array was changed to-> private final float[] vertices =

Re: [JAVA3D] Creating a Background with a color gradient

2003-02-12 Thread Kevin Glass
By single colour I actually meant using just one colour on your vertices. Instead of attempting to get a gradient. Also are your normals right, I mean the vector(0.0,0.7,0.7). You using nominal viewing transform, which means +Z goes into the screen (is that right anyone?). First off this means tha