Raster Bugged by TexCoordGeneration
I have a problem and I think it is a bug as one setting on one node affects another completely unrelated node. I will explain what happens, include code which shows it happening and a possible very long winded work-around.
The code creates the minimum requirements for java3d.
loads an image.
attaches the raster to the platformgeometry and renders image as expected.
when the user presses space a sphere with white direction light is added.
the spheres appearance has
black and white material
an array of 1 TextureUnitState
of which holds a texture,
textureAttributes that modulate the objects colour and the texture
and a default TexCoordGeneration
once the sphere is successfully grafted onto the scene for some reason the raster scales its image to match the canvas size and only displays the portion visible within the rasters area. how frustrating!!!! in my mind the raster should not have been affected at all.
i havent been able to test this on any other machine but my whole purpose for pursuing this development choice is for maximum compatibility so i would hopefully think this bug effect will occur on any machine.
the work-around which has come to mind is to perform calculation everytime the canvas or raster is resized. that is to take the canvas size and raster image size properties and calculate scaling factors which can be added to the texcoordgeneration planeS and planeT which i have had some success at altering the images scale but havent fully tested the idea. seems a little long winded to get the result i had before using TextureUnitStates of which my machine supports 4.
There maybe something really obvious I am missing and hence why this post. im hoping for something really simple to solve it :) I would really appreciate you insight, thanks.